[Q] What is the right context for this?

Hernan Tylim htylim at yahoo.com.ar
Fri Mar 21 19:52:12 UTC 2003


[snip]
> 	Utilities evaluate: answer in: self to: nil.

> The "Utilities evaluate:" fails because when the answer string is
> evaluated, it has no clue of the instance variables or methods of the
> object that is responding to this "doModelMenu" method.  I think that
> there are probably other things wrong with the way that this is put
> together, like the way that I am trying to pass "thisWorld" to the
> evaluated phrases.  This all worked fine when I could just assume it
> was in THE World instead of trying to specify what world things are in.
>
> Any idea how I can straighten this out???

Hi,
	I've never used Utilities>>evaluate:in:to: so I don't think I can help you
with it but I would recommend you to use MenuMorph instead of SelectionMenu.
With it you won't be needing the #evaluate:in:to: method any more.

	For an example on MenuMorph look in Jacaranda the methods
Diagram>>invokeMenu: and Diagram>>addMenuOptionsTo:

	Another thing I would recommend you is the use of 'self pasteUpMorph'
instead of 'self owner' to refer to the inner pasteUpMorph container (which,
I suppose, is what you wanted)

Regards,
Hernan



More information about the Squeak-dev mailing list