[vwnc] Problem using arrow keys on dataset

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

[vwnc] Problem using arrow keys on dataset

Paul Baumann
Has this problem been fixed since VW 7.5?
 
The problem is that keyboard events update DataSet.selectionIndex but not DataSet.selectionChannel.value. Updating the selectionIndex inst var alone doesn't update the selectionChannel that nearly all code relies on for selection change notification. We use a lot of DataSets, so the problem is pervasive. People get accustomed to keyboard selections not working so they use the mouse. The problem is always there, but not noticed later due to behavior changes.
 
I worked around this problem long ago but the override has since been lost. Today I worked around it again and then found this message thread on the subject. This problem was posted on Mar 25, 2008 and at least one workaround was mentioned:
 
 
Here was my workaround from this morning:
 
DataSetView>>moveEditVerticallyBy: delta 
    ...
 nextIndex == nil ifTrue:
  [self moveSelectionIndex: delta.
  ^true].
 nextIndex == #changedIndex ifTrue: [
  "<New code here>"
  selectionChannel value: selectionIndex.
  "\<New code here>"
  ^true
 ].
 self editAt: nextIndex downcast: false.
 self triggerEvent: #cellGettingFocus.
 self topComponent keyboardProcessor currentConsumer: editor widget controller.
 ^true
 
I see that (as mentioned in the earlier thread) that #valueChange is being sent before selectionIndex is set; however that alone didn't help because a controller dispatcher was not declared anyway.  A simple workaround to set the selectionChannel value to the selectionIndex when #changedIndex. It seems odd that there are two ways to refer to the index position of the selection, but at least this keeps them in sync from keyboard events.
 
Paul Baumann 
 


This message may contain confidential information and is intended for specific recipients unless explicitly noted otherwise. If you have reason to believe you are not an intended recipient of this message, please delete it and notify the sender. This message may not represent the opinion of IntercontinentalExchange, Inc. (ICE), its subsidiaries or affiliates, and does not constitute a contract or guarantee. Unencrypted electronic mail is not secure and the recipient of this message is expected to provide safeguards from viruses and pursue alternate means of communication where privacy or a binding message is desired.

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] Problem using arrow keys on dataset

Paul Baumann
Forgot to mention...
 
MultiSelectionDataSetView.selectionChannel.value gets a collection instead of a single index.
 
MultiSelectionDataSetView>>moveEditVerticallyBy: delta
...
 nextIndex == #changedIndex ifTrue: [
  selectionChannel value: (Set with: selectionIndex).
  ^true
 ].
...
 
 
Paul Baumann 
 


From: Paul Baumann
Sent: Wednesday, March 11, 2009 12:04 PM
To: VWNC
Subject: [vwnc] Problem using arrow keys on dataset

Has this problem been fixed since VW 7.5?
 
The problem is that keyboard events update DataSet.selectionIndex but not DataSet.selectionChannel.value. Updating the selectionIndex inst var alone doesn't update the selectionChannel that nearly all code relies on for selection change notification. We use a lot of DataSets, so the problem is pervasive. People get accustomed to keyboard selections not working so they use the mouse. The problem is always there, but not noticed later due to behavior changes.
 
I worked around this problem long ago but the override has since been lost. Today I worked around it again and then found this message thread on the subject. This problem was posted on Mar 25, 2008 and at least one workaround was mentioned:
 
 
Here was my workaround from this morning:
 
DataSetView>>moveEditVerticallyBy: delta 
    ...
 nextIndex == nil ifTrue:
  [self moveSelectionIndex: delta.
  ^true].
 nextIndex == #changedIndex ifTrue: [
  "<New code here>"
  selectionChannel value: selectionIndex.
  "\<New code here>"
  ^true
 ].
 self editAt: nextIndex downcast: false.
 self triggerEvent: #cellGettingFocus.
 self topComponent keyboardProcessor currentConsumer: editor widget controller.
 ^true
 
I see that (as mentioned in the earlier thread) that #valueChange is being sent before selectionIndex is set; however that alone didn't help because a controller dispatcher was not declared anyway.  A simple workaround to set the selectionChannel value to the selectionIndex when #changedIndex. It seems odd that there are two ways to refer to the index position of the selection, but at least this keeps them in sync from keyboard events.
 
Paul Baumann 
 


