<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p><font face="Georgia">your method would need to display it after
building it -- look at #putUpWorldMenu: for the missing bits</font><br>
</p>
<br>
<div class="moz-cite-prefix">On 2/24/18 12:18 PM, H. Hirzel wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAGQxfVhfEN+hMgwe_N4gBgR6BOhcfOZnY3hZUt_GAizy3PRvWg@mail.gmail.com">
<pre wrap="">On 2/24/18, Bob Arning <a class="moz-txt-link-rfc2396E" href="mailto:arning315@comcast.net"><arning315@comcast.net></a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Or you could...
World on: #mouseDown send: #putUpSomeOtherMenu: to: World
</pre>
</blockquote>
<pre wrap="">
This would be a better solution since it does involve adding a method
but not changing a method of the base image.
I tested it with adding #buildWorldMenu4: to PasteUpMorph
buildWorldMenu4: evt
|project |
project := self project ifNil: [Project current] "mvc??".
^(TheWorldMenu4 new
world: self
project: project
hand: evt hand) buildWorldMenu.
I executed
World on: #mouseDown send: #putUpSomeOtherMenu: to: World
But the new world menu did not come up.
So far
<a class="moz-txt-link-freetext" href="http://wiki.squeak.org/squeak/1047">http://wiki.squeak.org/squeak/1047</a>
is the working solution I found for customizing the red button [1] menu
--Hannes
[1] Red button -- <a class="moz-txt-link-freetext" href="http://wiki.squeak.org/squeak/1904">http://wiki.squeak.org/squeak/1904</a> - usually the
left mouse button.
</pre>
<blockquote type="cite">
<pre wrap="">
On 2/24/18 9:05 AM, H. Hirzel wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Yes, implementation is easy but my question is how it should be done
in a way that conforms to the intention of the framework code. A
"recommended good solution".
What about using a project preference?
It needs the method PasteUpMorph buildWorldMenu: evt from May 2000
buildWorldMenu: evt
^(TheWorldMenu new
world: self
project: (self project ifNil: [Project current]) "mvc??"
hand: evt hand) buildWorldMenu.
to be replaced with
buildWorldMenu: evt
|project worldMenuClassSymbol|
project := self project ifNil: [Project current] "mvc??".
worldMenuClassSymbol := project
projectPreferenceFlagDictionary at:
#worldMenuClassSymbol ifAbsent: [#TheWorldMenu].
^((Smalltalk at: worldMenuClassSymbol) new
world: self
project: project
hand: evt hand) buildWorldMenu.
Detailed description: <a class="moz-txt-link-freetext" href="http://wiki.squeak.org/squeak/1047">http://wiki.squeak.org/squeak/1047</a>
</pre>
</blockquote>
<pre wrap="">
</pre>
</blockquote>
<pre wrap="">
</pre>
</blockquote>
<br>
</body>
</html>