(newbee) How to evaluate if class already exists?

Juan Burella juan.burella at gmail.com
Wed Nov 9 21:43:47 UTC 2005


Hi,

try with: Smalltalk hasClassNamed: 'text'

Juan M.

On 11/9/05, Marcus Pedersén <marcus.pedersen at comhem.se> wrote:
>
> Hi!
> I want to evaluate if a class already exists but I can not figure out how
> to do it.
> I get a string from a textfield in a GUI and wants to send a reply back
> (CustomMeny) telling the user if a class exists with that name.
> I have been looking around in Object and Class classes for a method but I
> can not find anything that works.
> What Im looking for:
> | myString |
> myString := 'text'.
> myString "isAClass" ( or something like that, that returns true if there
> already is a class called 'text').
> Many thanks in advance!
> Marcus
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20051109/e5de2a3b/attachment.htm


More information about the Squeak-dev mailing list