How do I find all the methods available to a class? I was looking for a way to output a line-ending and I finally stumbled upon "String crlf" through google. If I find the String class in the System Browser and then use find method by wildcard to list all methods beginning with 'c' it doesn't list crlf.
Thanks,
Ian
El 4/8/07 3:19 PM, "Ian Oversby" oversby@googlemail.com escribió:
How do I find all the methods available to a class? I was looking for a way to output a line-ending and I finally stumbled upon "String crlf" through google. If I find the String class in the System Browser and then use find method by wildcard to list all methods beginning with 'c' it doesn't list crlf.
Thanks,
Ian
Transcript open. YourClass methodDict keysDo: [:k| Transcript show: k;cr]
Replace YourClass for what you wish String class methodDict keysDo: [:k| Transcript show: k;cr]
Note what in this case you must add "class"
Edgar
Okay, thanks very much Edgar. That listed the missing methods but it doesn't list the methods that the System Browser shows. Is there some reason that these methods aren't listed. Oh actually, nevermind. I think this is because crlf is an class method and the methods I was looking at were instance methods.
Cheers,
Ian
On 08/04/07, Edgar J. De Cleene edgardec2001@yahoo.com.ar wrote:
El 4/8/07 3:19 PM, "Ian Oversby" oversby@googlemail.com escribió:
How do I find all the methods available to a class? I was looking for a way to output a line-ending and I finally stumbled upon "String crlf" through google. If I find the String class in the System Browser and then use find method by wildcard to list all methods beginning with 'c' it doesn't list crlf.
Thanks,
Ian
Transcript open. YourClass methodDict keysDo: [:k| Transcript show: k;cr]
Replace YourClass for what you wish String class methodDict keysDo: [:k| Transcript show: k;cr]
Note what in this case you must add "class"
Edgar
Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
Actually, in the menu for the class, choose "browse protocol". The shortcut is Cmd-P.
- Bert -
On Apr 8, 2007, at 21:10 , Ian Oversby wrote:
Okay, thanks very much Edgar. That listed the missing methods but it doesn't list the methods that the System Browser shows. Is there some reason that these methods aren't listed. Oh actually, nevermind. I think this is because crlf is an class method and the methods I was looking at were instance methods.
Cheers,
Ian
On 08/04/07, Edgar J. De Cleene edgardec2001@yahoo.com.ar wrote:
El 4/8/07 3:19 PM, "Ian Oversby" oversby@googlemail.com escribió:
How do I find all the methods available to a class? I was
looking for
a way to output a line-ending and I finally stumbled upon "String crlf" through google. If I find the String class in the System Browser and then use find method by wildcard to list all methods beginning with 'c' it doesn't list crlf.
Thanks,
Ian
Transcript open. YourClass methodDict keysDo: [:k| Transcript show: k;cr]
Replace YourClass for what you wish String class methodDict keysDo: [:k| Transcript show: k;cr]
Note what in this case you must add "class"
Edgar
El 4/8/07 5:16 PM, "Bert Freudenberg" bert@freudenbergs.de escribió:
Actually, in the menu for the class, choose "browse protocol". The shortcut is Cmd-P.
This shows all methods what YourClass could understand, is better and I forget about, thanks !
Edgar
beginners@lists.squeakfoundation.org