Hi Markus,

this is probably not how it should be done, but to get the last keystroke I 
have been doing the following:

World activeHand instVarNamed: #lastKeyScanCode

If you find a cleaner way I’d be grateful if you can share it.

> On Jun 10, 2015, at 18:50, Markus Schlager <m....@gmx.de> wrote:
> 
> Hi,
> 
> I'm using pharo to teach smalltalk as first 'real' programming language at 
> school. With older versions of pharo I was glad that my pupils could track 
> keystrokes so easily by evaluating
> 
>       World lastKeystroke.
> 
> With Pharo3.0/4.0 this only returns '<down>' independently of any keys I'm 
> typing.
> 
>       f := PasteUpMorph new openInWorld.
>       f takeKeyBoardFocus.
>       f lastKeystroke.
> 
> Is returning the empty string.
> 
> Hence, my question: Is lastKeystroke broken, or how is it meant to be used 
> now?
> 
> Second problem: In older versions of pharo this would work:
> 
>       f := PasteUpMorph new openInWorld.
>       b := EllipseMorph new.
>       b openInWorld: f.
> 
> But with Pharo 3.0/4.0 the last line raises an error:
> 
>       MessageNotUnderstood: PasteUpMorph>>startSteppingSubmorphsOf
> 
> With
> 
>       f := WorldMorph new openInWorld.
>       b := EllipseMorph new.
>       b openInWorld: f.
> 
> pharo freezes.
> 
> So: How is openInWorld: meant to be used?
> 
> Markus
> 
> 
> 



---> Save our in-boxes! http://emailcharter.org <---

Johan Fabry   -   http://pleiad.cl/~jfabry
PLEIAD lab  -  Computer Science Department (DCC)  -  University of Chile


Reply via email to