Persisting 'applications'

Cowdery, Bob [UK] Bob.Cowdery at CGI-Europe.com
Thu Feb 23 21:19:51 UTC 2006


Chris

Sorry, but I am going to have to ask for help again. I can now manage
the lifetimes in the database and image. Although it took me a while to
get the process repeatable and figure out where all the references were.
However, it now works and connectors stay connected. Unfortunately now
that I am really retrieving from the database a retrieved app does not
work. At least none of the UI events work, but then I am using dynamic
techniques to hook everything together. I have a taken a simple case
which is one composite component with one button on it. The button fires
a block which references self in this case. However, self appears to be
nil. This is where it fails.

DoIt
	| t1 t2 t3 t4 t5 |
	super initialize.
	t2 := ImageMorph new.
	t3 := GraphicPath , 'sdr1000.gif'.
	t2
		setNewImageFrom: (Form fromFileNamed: t3).
	t1 := SDRButton
				newWithParams: 'Reset'
				actionSelector: #(#RESETHW )
				actionTarget: [:t6 | self buttonAction:
t6].
	self borderWidth: 2.
	self borderColor: #complexFramed.
	self color: Color gray.
	self addMorph: t2.
	self addMorph: t1.
	t4 := t2 extent.
	t5 := t1 extent.
	self extent: t4 x + t5 x + 8 @ (t4 y + 8)

MessageNotUnderstood Undefined object buttonAction. This method called
DoIt seems to be my Initialize method with the variables replaced with
generated names. GraphicPath refers to a pool dictionary which it also
can't resolve, don't know if that's relevant.

I have attached the file. The button is set up in the SDR1000Morph
Initialize. It is called through the block in the dictionary set up by
SDR1000Controller createServerInterfaceMap at #RESETHW.

I know this is a lot to ask. If it's not obvious what I need to do
please don't labour over it.

Thanks
Bob

*** Confidentiality Notice *** Proprietary/Confidential
Information belonging to CGI Group Inc. and its affiliates
may be contained in this message. If you are not a recipient
indicated or intended in this message (or responsible for
delivery of this message to such person), or you think for
any reason that this message may have been addressed to you
in error, you may not use or copy or deliver this message
to anyone else.  In such case, you should destroy this
message and are asked to notify the sender by reply email.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SDR-Control.st
Type: application/octet-stream
Size: 10743 bytes
Desc: SDR-Control.st
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20060223/d949f9da/SDR-Control.obj


More information about the Squeak-dev mailing list