This message may contain confidential information and is intended for specific recipients unless explicitly noted otherwise. If you have reason to believe you are not an intended recipient of this message, please delete it and notify the sender. This message may not represent the opinion of IntercontinentalExchange, Inc. (ICE), its subsidiaries or affiliates, and does not constitute a contract or guarantee. Unencrypted electronic mail is not secure and the recipient of this message is expected to provide safeguards from viruses and pursue alternate means of communication where privacy or a binding message is desired.

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] Problem using arrow keys on dataset

Charles Adams
Yeah, I went through this mess with Cincom in 407756 - DataSetView>>moveEditVerticallyBy:. [AR 55032].. The solution I got didn't work. I ended up fixing it myself.
 
Give me a minute to find it...
 
Charlie
----- Original Message -----
Sent: Wednesday, March 11, 2009 11:36 AM
Subject: Re: [vwnc] Problem using arrow keys on dataset

Forgot to mention...
 
MultiSelectionDataSetView.selectionChannel.value gets a collection instead of a single index.
 
MultiSelectionDataSetView>>moveEditVerticallyBy: delta
...
 nextIndex == #changedIndex ifTrue: [
  selectionChannel value: (Set with: selectionIndex).
  ^true
 ].
...
 
 
Paul Baumann 
 


From: Paul Baumann
Sent: Wednesday, March 11, 2009 12:04 PM
To: VWNC
Subject: [vwnc] Problem using arrow keys on dataset

Has this problem been fixed since VW 7.5?
 
The problem is that keyboard events update DataSet.selectionIndex but not DataSet.selectionChannel.value. Updating the selectionIndex inst var alone doesn't update the selectionChannel that nearly all code relies on for selection change notification. We use a lot of DataSets, so the problem is pervasive. People get accustomed to keyboard selections not working so they use the mouse. The problem is always there, but not noticed later due to behavior changes.
 
I worked around this problem long ago but the override has since been lost. Today I worked around it again and then found this message thread on the subject. This problem was posted on Mar 25, 2008 and at least one workaround was mentioned:
 
 
Here was my workaround from this morning:
 
DataSetView>>moveEditVerticallyBy: delta 
    ...
 nextIndex == nil ifTrue:
  [self moveSelectionIndex: delta.
  ^true].
 nextIndex == #changedIndex ifTrue: [
  "<New code here>"
  selectionChannel value: selectionIndex.
  "\<New code here>"
  ^true
 ].
 self editAt: nextIndex downcast: false.
 self triggerEvent: #cellGettingFocus.
 self topComponent keyboardProcessor currentConsumer: editor widget controller.
 ^true
 
I see that (as mentioned in the earlier thread) that #valueChange is being sent before selectionIndex is set; however that alone didn't help because a controller dispatcher was not declared anyway.  A simple workaround to set the selectionChannel value to the selectionIndex when #changedIndex. It seems odd that there are two ways to refer to the index position of the selection, but at least this keeps them in sync from keyboard events.
 
Paul Baumann 
 


This message may contain confidential information and is intended for specific recipients unless explicitly noted otherwise. If you have reason to believe you are not an intended recipient of this message, please delete it and notify the sender. This message may not represent the opinion of IntercontinentalExchange, Inc. (ICE), its subsidiaries or affiliates, and does not constitute a contract or guarantee. Unencrypted electronic mail is not secure and the recipient of this message is expected to provide safeguards from viruses and pursue alternate means of communication where privacy or a binding message is desired.


_______________________________________________
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] Problem using arrow keys on dataset

James Robertson-7
Browse the package BtfExtensions in the public store.  The methods I implemented for kbd nav in DataSetView and DataSetController are what you want.  


James Robertson
Cincom Smalltalk Product Evangelist
Talk Small and Carry a Big Class Library




On Mar 11, 2009, at 12:49 PM, Charles Adams wrote:

Yeah, I went through this mess with Cincom in 407756 - DataSetView>>moveEditVerticallyBy:. [AR 55032].. The solution I got didn't work. I ended up fixing it myself.
 
Give me a minute to find it...
 
Charlie
----- Original Message -----
Sent: Wednesday, March 11, 2009 11:36 AM
Subject: Re: [vwnc] Problem using arrow keys on dataset

Forgot to mention...
 
MultiSelectionDataSetView.selectionChannel.value gets a collection instead of a single index.
 
MultiSelectionDataSetView>>moveEditVerticallyBy: delta
...
 nextIndex == #changedIndex ifTrue: [
  selectionChannel value: (Set with: selectionIndex).
  ^true
 ].
...
 
 
Paul Baumann 
 


From: Paul Baumann 
Sent: Wednesday, March 11, 2009 12:04 PM
To: VWNC
Subject: [vwnc] Problem using arrow keys on dataset

