[vwnc] How could i process the enter-key in inputfield.

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

[vwnc] How could i process the enter-key in inputfield.

Kyung-Don Kim
Hi, All.
I have one question.
How could i process the enter-key in inputfield.

http://www.cincomsmalltalk.com/blog/blogView?showComments=true&printTitle=Smalltalk_Daily_10/13/08:_Keyboard_Handling_in_VW&entry=3401331882
<http://www.cincomsmalltalk.com/blog/blogView?showComments=true&printTitle=Smalltalk_Daily_10/13/08:_Keyboard_Handling_in_VW&entry=3401331882>

I followed that nevertheless my code doesn't work properly.
So, I compare two event 'Change' and 'D.Click' that are exist in
Notification tab.
D.Click works fine but it couldn't receive 'Change'.

My system is WinXP, VW7.6
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] How could i process the enter-key in inputfield.

Rob Vens-2
if you set continuousAccept to true, every character entered (not just
the enter key) should result in a message being sent to your
application model as defined in the change event. Make sure your
selector includes the colon (i.e. "characterEntered:" or something)

2009/10/18 Kim Kyung-Don <[hidden email]>:

> Hi, All.
> I have one question.
> How could i process the enter-key in inputfield.
>
> http://www.cincomsmalltalk.com/blog/blogView?showComments=true&printTitle=Smalltalk_Daily_10/13/08:_Keyboard_Handling_in_VW&entry=3401331882
> <http://www.cincomsmalltalk.com/blog/blogView?showComments=true&printTitle=Smalltalk_Daily_10/13/08:_Keyboard_Handling_in_VW&entry=3401331882>
>
> I followed that nevertheless my code doesn't work properly.
> So, I compare two event 'Change' and 'D.Click' that are exist in
> Notification tab.
> D.Click works fine but it couldn't receive 'Change'.
>
> My system is WinXP, VW7.6
> _______________________________________________
> vwnc mailing list
> [hidden email]
> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
>
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] How could i process the enter-key in inputfield.

Kyung-Don Kim
Yes, I checked it.
So weird, it receive the message when last one character is deleted by using backspace.


postOpenWith: aBuilder
    self state: 'WaitQuestion'.
    (self widgetAt: #InputField1) controller continuousAccept: true.
    ^super postOpenWith: aBuilder.


checkInput: controller
    controller model value first = Character cr
        ifTrue: [Dialog warn: 'ok']


...       
#(#{UI.InputFieldSpec}
                    #layout: #(#{Graphics.Rectangle} 7 119 194 141 )
                    #name: #InputField1
                    #model: #answer
                    #callbacksSpec:
                    #(#{UI.UIEventCallbackSubSpec}
                        #valueChangeSelector:
                        #checkInput:
...


2009/10/19 Rob Vens <[hidden email]>
if you set continuousAccept to true, every character entered (not just
the enter key) should result in a message being sent to your
application model as defined in the change event. Make sure your
selector includes the colon (i.e. "characterEntered:" or something)

2009/10/18 Kim Kyung-Don <[hidden email]>:
> Hi, All.
> I have one question.
> How could i process the enter-key in inputfield.
>
> http://www.cincomsmalltalk.com/blog/blogView?showComments=true&printTitle=Smalltalk_Daily_10/13/08:_Keyboard_Handling_in_VW&entry=3401331882
> <http://www.cincomsmalltalk.com/blog/blogView?showComments=true&printTitle=Smalltalk_Daily_10/13/08:_Keyboard_Handling_in_VW&entry=3401331882>
>
> I followed that nevertheless my code doesn't work properly.
> So, I compare two event 'Change' and 'D.Click' that are exist in
> Notification tab.
> D.Click works fine but it couldn't receive 'Change'.
>
> My system is WinXP, VW7.6
> _______________________________________________
> vwnc mailing list
> [hidden email]
> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
>


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc