Moderators: Eric Clayberg, wembley, tc, Diane Engles, solveig
tc wrote:Hello,
Thanks for the testcase. I was able to reproduce the problem.
I opened Case #47905 for this issue.
--tc
sharma.narender wrote:tc wrote:Hello,
Thanks for the testcase. I was able to reproduce the problem.
I opened Case #47905 for this issue.
--tc
Thanks for looking into the problem. Any timeline for its resolution ?
endEdit: aWidget clientData: clientData callData: callData
(callData newValue = '2')
ifTrue: [
callData doit: false.
aWidget highlightedCells copy do: [ :aCell | aWidget unhighlightCell: aCell commit: false ].
]
tc wrote:Hello,
I looked at this since the other person is busy. At IBM, we used the same technique of checking values in the endEdit callback and I do not recall having this issue but I'm pretty sure we used a different table.
For this table, I noticed the methods are about 14 years old and a rewrite might be hard since everyone's approval is needed and we've not seen this issue come up before.
However, the effect you are looking for is easily achieved as follows:
- Code: Select all
endEdit: aWidget clientData: clientData callData: callData
(callData newValue = '2')
ifTrue: [
callData doit: false.
aWidget highlightedCells copy do: [ :aCell | aWidget unhighlightCell: aCell commit: false ].
]
. . . this change keeps the focus at the cell with the wrong value and makes sure no other cells are highlighted until the proper value is entered.
--tc
sharma.narender wrote:
Hi,
Thanks for replying and suggesting the alternate approach. Our project team deliberately did not take this approach, since unhighlightCell: commit: is a private method... Is it a good practice to call the private methods of the other class in the Smalltalk code, just because of the fact that Smalltalk has not enforced access rules ?
Thanks!
A popular convention is to make a method public if other parts (or classes) use it, and make it private if only the class that contains it uses it.
tc wrote:Hello,
I looked at this since the other person is busy. At IBM, we used the same technique of checking values in the endEdit callback and I do not recall having this issue but I'm pretty sure we used a different table.
For this table, I noticed the methods are about 14 years old and a rewrite might be hard since everyone's approval is needed and we've not seen this issue come up before.
However, the effect you are looking for is easily achieved as follows:
- Code: Select all
endEdit: aWidget clientData: clientData callData: callData
(callData newValue = '2')
ifTrue: [
callData doit: false.
aWidget highlightedCells copy do: [ :aCell | aWidget unhighlightCell: aCell commit: false ].
]
. . . this change keeps the focus at the cell with the wrong value and makes sure no other cells are highlighted until the proper value is entered.
--tc
EwTableList>>#verifyCellSelectionProceed
"See if cell selection processing
should continue. Answer true
if selection can continue, false
if it cannot."
self canCellSelectionProceed ifTrue: [^true].
"Unhighlight any other cells."
self highlightedCells copy do: [ :aCell | self unhighlightCell: aCell commit: false ].
self
cursorCell: self editCell forceFullyVisible: false;
highlightCell: self editCell commit: false.
self highlightedCells: self selectedCells.
^false
solveig wrote:Hello, Mr. Sharma,
Could you please send e-mail to vast-support@instantiations.com? I would like to discuss with you the example you sent and the behavior of the control. Generally when examples are provided, we take discussion off line and post the results. This is what I would like to do in this case. I await your reply on our support line.
Regards,
Solveig
Return to VA Smalltalk 7.0, 7.5 & 8.0
Users browsing this forum: Google [Bot] and 1 guest