[Newbies] Advice for design of simple program.

Edgar J. De Cleene edgardec2001 at yahoo.com.ar
Thu Mar 22 10:01:39 UTC 2007




El 3/22/07 1:08 AM, "Blake" <blake at kingdomrpg.com> escribió:

> 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?
Etoys is on 3.10 alpha, but plan is what we unload once I have time to
complete the Monticello load again stuff and have approved by Ralph.
So , Etoys works as always , if not send mail.

>     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?

What I do if must cook your spec:
Subclass ImageMorph

ImageMorph subclass: #BlakeMorph
instanceVariableNames: 'label number '
classVariableNames: ''
poolDictionaries: ''
category: 'BlakeStuff'

initialize
super initialize.
self image: Form fromFileNamed: "your path here or could use FillInTheBlank
for choose files"
self isPartsBin.
self openInHand

Subclass TrashCanMorph

TrashCanMorph subclass: #BlakeTrashCanMorph
    instanceVariableNames: ''
    classVariableNames: ''
    poolDictionaries: ''
    category: ' BlakeStuff'

acceptDroppingMorph: aMorph event:  evt
 ActiveWorld submorphs copy do: [:each | (each class  == BlakeMorph )
ifTrue: [each doSome]].


And you should implement what doSome is in your morph.

Hope this help

Use 3.10alpha http://ftp.squeak.org/3.10alpha/Squeak3.10alpha.7069.zip , so
I have first class feedback of problems and could help more if you need.

Or if you have a regular 3.9 final 7067, do a backup and try the load
updates button for convert your 3.9 to 3.10.
First update read the warning, you must save the image for what could load
3.10 specific stuff.
In the second step, answer no for do not deleting your porjects and in the
time of a coffe you have a 3.10 all green image :=)
Edgar






	

	
		
__________________________________________________ 
Preguntá. Respondé. Descubrí. 
Todo lo que querías saber, y lo que ni imaginabas, 
está en Yahoo! Respuestas (Beta). 
¡Probalo ya! 
http://www.yahoo.com.ar/respuestas 



More information about the Beginners mailing list