Has this problem been fixed since VW 7.5?
 
The problem is that keyboard events update DataSet.selectionIndex but not DataSet.selectionChannel.value. Updating the selectionIndex inst var alone doesn't update the selectionChannel that nearly all code relies on for selection change notification. We use a lot of DataSets, so the problem is pervasive. People get accustomed to keyboard selections not working so they use the mouse. The problem is always there, but not noticed later due to behavior changes.
 
I worked around this problem long ago but the override has since been lost. Today I worked around it again and then found this message thread on the subject. This problem was posted on Mar 25, 2008 and at least one workaround was mentioned:
 
 
Here was my workaround from this morning:
 
DataSetView>>moveEditVerticallyBy: delta 
    ...
 nextIndex == nil ifTrue: 
  [self moveSelectionIndex: delta.
  ^true].
 nextIndex == #changedIndex ifTrue: [
  "<New code here>"
  selectionChannel value: selectionIndex.
  "\<New code here>"
  ^true
 ].
 self editAt: nextIndex downcast: false.
 self triggerEvent: #cellGettingFocus.
 self topComponent keyboardProcessor currentConsumer: editor widget controller.
 ^true
 
I see that (as mentioned in the earlier thread) that #valueChange is being sent before selectionIndex is set; however that alone didn't help because a controller dispatcher was not declared anyway.  A simple workaround to set the selectionChannel value to the selectionIndex when #changedIndex. It seems odd that there are two ways to refer to the index position of the selection, but at least this keeps them in sync from keyboard events.
 
Paul Baumann 
 


This message may contain confidential information and is intended for specific recipients unless explicitly noted otherwise. If you have reason to believe you are not an intended recipient of this message, please delete it and notify the sender. This message may not represent the opinion of IntercontinentalExchange, Inc. (ICE), its subsidiaries or affiliates, and does not constitute a contract or guarantee. Unencrypted electronic mail is not secure and the recipient of this message is expected to provide safeguards from viruses and pursue alternate means of communication where privacy or a binding message is desired.



_______________________________________________
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


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] Problem using arrow keys on dataset

Charles Adams
James' solution is right. Use it. Mine is not as elegent and is in a subclass.
 
I wonder why I didn't get this when I reported this bug last year. James, from the comments, you fixed this in '02. Is your fix specific to BF somehow? It doesn't look like it.
 
There are in fact several interesting looking fixes or extensions in this package. How much of this makes it back into the product build?
 
Charlie
----- Original Message -----
Sent: Wednesday, March 11, 2009 12:01 PM
Subject: Re: [vwnc] Problem using arrow keys on dataset

Browse the package BtfExtensions in the public store.  The methods I implemented for kbd nav in DataSetView and DataSetController are what you want.  


James Robertson
Cincom Smalltalk Product Evangelist
Talk Small and Carry a Big Class Library




On Mar 11, 2009, at 12:49 PM, Charles Adams wrote:

Yeah, I went through this mess with Cincom in 407756 - DataSetView>>moveEditVerticallyBy:. [AR 55032].. The solution I got didn't work. I ended up fixing it myself.
 
Give me a minute to find it...
 
Charlie
----- Original Message -----
Sent: Wednesday, March 11, 2009 11:36 AM
Subject: Re: [vwnc] Problem using arrow keys on dataset

Forgot to mention...
 
MultiSelectionDataSetView.selectionChannel.value gets a collection instead of a single index.
 
MultiSelectionDataSetView>>moveEditVerticallyBy: delta
...
 nextIndex == #changedIndex ifTrue: [
  selectionChannel value: (Set with: selectionIndex).
  ^true
 ].
...
 
 
Paul Baumann 
 


From: Paul Baumann 
Sent: Wednesday, March 11, 2009 12:04 PM
To: VWNC
Subject: [vwnc] Problem using arrow keys on dataset

Has this problem been fixed since VW 7.5?
 
The problem is that keyboard events update DataSet.selectionIndex but not DataSet.selectionChannel.value. Updating the selectionIndex inst var alone doesn't update the selectionChannel that nearly all code relies on for selection change notification. We use a lot of DataSets, so the problem is pervasive. People get accustomed to keyboard selections not working so they use the mouse. The problem is always there, but not noticed later due to behavior changes.
 
I worked around this problem long ago but the override has since been lost. Today I worked around it again and then found this message thread on the subject. This problem was posted on Mar 25, 2008 and at least one workaround was mentioned:
 
 
Here was my workaround from this morning:
 
DataSetView>>moveEditVerticallyBy: delta 
    ...
 nextIndex == nil ifTrue: 
  [self moveSelectionIndex: delta.
  ^true].
 nextIndex == #changedIndex ifTrue: [
  "<New code here>"
  selectionChannel value: selectionIndex.
  "\<New code here>"
  ^true
 ].
 self editAt: nextIndex downcast: false.
 self triggerEvent: #cellGettingFocus.
 self topComponent keyboardProcessor currentConsumer: editor widget controller.
 ^true
 
I see that (as mentioned in the earlier thread) that #valueChange is being sent before selectionIndex is set; however that alone didn't help because a controller dispatcher was not declared anyway.  A simple workaround to set the selectionChannel value to the selectionIndex when #changedIndex. It seems odd that there are two ways to refer to the index position of the selection, but at least this keeps them in sync from keyboard events.
 
Paul Baumann 
 


This message may contain confidential information and is intended for specific recipients unless explicitly noted otherwise. If you have reason to believe you are not an intended recipient of this message, please delete it and notify the sender. This message may not represent the opinion of IntercontinentalExchange, Inc. (ICE), its subsidiaries or affiliates, and does not constitute a contract or guarantee. Unencrypted electronic mail is not secure and the recipient of this message is expected to provide safeguards from viruses and pursue alternate means of communication where privacy or a binding message is desired.



_______________________________________________
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


_______________________________________________
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] Problem using arrow keys on dataset

James Robertson-7
In reply to this post by James Robertson-7
To follow up on this, those sorts of changes are necessary in 7.6, but I've just removed my overrides for the in-development Bf intended for VW 7.7.  The problem has been addressed in the base for 7.7

James Robertson
Cincom Smalltalk Product Evangelist
Talk Small and Carry a Big Class Library




On Mar 11, 2009, at 1:01 PM, James Robertson wrote:

Browse the package BtfExtensions in the public store.  The methods I implemented for kbd nav in DataSetView and DataSetController are what you want.  


James Robertson
Cincom Smalltalk Product Evangelist
Talk Small and Carry a Big Class Library




On Mar 11, 2009, at 12:49 PM, Charles Adams wrote:

Yeah, I went through this mess with Cincom in 407756 - DataSetView>>moveEditVerticallyBy:. [AR 55032].. The solution I got didn't work. I ended up fixing it myself.
 
Give me a minute to find it...
 
Charlie
----- Original Message -----
Sent: Wednesday, March 11, 2009 11:36 AM
Subject: Re: [vwnc] Problem using arrow keys on dataset

Forgot to mention...
 
MultiSelectionDataSetView.selectionChannel.value gets a collection instead of a single index.
 
MultiSelectionDataSetView>>moveEditVerticallyBy: delta
...
 nextIndex == #changedIndex ifTrue: [
  selectionChannel value: (Set with: selectionIndex).
  ^true
 ].
...
 
 
Paul Baumann 
 


From: Paul Baumann 
Sent: Wednesday, March 11, 2009 12:04 PM
To: VWNC
Subject: [vwnc] Problem using arrow keys on dataset

Has this problem been fixed since VW 7.5?
 
The problem is that keyboard events update DataSet.selectionIndex but not DataSet.selectionChannel.value. Updating the selectionIndex inst var alone doesn't update the selectionChannel that nearly all code relies on for selection change notification. We use a lot of DataSets, so the problem is pervasive. People get accustomed to keyboard selections not working so they use the mouse. The problem is always there, but not noticed later due to behavior changes.
 
I worked around this problem long ago but the override has since been lost. Today I worked around it again and then found this message thread on the subject. This problem was posted on Mar 25, 2008 and at least one workaround was mentioned:
 
 
Here was my workaround from this morning:
 
DataSetView>>moveEditVerticallyBy: delta 
    ...
 nextIndex == nil ifTrue: 
  [self moveSelectionIndex: delta.
  ^true].
 nextIndex == #changedIndex ifTrue: [
  "<New code here>"
  selectionChannel value: selectionIndex.
  "\<New code here>"
  ^true
 ].
 self editAt: nextIndex downcast: false.
 self triggerEvent: #cellGettingFocus.
 self topComponent keyboardProcessor currentConsumer: editor widget controller.
 ^true
 
I see that (as mentioned in the earlier thread) that #valueChange is being sent before selectionIndex is set; however that alone didn't help because a controller dispatcher was not declared anyway.  A simple workaround to set the selectionChannel value to the selectionIndex when #changedIndex. It seems odd that there are two ways to refer to the index position of the selection, but at least this keeps them in sync from keyboard events.
 
