<br><br><div class="gmail_quote">On Mon, Apr 26, 2010 at 5:26 AM, Nicolas Cellier <span dir="ltr">&lt;<a href="mailto:nicolas.cellier.aka.nice@gmail.com">nicolas.cellier.aka.nice@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
2010/4/26 Hannes Hirzel &lt;<a href="mailto:hannes.hirzel@gmail.com">hannes.hirzel@gmail.com</a>&gt;:<br>
<div class="im">&gt; Thank you for the explanations. In particular reading the comment in<br>
&gt; the Pragma class was helpful. I feel now much more comfortable with<br>
&gt; the idea of using them. However I still think they are more related to<br>
&gt; VM primitives and configuration issues. The menu is a GUI related<br>
&gt; thing and having a MenuSpec feels somewhat more natural....<br>
&gt;<br>
&gt; --Hannes<br>
&gt;<br>
&gt; P.S. There are currently 854 methods which have a pragma in them.<br>
&gt;<br>
<br>
</div>That&#39;s why we should name them (Method) Annotation rather than Pragma...<br></blockquote><div><br></div><div>OK, so Pragma is bad; its historical from &quot;primitive pragma&quot;.  But Annotation doesn&#39;t capture the potentially executable flavour of pragmas.  How about MethodMetaMessage?  (mmm, yum :) )  We could talk about meta-messages for short.  &quot;Add a meta-message that does ...&quot; etc...</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<font color="#888888"><br>
Nicolas<br>
</font><div><div></div><div class="h5"><br>
&gt; On 4/26/10, Levente Uzonyi &lt;<a href="mailto:leves@elte.hu">leves@elte.hu</a>&gt; wrote:<br>
&gt;&gt; On Mon, 26 Apr 2010, Hannes Hirzel wrote:<br>
&gt;&gt;<br>
&gt;&gt;&gt; Hello Philipp<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; I took a fresh 4.1 image, updated it to 10012, and loaded<br>
&gt;&gt;&gt; Morphic-phite.429.mcz.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; As the comments were fine I was quickly able to write an example (code<br>
&gt;&gt;&gt; below).<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Then I had to choose &#39;Rebuild menus&#39;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; It worked fine.<br>
&gt;&gt;&gt; The question is now (see another thread by Bert) if we should go or<br>
&gt;&gt;&gt; your solution (MenuSpec based) or the one by Steve Wessels (Pragma<br>
&gt;&gt;&gt; based).<br>
&gt;&gt;<br>
&gt;&gt; It&#39;s Balázs Kósi who implemented the registration method with pragmas<br>
&gt;&gt; (<a href="http://lists.squeakfoundation.org/pipermail/squeak-dev/2010-April/149534.html" target="_blank">http://lists.squeakfoundation.org/pipermail/squeak-dev/2010-April/149534.html</a><br>
&gt;&gt; ).<br>
&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; I do not feel too comfortable with pragmas yet whereas the MenuSpec is<br>
&gt;&gt;&gt; something I easily understand. And in addition I have the gut feeling<br>
&gt;&gt;&gt; that pragmas are meant for some more basic things (a kind of compiler<br>
&gt;&gt;&gt; directive, see <a href="http://en.wikipedia.org/wiki/Directive_%28programming%29" target="_blank">http://en.wikipedia.org/wiki/Directive_%28programming%29</a>)<br>
&gt;&gt;<br>
&gt;&gt; Pragmas in Squeak are not directives (though they can be used as<br>
&gt;&gt; directives) but a way to add metadata to a method. So the wikipedia page<br>
&gt;&gt; is irrelevant. If take a look at the class comment of Pragma, you&#39;ll<br>
&gt;&gt; feel more comfortable with them.<br>
&gt;&gt; (I think that we should convert all preferences to pragma-style. It could<br>
&gt;&gt; be a goal for 4.2.)<br>
&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Like Bert  I would like to see some discussion **on this issue, but<br>
&gt;&gt;&gt; not too along as I would like to start using this feature asap.<br>
&gt;&gt;<br>
&gt;&gt; We should review both methods, consider the benefits and<br>
&gt;&gt; drawbacks and then make a decision.<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; Levente<br>
&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Hannes<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; ** The thread started by Bert at<br>
&gt;&gt;&gt; <a href="http://lists.squeakfoundation.org/pipermail/squeak-dev/2010-April/149563.html" target="_blank">http://lists.squeakfoundation.org/pipermail/squeak-dev/2010-April/149563.html</a><br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; -----------------------<br>
&gt;&gt;&gt; Model subclass: #MyReallyNiceApplication<br>
&gt;&gt;&gt;      instanceVariableNames: &#39;&#39;<br>
&gt;&gt;&gt;      classVariableNames: &#39;&#39;<br>
&gt;&gt;&gt;      poolDictionaries: &#39;&#39;<br>
&gt;&gt;&gt;      category: &#39;MyMenuTests&#39;!<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; &quot;-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- &quot;!<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; MyReallyNiceApplication class<br>
&gt;&gt;&gt;      instanceVariableNames: &#39;&#39;!<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; !MyReallyNiceApplication class methodsFor: &#39;as yet unclassified&#39;<br>
&gt;&gt;&gt; stamp: &#39;hjh 4/26/2010 08:52&#39;!<br>
&gt;&gt;&gt; menuEntrySpecification<br>
&gt;&gt;&gt;      &quot;Test to add another entyr in the Help menu&quot;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; ^MenuEntrySpec newForDockingBarFrom: (Dictionary newFromPairs: #(<br>
&gt;&gt;&gt;              #contents &#39;Hello?&#39;<br>
&gt;&gt;&gt;              #location #(&#39;Help&#39; &#39;a subMenu&#39; &#39;another subMenu&#39;)<br>
&gt;&gt;&gt;              #target MenuMorph #selector #inform: #arguments #(&#39;Hello World!!&#39;)<br>
&gt;&gt;&gt;              ))<br>
&gt;&gt;&gt; ! !<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;<br>
&gt;<br>
<br>
</div></div></blockquote></div><br>