Login  Register

Re: Menu creation and invocation

Posted by Fernando olivero-2 on Feb 18, 2011; 10:31am
URL: https://forum.world.st/Menu-creation-and-invocation-tp3311552p3312392.html

On Fri, Feb 18, 2011 at 10:40 AM, Henrik Johansen
<[hidden email]> wrote:

> On Feb 17, 2011, at 9:51 47PM, Alain Plantec wrote:
>
>> he he he.
>> thanks Fernando.
>> and really really happy that you find it useful.
>>
>> but is see maybe an issue here. It concerns the pragma keyword.
>> It is currently a global keyword.
>> Maybe one should also allow a way to specify where the pragma are to be collected.
>> maybe something like:
>>
>> MyMorph>>menuBuilder
>>       ^ (PragmaMenuBuilder localPragmaKeyword: 'tileMenu' model: self )
>>
>> notice the #localPragmaKeyword:model selector instead of #pragmaKeyword:model.
>> it would constraint the builder to only search pragma locally.
>> does it make sense to you ?
>>
>> Cheers
>> Alain
>
> Yes, searching the class only would be a good idea, I'd almost consider making it the default and rename #pragmaKeyword: to #globalPragmaKeyword:.
> It's faster, and in most cases it does what you need, also in the case where you want  extensibility (through extension methods, only risk is clashing names)
>
> Cheers,
> Henry
>

Hi, since i'm new to pragmas  could you please explain me the
diference between global and local searches.
I dont understand to whom the local and global context applies to,
when using #localPragmaKeyword:model: as oposed to
#pragmaKeyword:model:.

Fernando