WkTableWidgetView losing focus issues

VA Smalltalk is a "100% VisualAge compatible" IDE that includes the original VisualAge technology and the popular VA Assist and WidgetKit add-ons.

Moderators: Eric Clayberg, wembley, tc, Diane Engles, solveig

WkTableWidgetView losing focus issues

Postby ISmith » Fri Feb 06, 2009 11:57 am

In both VA7.5.2 and VA6.0.2:
Setup: use a WkTableWidgetView with editable WkColumnView's on it and connect a column's aboutToEndEdit to a method. Also have any other entry field or button in your view.
If you edit an entry in the column and then click on the entry field, the method will be executed (as assumed).
If you edit an entry in the column, then scroll the container up and down, and then click on the entry field, the method is not executed.

As far as I can debug, it seems like WkTableWidget>>focusIsBeingLost seems to endEdit (which destroys the editWidget) and therefore isEditingInProgress answers false.

Is this a feature or a bug? Also, is there a known workaround?
Ian
ISmith
 
Posts: 2
Joined: Fri Feb 06, 2009 11:29 am

Re: WkTableWidgetView losing focus issues

Postby solveig » Fri Feb 27, 2009 5:49 am

Ian,

I was not able to reproduce your result on Windows XP.

I used WkTableWidgetViewExample as a base and connected the first column's aboutToEndEdit event to a method. It did not matter whether I sctolled using the arrow keys or the thumb scroll after I began to edit a cell in the first column. I always executed the method connected to the aboutToEndEdit event.

Could you tell me more about your context?

Regards,
Solveig
solveig
Moderator
 
Posts: 57
Joined: Tue Oct 17, 2006 6:30 am

Re: WkTableWidgetView losing focus issues

Postby ISmith » Thu Mar 19, 2009 11:13 am

Solveig,
Thanks for looking into my problem.
I went into the example you used and had no problem recreating the problem.

1) Go into WkPerson class example method and copy Dan a whole pile of times (I made 14 of him).
(afterall, you can't do this if there isn't enough rows to scroll)

2) Create 2 simple methods:
methodWithBreak

CwMessagePrompter warningMessage: 'I am in end edit method'
and:
cellClicked

CwMessagePrompter warningMessage: 'I am in cell clicked'

3) Attach clicked on the cell button to cellClicked and attach aboutToEndEdit of the first column to methodWithBreak.
4) Run app, click in the second line's Rubel and change it to RubelChg, without tabbing out, with mouse grab the right scroll bar and scroll down to line 15 or 16, now click the cell button.
You will see the cell message without the end edit message... also, when you scroll back up the list, RubelChg is gone and Rubel is back.

Please let me know if this doesn't work and I will export and email methods.
Thanks,
Ian
ISmith
 
Posts: 2
Joined: Fri Feb 06, 2009 11:29 am

Re: WkTableWidgetView losing focus issues

Postby solveig » Mon Apr 13, 2009 9:02 am

Ian,

I am still not getting your results. Since you have opened a case #40175, let us pursue the matter there, exchanging examples as needed and I will post the final answer here on the forum.

Regards,
Solveig
solveig
Moderator
 
Posts: 57
Joined: Tue Oct 17, 2006 6:30 am

Re: WkTableWidgetView losing focus issues

Postby solveig » Tue Apr 28, 2009 11:07 am

I am attaching a patch which allows the cell under edition when the WkTableWidgetView loses focus to an outside widget to complete the edit and accept any changes.
Attachments
focusIsBeingLost-40175.txt
file-in to accept any edit in progress when the table loses focus to an outside widget
(428 Bytes) Downloaded 44 times
solveig
Moderator
 
Posts: 57
Joined: Tue Oct 17, 2006 6:30 am


Return to VA Smalltalk 7.0, 7.5 & 8.0

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest