El 4/1/07 3:16 PM, "Andrew Dabrowski" <[EMAIL PROTECTED]> 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: ([EMAIL PROTECTED] corner: [EMAIL PROTECTED]) color: Color transparent) setBorderWidth: 1 borderColor: Color black) addAllMorphs: ((Array new: 7) at: 1 put: (((SimpleButtonMorph newBounds: ([EMAIL PROTECTED] corner: [EMAIL PROTECTED]) color: Color green) setBorderWidth: 1 borderColor: (Color r: 0.36 g: 0.719 b: 0.541)) addAllMorphs: (Array with: ((StringMorph newBounds: ([EMAIL PROTECTED] corner: [EMAIL PROTECTED]) color: Color black) contents: 'workspace'))); at: 2 put: (((SimpleButtonMorph newBounds: ([EMAIL PROTECTED] corner: [EMAIL PROTECTED]) color: Color yellow) setBorderWidth: 1 borderColor: (Color r: 0.36 g: 0.719 b: 0.541)) addAllMorphs: (Array with: ((StringMorph newBounds: ([EMAIL PROTECTED] corner: [EMAIL PROTECTED]) color: Color black) contents: 'transcript'))); at: 3 put: (((SimpleButtonMorph newBounds: ([EMAIL PROTECTED] corner: [EMAIL PROTECTED]) color: Color orange) setBorderWidth: 1 borderColor: (Color r: 0.36 g: 0.719 b: 0.541)) addAllMorphs: (Array with: ((StringMorph newBounds: ([EMAIL PROTECTED] corner: [EMAIL PROTECTED]) color: Color black) contents: 'browser'))); at: 4 put: (((SimpleButtonMorph newBounds: ([EMAIL PROTECTED] corner: [EMAIL PROTECTED]) color: Color red) setBorderWidth: 1 borderColor: (Color r: 0.36 g: 0.719 b: 0.541)) addAllMorphs: (Array with: ((StringMorph newBounds: ([EMAIL PROTECTED] corner: [EMAIL PROTECTED]) color: Color black) contents: 'dual change sorter'))); at: 5 put: (((SimpleButtonMorph newBounds: ([EMAIL PROTECTED] corner: [EMAIL PROTECTED]) 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: ([EMAIL PROTECTED] corner: [EMAIL PROTECTED]) color: Color black) contents: 'file list'))); at: 6 put: (((SimpleButtonMorph newBounds: ([EMAIL PROTECTED] corner: [EMAIL PROTECTED]) 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: ([EMAIL PROTECTED] corner: [EMAIL PROTECTED]) color: Color black) contents: 'message names'))); at: 7 put: (((SimpleButtonMorph newBounds: ([EMAIL PROTECTED] corner: [EMAIL PROTECTED]) 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: ([EMAIL PROTECTED] corner: [EMAIL PROTECTED]) 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
Comandos.morph
Description: Binary data
Picture 1.png
Description: Binary data
_______________________________________________ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners