Re: [Pharo-users] World lastKeystroke and openInWorld: aPasteUpMorph

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: [Pharo-users] World lastKeystroke and openInWorld: aPasteUpMorph

Nicolai Hess


2015-06-11 10:58 GMT+02:00 Markus Schlager <[hidden email]>:
issues opened

I added a fix for the broken lastkeystroke,but this will only work for the ActiveWorld/PasteUpMorph, not for any other
PasteUpMorph.

With the split of PasteUpMorph in PasteUpMorph and WorldMorph, and the change of keystroke handling (KMDispatcher), there is more to do to make this
fully work again - but I don't want to reintroduce the old keyevent
handling just to make this work again.

I would like to remove all the keystroke handling from PasteUpMorph/WorldMorph
and use only KMDispatcher.

Maybe there is another(new) way to make this "lastKeystroke"-demo?
You can open  a transcript and enable the KMLog
(KMLog setDebug. Transcript open)
It will log all(!) keyevents and print the matching keymapping actions.
Or something like this:
|m|
m
:= Morph new.
m openInWorld
.
m takeKeyboardFocus
.
m on
:($r ctrl) do:[ m color:Color red].
m on
:($g ctrl) do:[ m color:Color green].
m on
:($b ctrl) do:[ m color:Color blue].

This will open a morph that changes its color on ctrl+r/g/b
So, maybe we can remove the whole "lastKeystroke" handling and make demos/examples
like the above one?



 

Markus


Reply | Threaded
Open this post in threaded view
|

Re: [Pharo-users] World lastKeystroke and openInWorld: aPasteUpMorph

stepharo


Le 16/6/15 00:34, Nicolai Hess a écrit :


2015-06-11 10:58 GMT+02:00 Markus Schlager <[hidden email]>:
issues opened

I added a fix for the broken lastkeystroke,but this will only work for the ActiveWorld/PasteUpMorph, not for any other
PasteUpMorph.

With the split of PasteUpMorph in PasteUpMorph and WorldMorph, and the change of keystroke handling (KMDispatcher), there is more to do to make this
fully work again - but I don't want to reintroduce the old keyevent
handling just to make this work again.

I would like to remove all the keystroke handling from PasteUpMorph/WorldMorph
and use only KMDispatcher.

Yessssss


Maybe there is another(new) way to make this "lastKeystroke"-demo?
You can open  a transcript and enable the KMLog
(KMLog setDebug. Transcript open)

Yes I do not see why the event handling would have to do something special.
It will log all(!) keyevents and print the matching keymapping actions.

Or something like this:
|m|
m := Morph new.
m openInWorld.
m takeKeyboardFocus.
m on:($r ctrl) do:[ m color:Color red].
m on:($g ctrl) do:[ m color:Color green].
m on:($b ctrl) do:[ m color:Color blue].

This will open a morph that changes its color on ctrl+r/g/b
So, maybe we can remove the whole "lastKeystroke" handling and make demos/examples
like the above one?
Yes :)





 

Markus