In an object c, method foo is not a field of c. At the moment, the
mysterious code that processes c.foo requires that it be used in an
invocation: it does the correct thing to setup for calling foo, passing it
c as its "self" object.  Various library code uses c.__m.foo when it needs
to access the procedure that implements method foo, but officially, that is
not language canon and is subject to change. I guess that we could modify
things so that c.foo would be legal but it would be non-trivial.


On Mon, Apr 8, 2013 at 12:05 PM, Jafar Al-Gharaibeh <to.ja...@gmail.com>wrote:

> Here is a follow up question from me:
>
>   Why can't we say:
>
>    write image(c.foo)
>
> assuming c is a class with a foo method ?
>
> --Jafar
>
>
>
> On Mon, Apr 8, 2013 at 1:59 PM, Clinton Jeffery <jeff...@cs.uidaho.edu>wrote:
>
>> Bruce,
>>
>> It is moderately easy to filter the whole list of global names to find
>> only the procedure-valued items, using image() and variable(), e.g.
>>
>> every g := globalnames() do write(image(variable(g)))
>>
>> There are some subtleties for class methods, they are not quite the same
>> as procedures since they require a compatible object instance in order to
>> call them, but I am not sure how much you already know about that.  Feel
>> free to ask followup questions.
>>
>> Clint
>>
>>
>> On Sun, Apr 7, 2013 at 7:28 PM, Bruce & Breeanna Rennie <
>> bren...@dcsi.net.au> wrote:
>>
>>> Good morning to all,
>>>
>>> I have a method in a class I am developing that returns a list of
>>> available methods. The class has a number of other methods which are not
>>> in this list.
>>>
>>> For debugging purposes, I would like to get the names of the associated
>>> methods in a similar vein to name() or methodnames(). That is when one
>>> of these returned values from the list is supplied as a parameter then I
>>> would like to get the name of the method. Is there a simple way to do
>>> this? An additional question relates to getting the current list of
>>> classes that are in the current program?
>>>
>>> regards
>>>
>>> Bruce Rennie
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Minimize network downtime and maximize team effectiveness.
>>> Reduce network management and security costs.Learn how to hire
>>> the most talented Cisco Certified professionals. Visit the
>>> Employer Resources Portal
>>> http://www.cisco.com/web/learning/employer_resources/index.html
>>> _______________________________________________
>>> Unicon-group mailing list
>>> Unicon-group@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/unicon-group
>>>
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Minimize network downtime and maximize team effectiveness.
>> Reduce network management and security costs.Learn how to hire
>> the most talented Cisco Certified professionals. Visit the
>> Employer Resources Portal
>> http://www.cisco.com/web/learning/employer_resources/index.html
>> _______________________________________________
>> Unicon-group mailing list
>> Unicon-group@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/unicon-group
>>
>>
>
------------------------------------------------------------------------------
Minimize network downtime and maximize team effectiveness.
Reduce network management and security costs.Learn how to hire 
the most talented Cisco Certified professionals. Visit the 
Employer Resources Portal
http://www.cisco.com/web/learning/employer_resources/index.html
_______________________________________________
Unicon-group mailing list
Unicon-group@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/unicon-group

Reply via email to