I thought I would just ask this smalltalk list a couple of questions - I am new to smalltalk and this list has been highly recommended in solving most smalltalk problems - guess its because all of you are smalltalk gods or something... anyways... here it goes.
I have a record subclass declared as follows:
Object subclass: #RECORD - I have various methods for this.
I want to make an array of records - so its one array that stores of type records - which I have defined
I have tried the following:
OrderedCollection subclass: #People
- dont know what methods I need - do I have to have an initial 'instance creation'!
This does compile but it complains at the following:
Smalltalk at: #arecord put: (People new) !
Just complains about Object People - hangs.
All I need is a way of storing these records in an array. I could use ARRAY instead of OrderedCollection but I want a dynamic array.
If anyone knows how to do this - please can you get back in contact with me, I will add in all my own methods for my People subclass after I have the basic one working - so I can add records to it.
Thanks ever so much - and keep up the good work - people look up to you guys ya all know :-)
J
_________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
Hi James
I do not have the time to fully reply to your question. In short, a class is a factory of objects. The class describes the structure and behavior of the objects it produces. like a can factory machine produces cans.
Every object will share the behavior and structure describe by the class BUT each object will have its own private set of values.
I suggest you to read a book on Object-Oriented programming in Smalltalk. There is for example: http://brain.cs.uiuc.edu/VisualWorks/Joy+of+Smalltalk free and 700 pages ;)
The draft of the book of Mark Guzdial: http://www.cc.gatech.edu/~mark.guzdial/drafts/
Then you can find my lecture at: http://www.iam.unibe.ch/~ducasse/WebPages/Teaching.html#smalltalk
There is also a lot of tutorial available at: http://scgwiki.iam.unibe.ch:8080/SmalltalkWiki/25
Look at http://minnow.cc.gatech.edu/squeak.1 you will find other tutorial.
Have fun.
I finally received the French "Squeak" book by Stephane Ducasse and Xavier Briffault.
It's well presented, detailed, clear, great explanations and tons of tips and hints on dark corners of the language. It's a real pleasure to read! If all Eyrolles books are of that level of quality, I'll surely be a very regular buyer of their books!
I especially like the "mailing list" kind of server that is described there. One thing though, I can't find the smalltalk code of the book on the editor's web site (www.editions-eyrolles.com).
Ant hint where I could get it ?Stephane, �tes-vous l� ? :)
===== ------------------------- Benoit St-Jean bstjean@yahoo.com Yahoo! Messenger: bstjean http://cactus.swiki.net -------------------------
__________________________________________________ Do You Yahoo!? Send FREE video emails in Yahoo! Mail! http://promo.yahoo.com/videomail/
squeak-dev@lists.squeakfoundation.org