Morph>>Delete
Avi Bryant
avi at beta4.com
Wed Aug 27 04:05:11 UTC 2003
On Tue, 26 Aug 2003, Aaron J Reichow wrote:
> How to fix it? Change "JeffsTestMorph delete." to "self delete." and you
> should be OK.
The mouseDown: method he's implementing is on a button, not on an instance
of JeffsTestMorph. So "self" is not, in fact, what he wants.
Jeff, try this to get started. In a workspace, evaluate each of these
lines in turn:
jeffInst := JeffsTestMorph new.
jeffInst openInWorld.
jeffInst delete.
You can see there that #delete needs to be sent to a variable which is
holding onto the particular instance of JeffsTestMorph that you created;
not to the JeffsTestMorph class.
The trick is that your button needs to have a way of accessing this same
instance.
> 2. The format for specifying a message is Class>>#message ; that is your
> message should have read Morph>>#delete.
Really? I use #delete to talk about the message, but Morph>>delete to
talk about a particular method.
More information about the Squeak-dev
mailing list
|