On 12 July 2011 02:04, Guillermo Polito <[email protected]> wrote:
>
>
> On Mon, Jul 11, 2011 at 6:24 PM, Tudor Girba <[email protected]> wrote:
>>
>> Hi,
>>
>> I wanted to play with Keymappings, but I got stuck right at the start :).
>>
>> I have two problems:
>>
>> 1. I would like to add a simple shortcut (e.g., "$o command") to a text
>> morph instance. So I have:
>>
>> textMorph := TextMorph new contents: 'abcdefgh'.
>> "what is the magic invocation here ?"
>> textMorph openInWindow
>
> The shortcuts are defined via the keymapping pragma.  A shortcut is attached
> by now to a particular class and not just an instance.  Look at the examples
> (the ones defined by Camillo, Laurent or me) and tell me if they are
> understandable, hehe.
>
>>
>> The question is what should I write in the second line?
>
> Nothing.  Keymappings are "static" right now.
>
>>
>> 2. I would like to disable existing shortcuts from the text morph. How
>> should I do that?
>
> Look at where the shortcuts are defined for TextMorph and remove the
> declarations.  And you shold also reset the KMRepository.
>
> But removing keymapping declarations doesn't guarantee the removal in
> TextMorph since the default -old- shortcut handling is still there.
> Keymapping is just intercepting them by now.
>
ouch, we definitely need to clean that mess :)

> Hope this helps,
> Guille
>
>>
>> Cheers,
>> Doru
>>
>> --
>> www.tudorgirba.com
>>
>> "What we can governs what we wish."
>>
>>
>>
>
>



-- 
Best regards,
Igor Stasenko AKA sig.

Reply via email to