Hi Eliot,

One could say that a pragma is a message without a method?

I think pragmas were never been integrated properly into the system
browser. We can browses pragmas with the PragmaCollection but what I
mean is a pragma-aware browser. See for example, there are some
pragmas where is easy to infer the meaning: <magritteDescription>,
<gtInspectorPresentationOrder:>, and others <eProperty> where is not
so clear. So even if we take <gtInspectorPresentationOrder:> is not
easy with the current tools to find of which parameters makes sense. I
always missed something like the annotation pane plugin or the quality
assistant plugin in Nautilus, but for pragmas.

This could be an excellent opportunity for Calypso to see how pragmas
can be exploited in the way you describe.

Thanks for the kind explanation.

Cheers,

Hernán


2018-02-12 1:09 GMT-03:00 Eliot Miranda <eliot.mira...@gmail.com>:
> Hi Hernan,
>
>
>
>
> _,,,^..^,,,_ (phone)
>> On Feb 11, 2018, at 10:47 AM, Hernán Morales Durand 
>> <hernan.mora...@gmail.com> wrote:
>>
>> I don't know, but how you you find documentation about specific pragmas?
>
> The best way is to ensure the pragma has at least one implementation, i.e. 
> there is at least one method in the system that has the same signature as the 
> pragma.  This implementation should document the pragma, but even better it 
> should be the method that extracts information from the pragma.
>
> An example will help.  Imagine a pragma that specifies a method belongs on 
> some menu.  The method containing the pragma is intended to be an action of 
> the menu, do that when the menu item is selected, the method containing the 
> pragma will b executed.  The pragma defines the menu the method belongs to, 
> where in the method, the string to appear in the menu, the hot key for the 
> menu item, etc.
>
> If the pragma is implemented by a menu builder then
> - yes, certainly the pragma can be documented in the m by builder's 
> implementation, but also
> - the menu can be built by performing the pragma by the menu builder
>
> This was my intent when Steve Dahl and I invented pragmas, that there would 
> always be implementations of the pragma in classes that were designed to 
> extract the information from the pragma and add the method containing the 
> pragma to whatever structure the pragma was intended to facilitate updating 
> (menus, inspectors, exported apis, etc).  So the most powerful way of use my 
> pragmas is via a visitor pattern:
>
> When a method with a particular pragma is added or removed, the class 
> containing the method triggers some action.  This action collects all the 
> relevant pragma methods in the class hierarchy, creates some builder object, 
> and has the builder perform each method containing a relevant pragma.
>
> Using pragmas as arbitrary labels is fine, bug doesn't exploit the fact that 
> pragmas are messages, and that hence one can do senders and implementors 
> /and/ perform them.
>
> HTH
>
>>
>> Hernán
>>
>>
>> 2018-02-11 14:48 GMT-03:00 Stephane Ducasse <stepharo.s...@gmail.com>:
>>> Hi
>>>
>>> what is this pragma in metaclass method?
>>>
>>> Stef
>>>
>>
>

Reply via email to