Is there a way to find examples of how a certain method is used?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Is there a way to find examples of how a certain method is used?

Murphy Stein
Hi All,

I am trying to find some good examples of how the Dictionary class is  
used, particularly basic stuff like examples of how add: works.  The  
sender button in the SystemBrowser calls up about a million examples  
of add: , but I don't see a way to filter by a specific class.  Is  
there a built-in way to do this?

Thanks,
Murphy
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Is there a way to find examples of how a certain method is used?

Yoshiki Ohshima
  Murphy,

> I am trying to find some good examples of how the Dictionary class is  
> used, particularly basic stuff like examples of how add: works.  The  
> sender button in the SystemBrowser calls up about a million examples  
> of add: , but I don't see a way to filter by a specific class.  Is  
> there a built-in way to do this?

  Have you tried 'class refs (N)' menu item in the context menu of
class pane (the second from left)?

  Many occurence of the Dictionary class reference seem to create new
instance of it and assign it to an instance variable.  You can then
try the 'inst var refs...' menu item to see how the variable is used.

-- Yoshiki

_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Is there a way to find examples of how a certain method is used?

Edward Stow
In reply to this post by Murphy Stein
Murhpy,

Perhaps you could describe what you want to achieve.  The most common
idiom for adding to a dictionary is #at:put:

dict := Dictionary new.
dict at: <<key>> put: <<value>>.

<<key>> can be any object and not be restricted to strings or symbols
as is common in many other languages


On 08/07/06, Murphy Stein <[hidden email]> wrote:

> Hi All,
>
> I am trying to find some good examples of how the Dictionary class is
> used, particularly basic stuff like examples of how add: works.  The
> sender button in the SystemBrowser calls up about a million examples
> of add: , but I don't see a way to filter by a specific class.  Is
> there a built-in way to do this?
>
> Thanks,
> Murphy
> _______________________________________________
> Beginners mailing list
> [hidden email]
> http://lists.squeakfoundation.org/mailman/listinfo/beginners
>

--

Edward Stow
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners