[Newbies] Mophic scripts tiles vs textual code
bert at freudenbergs.de
Mon Jun 4 15:37:32 UTC 2007
On Jun 4, 2007, at 16:47 , subbukk wrote:
> On Monday 04 June 2007 4:40 pm, Bert Freudenberg wrote:
>> Now that only works for morphs that actually *have* a player, that
>> is, the morphs that are scripted.
> I noticed that the 'debug' button has new entries for player the
> moment I open
> a player on that morph, even before I start creating scripts. Is it
> the action tiles (like make sound) are really scripts?
No, an "UnscriptedPlayer" is created on the fly if you ask a morph
for its #assuredPlayer, which is used to construct the viewer. As
soon as you add a script it becomes an actual Player.
So my wording was incorrect, there are unscripted players, too.
>> To reference any morph (and we're leaving the Etoys world with this)
>> is to enable the "create textual references to dropped morphs" option
>> in the Workspace's menu next to its close button.
> What a hidden gem! BTW, what are the numbers suffixing the name?
> Are they
> related to its oop?
Not directly, it's the object's identityHash. Due to Squeak's direct-
pointer object model, the oop changes on GC, while the identityHash
does not. It's stored in the object header, unfortunately with 12
bits only due to size constraints. Historically (when there still was
an object table) I believe this actually has been the object's oop
(the primitive is still named primitiveAsOop).
- Bert -
More information about the Beginners