Path: utzoo!attcan!uunet!husc6!rutgers!rochester!rocksanne!entire!elt From: elt@entire.UUCP (Edward L. Taychert) Newsgroups: comp.lang.smalltalk Subject: Re: Specify New Classes in Smalltalk/V Summary: use variableSubclass Message-ID: <3269@entire.UUCP> Date: 15 Nov 88 16:32:03 GMT References: <1361@aucs.UUCP> Distribution: na Organization: Entire Inc, East Rochester, NY Lines: 36 In article <1361@aucs.UUCP>, 831059l@aucs.UUCP (Langlois) writes: > > I'm a little confused about defining new classes in Smalltalk/V. > When you choose to add a subclass to an existing class, you are then asked > to select from a menu containing subclass, variableSubclass, > variableWordSubclass, and variableByteSubclass. I've read the description > in the manual but I am still confused. When do you choose which? > Any help in clearing this up would be greatly appreciated. use variableSubclass, this means that object instance variable can reference any kind of object. That's kind of what smalltalk is all about. If however you want (or need) high speed access to, say a byte array, you can make an object variableByteSubclass. The object created will only know how to access bytes, but will do so much faster. Now there is a trick here that I'm tring to remember... I don't think that byte and word subclasses have instance variables per se, after you create one, use at: and at:put: to reference it. Honestly, I just played around until I got it to work the way I wanted it to. Don't be shy about calling Digitalk customer support. If you don't have the number, call LA,Ca information and ask for it. They are very helpful, never question your smalltalk skills (which is important if you're shy like me) and if they can't give you an answer on the spot, really do call you back. -- ____________________________________________________________________________ Ed Taychert Phone: USA (716) 381-7500 Entire Inc. UUCP: rochester!rocksanne!entire!elt 445 E. Commercial Street East Rochester, N.Y. 14445 _____________________________________________________________________________