[Newbies] Advice for design of simple program.

Blake blake at kingdomrpg.com
Thu Mar 22 04:08:30 UTC 2007


Hello, all:

	I'm working on a number of Squeak projects but another project has come  
up that I think Squeak would be perfect for and I think I'm best off using  
a mix of the different approaches of Squeak.

	The simplicty of the program is a source list of items that can be  
dragged and dropped into one of a number of baskets elsewhere on the  
field. The items have a point value and each basket shows how many points  
it has. Source items are templates, containing activities like "walk the  
dog" or "fly a kit", so the dragging process creates an instance to be  
dropped into a basket.

	So far, my main Squeak successes have been greatest when using straight  
code. I've been somewhat successful doing some EToys stuff and this looks  
like a situation where it would make sense to mix pre-fabbed morphs with  
code.

	First of all, I find myself confused because I had thought Etoys weren't  
in the latest Squeak (I'm using squeak dev image 93). Isn't Etoys the  
tile-based-viewer-with-scripts thing? 'cause I still have those. But  
beyond that:

	My plan for the source was to populate a TabbedPalette with image+label  
morphs (you know, so an item would have a picture of a dog with the text  
walk-the-dog underneath). The "baskets" would be image+label+number (so, a  
picture with a name and a score). The basket's would have the ability to  
accept a dragged image+label morph. Ultimately, I also need a mechanism  
for the user to add items to the TabbedPalette.

	I pull out a tabbed palette and rename the two starter tabs and try to  
add a third. I can't find any way in any menu or inspector to add another  
tab. I actually end up pulling the inspector for the IndexTab object and  
calling "AddTab". This gives me a tab named "Flash" and the renaming trick  
I used for the other tabs doesn't work, so I end up bringing the inspector  
up for that and changing the name that way.

	Then I put an image up and I don't see any way to change the image. I'm  
sure I can do it through the inspector but I'm beginning to wonder if I'm  
missing something obvious here. Maybe I shouldn't try to incorporate the  
object palettes and just code everything in the usual way.

	Thoughts?


More information about the Beginners mailing list