Paul Baumann 
 


This message may contain confidential information and is intended for specific recipients unless explicitly noted otherwise. If you have reason to believe you are not an intended recipient of this message, please delete it and notify the sender. This message may not represent the opinion of IntercontinentalExchange, Inc. (ICE), its subsidiaries or affiliates, and does not constitute a contract or guarantee. Unencrypted electronic mail is not secure and the recipient of this message is expected to provide safeguards from viruses and pursue alternate means of communication where privacy or a binding message is desired.



_______________________________________________
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

_______________________________________________
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] Problem using arrow keys on dataset

Paul Baumann
Thanks guys,
 
I'm going to use Jim's code from BtfExtensions. My MultiSelectionDataSetView change had side effects, and I'd rather use something close to what will be in a future VW release.
 
Paul Baumann 
 


From: [hidden email] [mailto:[hidden email]] On Behalf Of James Robertson
Sent: Wednesday, March 11, 2009 1:27 PM
To: VW NC
Subject: Re: [vwnc] Problem using arrow keys on dataset

To follow up on this, those sorts of changes are necessary in 7.6, but I've just removed my overrides for the in-development Bf intended for VW 7.7.  The problem has been addressed in the base for 7.7


 
On Mar 11, 2009, at 1:01 PM, James Robertson wrote:

Browse the package BtfExtensions in the public store.  The methods I implemented for kbd nav in DataSetView and DataSetController are what you want.  

On Mar 11, 2009, at 12:49 PM, Charles Adams wrote:

Yeah, I went through this mess with Cincom in 407756 - DataSetView>>moveEditVerticallyBy:. [AR 55032].. The solution I got didn't work. I ended up fixing it myself.
 
Give me a minute to find it...
 
Charlie
----- Original Message -----
Sent: Wednesday, March 11, 2009 11:36 AM
Subject: Re: [vwnc] Problem using arrow keys on dataset

Forgot to mention...
 
MultiSelectionDataSetView.selectionChannel.value gets a collection instead of a single index.
 
MultiSelectionDataSetView>>moveEditVerticallyBy: delta
...
 nextIndex == #changedIndex ifTrue: [
  selectionChannel value: (Set with: selectionIndex).
  ^true
 ].
...
 
 
Paul Baumann 
 


From: Paul Baumann 
Sent: Wednesday, March 11, 2009 12:04 PM
To: VWNC
Subject: [vwnc] Problem using arrow keys on dataset

Has this problem been fixed since VW 7.5?
 
The problem is that keyboard events update DataSet.selectionIndex but not DataSet.selectionChannel.value. Updating the selectionIndex inst var alone doesn't update the selectionChannel that nearly all code relies on for selection change notification. We use a lot of DataSets, so the problem is pervasive. People get accustomed to keyboard selections not working so they use the mouse. The problem is always there, but not noticed later due to behavior changes.
 
I worked around this problem long ago but the override has since been lost. Today I worked around it again and then found this message thread on the subject. This problem was posted on Mar 25, 2008 and at least one workaround was mentioned:
 
 
Here was my workaround from this morning:
 
DataSetView>>moveEditVerticallyBy: delta 
    ...
 nextIndex == nil ifTrue: 
  [self moveSelectionIndex: delta.
  ^true].
 nextIndex == #changedIndex ifTrue: [
  "<New code here>"
  selectionChannel value: selectionIndex.
  "\<New code here>"
  ^true
 ].
 self editAt: nextIndex downcast: false.
 self triggerEvent: #cellGettingFocus.
 self topComponent keyboardProcessor currentConsumer: editor widget controller.
 ^true
 
I see that (as mentioned in the earlier thread) that #valueChange is being sent before selectionIndex is set; however that alone didn't help because a controller dispatcher was not declared anyway.  A simple workaround to set the selectionChannel value to the selectionIndex when #changedIndex. It seems odd that there are two ways to refer to the index position of the selection, but at least this keeps them in sync from keyboard events.
 
Paul Baumann 
 




This message may contain confidential information and is intended for specific recipients unless explicitly noted otherwise. If you have reason to believe you are not an intended recipient of this message, please delete it and notify the sender. This message may not represent the opinion of IntercontinentalExchange, Inc. (ICE), its subsidiaries or affiliates, and does not constitute a contract or guarantee. Unencrypted electronic mail is not secure and the recipient of this message is expected to provide safeguards from viruses and pursue alternate means of communication where privacy or a binding message is desired.

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