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