Edittable Insert/Delete (OpenInsight 32-Bit)
At 06 DEC 2010 01:09:09PM Michael Matthews wrote:
We have a form with 4 edittables, all of which have databound columns. The first column of each edittable is the same field. When a Delete or Insert is performed, I'm trying to make the same event happen on each of the other edittables. I've tried Send_Message with a Delete or Insert, I've tried Etmethod, I've tried setting Atrecord; nothing works. Any suggestions?
Thanks in advance,
Michael Matthews
At 06 DEC 2010 06:23PM Barry Stevens wrote:
send_message should work.
Can you copy/paste the actual command used.
I assume the other edittables are disabled, that might be the problem. I suggest setting a enable first then a disable after and see if that works.
At 06 DEC 2010 06:24PM cpates@sprezzatura.com wrote:
Michael,
I assume you're talking about the INSERTROW and DELETEROW events - and that you want them to fire on the other EditTables?
If so you need to trigger them "manually", as they are normally only sent in response to a keyboard event. In other words if you want to trigger a DELETEROW event in TABLE_2 from TABLE_1 you need to do something like this:
0001 * // DELETEROW event for TABLE_1 0002 0003 tbl2Row = send_Message( @window : ".TABLE_2", | 0004 "TEXT_BY_POS", | 0005 0, | 0006 rowNo ) 0007 convert @fm to @vm in tbl2Row 0008 0009 call send_Message( @window : ".TABLE_2", "DELETE", rowNo ) 0010 call send_Event( @window : ".TABLE_2", "DELETEROW", rowNo, tbl2Row )cpates@sprezzatura.com
Battlestar Sprezzatura - BSG 77
Colonial leaders in all things RevSoft
At 07 DEC 2010 09:09AM Michael Matthews wrote:
"I canna do it, Captain.. the dilithium crystals are degenerating.. I'm givin' her all she's got!"
So I'd have to do both a Send_Message And a Send_Event? Fascinating..
I actually did a workaround.. did a Get_Property on each edittable's List, deleted (or inserted) at the current row and Set_Property to put it back. Not pretty, but it worked.
Gracias, mi amigos!
At 07 DEC 2010 10:17AM dbakke@srpcs.com's Don Bakke wrote:
Michael,
So I'd have to do both a Send_Message And a Send_Event? Fascinating.
Carl was giving you a solution that would both remove/insert the edittable row as needed *and* it would execute any event handler logic associated with these edittables. It's a comprehensive solution. However, my guess is that these are hidden edittables that don't have any event handler logic so you really don't need to do any Send_Event calls.
I actually did a workaround.. did a Get_Property on each edittable's List, deleted (or inserted) at the current row and Set_Property to put it back. Not pretty, but it worked.
I would encourage you to work on getting the Send_Message solution to work. It is a far more efficient and "best practice" way to do what you want. Using the LIST property for large arrays gets to be problematic. Send_Message works pretty well. I think you just need to debug your code a bit more.
dbakke@srpcs.com
At 07 DEC 2010 11:43AM Michael Matthews wrote:
Thank you sir.. I stand corrected.