Thanks again, Edgar.
But doesn't the constructorString output omit the scripts associated with the buttons and textMorphs?
Would I be correct in thinking that real Squeak developers must not use the interactive gui-building tools in Squeak because those tools don't produce results that can be easily packaged?
El 4/1/07 3:16 PM, "Andrew Dabrowski" dabrowsa@indiana.edu escribió:
Thanks for your reply to my last message. Now I have a follow-up question.
If I want to save my project as a .cs file, then I will have to convert my gui window (just a systemWindow with some buttons and textMorphs) into a proper class that shows up in the browser, correct? That is, my window was not coded, but put together interactively by dragging supplies out and using the viewer to attach scripts. Is there a way to convert the final product into a code format that can be exported in the .cs file?
In VisualWorks (which I am also looking at but have not worked with at all) there seems to be a way to do this: the InstallOnClass utility. Is there something comparable in Squeak?
Exist a kind of Morph to code, what sometimes lets you export code only.
Drag and drop the attached morph into your Squeak.
Open a Transcript whit World menu or via flaps.
Via halo, open a Inspector of the morph. In lower pane type : Transcript show: self constructorString "for seeing what is the code of the morph."
You should give: (((AlignmentMorph newBounds: (0@822 corner: 597@848) color: Color transparent) setBorderWidth: 1 borderColor: Color black) addAllMorphs: ((Array new: 7) at: 1 put: (((SimpleButtonMorph newBounds: (2@824 corner: 76@846) color: Color green) setBorderWidth: 1 borderColor: (Color r: 0.36 g: 0.719 b: 0.541)) addAllMorphs: (Array with: ((StringMorph newBounds: (6@828 corner: 73@843) color: Color black) contents: 'workspace'))); at: 2 put: (((SimpleButtonMorph newBounds: (76@824 corner: 146@846) color: Color yellow) setBorderWidth: 1 borderColor: (Color r: 0.36 g: 0.719 b: 0.541)) addAllMorphs: (Array with: ((StringMorph newBounds: (80@828 corner: 143@843) color: Color black) contents: 'transcript'))); at: 3 put: (((SimpleButtonMorph newBounds: (146@824 corner: 205@846) color: Color orange) setBorderWidth: 1 borderColor: (Color r: 0.36 g: 0.719 b: 0.541)) addAllMorphs: (Array with: ((StringMorph newBounds: (149@828 corner: 201@843) color: Color black) contents: 'browser'))); at: 4 put: (((SimpleButtonMorph newBounds: (205@824 corner: 332@846) color: Color red) setBorderWidth: 1 borderColor: (Color r: 0.36 g: 0.719 b: 0.541)) addAllMorphs: (Array with: ((StringMorph newBounds: (208@828 corner: 328@843) color: Color black) contents: 'dual change sorter'))); at: 5 put: (((SimpleButtonMorph newBounds: (332@824 corner: 385@846) color: (Color r: 0.645 g: 0.0 b: 0.968)) setBorderWidth: 1 borderColor: (Color r: 0.36 g: 0.719 b: 0.541)) addAllMorphs: (Array with: ((StringMorph newBounds: (335@828 corner: 381@843) color: Color black) contents: 'file list'))); at: 6 put: (((SimpleButtonMorph newBounds: (385@824 corner: 490@846) color: (Color r: 0.323 g: 1.0 b: 0.613)) setBorderWidth: 1 borderColor: (Color r: 0.36 g: 0.719 b: 0.541)) addAllMorphs: (Array with: ((StringMorph newBounds: (388@828 corner: 486@843) color: Color black) contents: 'message names'))); at: 7 put: (((SimpleButtonMorph newBounds: (490@824 corner: 595@846) color: (Color r: 0.323 g: 1.0 b: 0.613)) setBorderWidth: 1 borderColor: (Color r: 0.36 g: 0.719 b: 0.541)) addAllMorphs: (Array with: ((StringMorph newBounds: (493@828 corner: 591@843) color: Color black) contents: 'archive viewer'))); yourself))
Before you ask, the transcript button need be "reinitialized" when go to new image. For doing that, via halo select the button (you need two clicks, one for the AlignmentMorph and the second for the button, this way you could see Morphs inside Morphs and act via Inspector) In the code pane of Inspector type select target as you see in pict. Type again Transcript and do alt s or command s (for aceppting the change). Presto, now you have the button working .
I hope you know now what could export only a morph and not a complete .pr ....
Next question ? :=)
Cheers
Edgar
Hello Andrew,
AD> Would I be correct in thinking that real Squeak developers must not use AD> the interactive gui-building tools in Squeak because those tools don't AD> produce results that can be easily packaged?
that depends what you mean by packaged.
I packaged means an application you will just deliver an image with the gui set up the way you want it. Nobody cares how you built that gui.
Personally I start with interactively building a gui (often only a proposal of a gui) and then I switch to code.
But then, Am I a real Squeak developer? :-))
Cheers
Herbert mailto:herbertkoenig@gmx.net
El 4/1/07 8:15 PM, "Andrew Dabrowski" dabrowsa@indiana.edu escribió:
But doesn't the constructorString output omit the scripts associated with the buttons and textMorphs?
Well, Squeak is a child of only ten, don't knows all. So you must teach what you wish it learn.
Would I be correct in thinking that real Squeak developers must not use the interactive gui-building tools in Squeak because those tools don't produce results that can be easily packaged?
As Herbert said, I don't was a real Squeaker. If you made a "app" , I also said do your complete suited to needs image. But if you do some for same share and use, repeat what IMHO the .sar way is how. And when you get your own morphs, export for load
At ftp://elpelotero:elpelotero@200.127.188.175.cab.prima.net.ar/Public/ could log to this Mac.
You have several complete hand made images from different times, all semi opened and in Public/SqueakLight/3.9Compatible/
you could see the .sar what loads in 3.9 (for you see the technique)
The Mac is fast, the cable modem is sloooooow ( socks )
(on approximate 09:00 to 20:00 GMT, dig and take what you like, at your own risk)
El 4/1/07 8:15 PM, "Andrew Dabrowski" dabrowsa@indiana.edu escribió:
For last, you could have "intelligent Morph" as what I attach. When you drag and drop, it have the code inside what is not in your image. That way you don't care about other's people image, this should load. Before I send, I try this old SqueakLight thing into the 3.10 alpha. No problem, I could see my in use change set name (useful for not so novices, is easy add code and you discover what was in the wrong .cs later) and mouse coordinates
beginners@lists.squeakfoundation.org