Home
Reading
Searching
Subscribe
Sponsors
Statistics
Posting
Contact
Spam
Lists
Links
About
Hosting
Filtering
Features Download
Marketing
Archives
FAQ
Blog
 
Gmane
From: David H. Shanabrook <dhshanab <at> acad.umass.edu>
Subject: Re: Mophic scripts tiles vs textual code
Newsgroups: gmane.comp.lang.smalltalk.squeak.beginners
Date: Monday 4th June 2007 10:51:43 UTC (over 9 years ago)
Thanks, this worked and helped.

So to extend this, and help my understanding, how do I refer to a  
morph in a workspace?  If I named the morph polyB, and I do something  
like "hide PolyB" in the workspace it asks about PolyB.


On 3 Jun 2007, at 14:26, Bert Freudenberg wrote:

> On Jun 3, 2007, at 19:50 , David H. Shanabrook wrote:
>
>> Hi.
>>
>> I am writing some simple morphic scripts.  It would be convenient  
>> to use smalltalk directly, so I toggle the script to directly  
>> enter the code.  But I am having problems, as it is not working.   
>> If I uses tiles to create a script and then toggle over to text  
>> mode, the script looks like this for script "showa":
>>
>> showa
>> 	self setX: PolyZb getX.
>> 	self setY: PolyZb getY.
>> 	self setHeading: PolyZb getHeading.
>> 	PolyZb hide.
>> 	self show
>>
>> I think when I type the script in directly it doesn't know how to  
>> reference PolyZb (a polygon object I created).
>
> You need to reference an object at least once in another object's  
> tile script to make it "known" to the scripting system (*). After  
> that, you can just type the name.
>
>> Any help?  How does this translation between morph object's name  
>> and the internal SmallTalk name happen?
>
> It's "Smalltalk", btw., with a lower-case "t".
>
> - Bert -
>
> (*) More precisely, #uniqueNameForReference must have been sent to  
> the object to put it into the global registry named "References".
>
 
CD: 3ms