Home > Archive > Smalltalk > April 2004 > [VW] How to trap Ctrl-Y ?
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
[VW] How to trap Ctrl-Y ?
|
|
| Martial Tarizzo 2004-04-27, 10:54 am |
| Hello,
I packed a little app as a single image file with the runtime packager,
it runs fine on my XP box.
When I hit Ctrl-Y, a small empty modal dialog appears, and no more
interaction with the program is permitted => I have to kill the process
!
The same behavior can be observed with the Install.im from the Cincom CD.
Examinating Error.log (see below), It seems possible to trap the key at
the window level.
As I am new to SmallTalk and VW, what is the best solution to this
problem ?
Thanks
Martial Tarizzo
------------------------------
<......stripped.......>
Initial Context Stack Arguments:
[1] UndefinedObject(Object)>>doesNotUnderstand:
Receiver: (id=1) nil
Arg1: (id=5757) a Message with selector: #interruptActiveUserProcess
and arguments: #()
[2] EventSensor>>keyAt:character:alternative:down:
Receiver: (id=15882) an EventSensor
Arg1: (id=512) 512
Arg2: (id=25) $ "16r0019"
Arg3: (id=1) nil
Arg4: (id=3) true
[3] EventSensor>>eventKeyPress:
Receiver: (id=15882) an EventSensor
Arg1: (id=12569) #(1 13 258 269 563 544 512 $ "16r0019" 10791557 an
UninterpretedBytes 0 nil ...
[5] ApplicationWindow(Object)>>ifNotNil:
Receiver: (id=1524) an ApplicationWindow 13
Arg1: (id=9256) BlockClosure [] in InputState>>send:eventKeyPress:
[6] InputState>>send:eventKeyPress:
Receiver: (id=2997) an InputState
Arg1: (id=1524) an ApplicationWindow 13
Arg2: (id=12569) #(1 13 258 269 563 544 512 $ "16r0019" 10791557 an
UninterpretedBytes 0 nil ...
[7] InputState>>process:
Receiver: (id=2997) an InputState
Arg1: (id=12569) #(1 13 258 269 563 544 512 $ "16r0019" 10791557 an
UninterpretedBytes 0 nil ...
[8] InputState>>run
Receiver: (id=2997) an InputState
[10] BlockClosure>>on:do:
Receiver: (id=12322) BlockClosure [] in InputState class>>install
Arg1: (id=3873) TerminateException
Arg2: (id=14659) BlockClosure [] in [] in Process class>>
forBlock:priority:
........................
| |
| Steven Kelly 2004-04-29, 8:38 am |
| The problem is that stripping removed part of the PDP debugger, but not all
of it. If you look in your development image at
EventSensor>>keyAt:character:alternative:down:, you'll see it sends
"DebuggerService interruptActiveUserProcess". The RuntimePackager has
removed DebuggerService, but not the PDP override of the
keyAt:character:alternative:down: message, which refers to DebuggerService.
You probably don't want the PDP Debugger, or indeed the EmergencyWindow
called by Ctrl+Shift+Y in the same method, so one solution is just to edit
EventSensor>>keyAt:character:alternative:down: to do what you want, e.g.
remove the (aCharacter = self state class interruptKeyValue...) test and
just leave the contents of its ifFalse: block. You could also completely
remove the tests and blocks for #allProcessInterruptMatchesCharacter: and
warpToLauncherMatchesCharacter:.
If you need more info about the interaction between Runtime Packager and
PDP, let us know what version of VW you're using.
HTH,
Steve
"Martial Tarizzo" <tarizzo@metz.supelec_S_P_A_M_.fr> wrote in message
news:Xns94D8A29C3AB23tarizzoesemetzfr@19
3.252.19.141...
> Hello,
>
> I packed a little app as a single image file with the runtime packager,
> it runs fine on my XP box.
> When I hit Ctrl-Y, a small empty modal dialog appears, and no more
> interaction with the program is permitted => I have to kill the process
> !
> The same behavior can be observed with the Install.im from the Cincom CD.
>
> Examinating Error.log (see below), It seems possible to trap the key at
> the window level.
>
> As I am new to SmallTalk and VW, what is the best solution to this
> problem ?
>
> Thanks
>
> Martial Tarizzo
>
>
> ------------------------------
> <......stripped.......>
> Initial Context Stack Arguments:
> [1] UndefinedObject(Object)>>doesNotUnderstand:
> Receiver: (id=1) nil
> Arg1: (id=5757) a Message with selector: #interruptActiveUserProcess
> and arguments: #()
> [2] EventSensor>>keyAt:character:alternative:down:
> Receiver: (id=15882) an EventSensor
> Arg1: (id=512) 512
> Arg2: (id=25) $ "16r0019"
> Arg3: (id=1) nil
> Arg4: (id=3) true
> [3] EventSensor>>eventKeyPress:
> Receiver: (id=15882) an EventSensor
> Arg1: (id=12569) #(1 13 258 269 563 544 512 $ "16r0019" 10791557 an
> UninterpretedBytes 0 nil ...
> [5] ApplicationWindow(Object)>>ifNotNil:
> Receiver: (id=1524) an ApplicationWindow 13
> Arg1: (id=9256) BlockClosure [] in InputState>>send:eventKeyPress:
> [6] InputState>>send:eventKeyPress:
> Receiver: (id=2997) an InputState
> Arg1: (id=1524) an ApplicationWindow 13
> Arg2: (id=12569) #(1 13 258 269 563 544 512 $ "16r0019" 10791557 an
> UninterpretedBytes 0 nil ...
> [7] InputState>>process:
> Receiver: (id=2997) an InputState
> Arg1: (id=12569) #(1 13 258 269 563 544 512 $ "16r0019" 10791557 an
> UninterpretedBytes 0 nil ...
> [8] InputState>>run
> Receiver: (id=2997) an InputState
> [10] BlockClosure>>on:do:
> Receiver: (id=12322) BlockClosure [] in InputState class>>install
> Arg1: (id=3873) TerminateException
> Arg2: (id=14659) BlockClosure [] in [] in Process class>>
> forBlock:priority:
> .......................
| |
| Martial Tarizzo 2004-04-29, 9:26 pm |
| Thank you very much for your help. I am running VW7.2nc.
I already noticed the call to DebuggerService in
EventSensor>>keyAt:character:alternative:down:
but I didn't like the idea of modifying a core object without knowing what
I am doing ;-)
Diving into the code from EventSensor>>allProcessInterruptMatchesCharacter:
aCharacter inTransition: isDownTransition , I founded some interestings
hooks in the system dealing with this problem : InputState class methods
categorized in 'key settings' and 'key settings launcher', maybe useful...
I have to investigate these tracks. Thanks again.
Martial Tarizzo
"Steven Kelly" <stevek@metacase.com> wrote in
news:Cl3kc.309$ns2.126@read3.inet.fi:
[color=darkred]
> The problem is that stripping removed part of the PDP debugger, but
> not all of it. If you look in your development image at
> EventSensor>>keyAt:character:alternative:down:, you'll see it sends
> "DebuggerService interruptActiveUserProcess". The RuntimePackager has
> removed DebuggerService, but not the PDP override of the
> keyAt:character:alternative:down: message, which refers to
> DebuggerService.
>
> You probably don't want the PDP Debugger, or indeed the
> EmergencyWindow called by Ctrl+Shift+Y in the same method, so one
> solution is just to edit
> EventSensor>>keyAt:character:alternative:down: to do what you want,
> e.g. remove the (aCharacter = self state class interruptKeyValue...)
> test and just leave the contents of its ifFalse: block. You could also
> completely remove the tests and blocks for
> #allProcessInterruptMatchesCharacter: and
> warpToLauncherMatchesCharacter:.
>
> If you need more info about the interaction between Runtime Packager
> and PDP, let us know what version of VW you're using.
>
> HTH,
> Steve
>
>
> "Martial Tarizzo" <tarizzo@metz.supelec_S_P_A_M_.fr> wrote in message
> news:Xns94D8A29C3AB23tarizzoesemetzfr@19
3.252.19.141...
|
|
|
|
|