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 _______________________________________________ Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners |
El 4/8/07 3:19 PM, "Ian Oversby" <[hidden email]> 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 [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners |
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 <[hidden email]> wrote: > > > > El 4/8/07 3:19 PM, "Ian Oversby" <[hidden email]> 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 > [hidden email] > http://lists.squeakfoundation.org/mailman/listinfo/beginners > Beginners mailing list [hidden email] 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 <[hidden email]> wrote: >> >> >> >> El 4/8/07 3:19 PM, "Ian Oversby" <[hidden email]> 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 [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners |
El 4/8/07 5:16 PM, "Bert Freudenberg" <[hidden email]> 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 mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners |
Free forum by Nabble | Edit this page |