How to get message that table cell has been changed?

View: New views
5 Messages — Rating Filter:   Alert me  

How to get message that table cell has been changed?

by David Heath-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I am using an FXTable from fox 1.6.23 on winxp. There is no possibility to change the version.

I see that FXTable sends a SEL_REPLACED when a cell is edited. However, this message is sent before the
change is made. I assume this is useful for input verification. How do I get a message AFTER the change has been made? I need to get the value out of the table and do something with it and using SEL_REPLACED, I sometimes get out of date values.

Seems like a trivial question, but I can't find a way to do this.

Thanks.

-dave


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Foxgui-users mailing list
Foxgui-users@...
https://lists.sourceforge.net/lists/listinfo/foxgui-users

Re: How to get message that table cell has been changed?

by Sander Jansen-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Yes, I encountered the same problem a week or two ago as well. I think
the future plan is to sent two messages in the future, a SEL_REPLACING
and a SEL_REPLACED. So you can save the old value for a undo system, and
still keep track of the new value. Not sure when Jeroen is planning to
make this change. You probably just want to modify your version of FOX
to accomplish this. Subclassing would probably be more work than just
modifying it...

Hope this helps,

Sander

David Heath wrote:

> Hi,
>
> I am using an FXTable from fox 1.6.23 on winxp. There is no possibility to
> change the version.
>
> I see that FXTable sends a SEL_REPLACED when a cell is edited. However,
> this
> message is sent before the
> change is made. I assume this is useful for input verification. How do I
> get
> a message AFTER the change has been made? I need to get the value out of
> the
> table and do something with it and using SEL_REPLACED, I sometimes get out
> of date values.
>
> Seems like a trivial question, but I can't find a way to do this.
>
> Thanks.
>
> -dave
>
>
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Foxgui-users mailing list
> Foxgui-users@...
> https://lists.sourceforge.net/lists/listinfo/foxgui-users

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Foxgui-users mailing list
Foxgui-users@...
https://lists.sourceforge.net/lists/listinfo/foxgui-users

Re: How to get message that table cell has been changed?

by Jeroen van der Zijp :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thursday 21 June 2007 10:04, David Heath wrote:

> Hi,
>
> I am using an FXTable from fox 1.6.23 on winxp. There is no possibility to
> change the version.
>
> I see that FXTable sends a SEL_REPLACED when a cell is edited. However, this
> message is sent before the
> change is made. I assume this is useful for input verification. How do I get
> a message AFTER the change has been made? I need to get the value out of the
> table and do something with it and using SEL_REPLACED, I sometimes get out
> of date values.
>
> Seems like a trivial question, but I can't find a way to do this.
To elaborate a bit more:

For some mega-widgets like FXText and FXTable, the callbacks have been
sent at a time when an undo-system could still salvage the info for later;
that meant the callback message is issued *before* the change.

In FXText, however, both the old and new value are passed in the message so its
not a problem.  However, in FXTable (and a few other widgets), it is.

Current plans for somewhere along the 1.7 track is to issue *two* messages,
one before and one after the event.  This will allow you to pick the one
you need.  The one issued before the event could be used to hook into the undo
system (like FXUndoList), while the one issued after the event can be intercepted
when you need to grab the changed value.

Tentatively, the names will be like:

        SEL_INSERTING before
        SEL_INSERTED after

        SEL_DELETING before
        SEL_DELETED after

        and so on...

Note that such a change will likely lead to some breakage; that's why it
can not be done anymore for 1.6, but should to be done while we switch major
version numbers.  Fortunately it appears that not many people currently report
this problem, so I believe we would be able to make this switch-over go
fairly painlessly!



                - Jeroen



--
+----------------------------------------------------------------------------+
| Copyright (C) 19:20 06/21/2007 Jeroen van der Zijp.   All Rights Reserved. |
+----------------------------------------------------------------------------+


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Foxgui-users mailing list
Foxgui-users@...
https://lists.sourceforge.net/lists/listinfo/foxgui-users

attachment0 (196 bytes) Download Attachment

Re: How to get message that table cell has been changed?

by Mad Max :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Jeroen,
I'm using Fox Toolkit 1.6.36, did you had the possibility to implement the change described below in the 1.7.x track?
Actually I'm struggling around this problem ...
Thanks,
Max



Current plans for somewhere along the 1.7 track is to issue *two* messages,
one before and one after the event.  This will allow you to pick the one
you need.  The one issued before the event could be used to hook into the undo
system (like FXUndoList), while the one issued after the event can be intercepted
when you need to grab the changed value.

Tentatively, the names will be like:

        SEL_DELETING before
        SEL_DELETED after

Re: How to get message that table cell has been changed?

by Mad Max :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,
I have maybe found a workaround:
"onTableChanged" callback is called after the row has been actually deleted ...
BR,
Max



Hi Jeroen,
I'm using Fox Toolkit 1.6.36, did you had the possibility to implement the change described below in the 1.7.x track?
Actually I'm struggling around this problem ...
Thanks,
Max

Jeroen van der Zijp wrote:
Current plans for somewhere along the 1.7 track is to issue *two* messages,
one before and one after the event.  This will allow you to pick the one
you need.  The one issued before the event could be used to hook into the undo
system (like FXUndoList), while the one issued after the event can be intercepted
when you need to grab the changed value.

Tentatively, the names will be like:

        SEL_DELETING before
        SEL_DELETED after