Edittable Insert (OpenInsight 32-bit)
At 13 SEP 2011 10:30:59AM Michael Matthews wrote:
This is quite a curiosity.. I'm using Send_Message to Insert a row in a given edittable. The row inserts fine, but the edittable loses focus. When digging further, I found that OI is executing a Poschanged event, several Gotfocuses and Lostfocuses, ending with a Lostfocus. Even when I end the insert with a Return 0, the other events execute befor returning to the edittable. Has anyone else run into this? Is there some way to stop the event chain after the insert takes place?
Gracias..
Michael
At 13 SEP 2011 07:15PM Carl pates wrote:
Set the SYSTEM BLOCK_EVENTS property to TRUE$ before you insert and reset it afterwards ?
At 14 SEP 2011 08:33AM Michael Matthews wrote:
Thank you, Dr. C! I'll give it a try straightaway..
Condolences on your loss, sir..
Michael
At 14 SEP 2011 08:47AM Michael Matthews wrote:
Ok, the plot thickens.. I tried Block_Events "True", and it seemed to work at first; but when I set back to False, it immediately executed all the events that it had queued. Net result, it did the same thing.
Any other thoughts?
At 14 SEP 2011 08:16PM Carl Pates wrote:
Hi Michael,
That suggests they are not being triggered by the insert directly, but something afterwards. It looks like we're trying to treat the symptom of the problem rather than the cause, and I know of no reason why a simple insert would cause the EditTable to lose the focus unless, for example, you clicked on a button to execute the insert, because then the button would have grabbed the focus first.
/c
At 15 SEP 2011 08:45AM Michael Matthews wrote:
Hi Carl,
The Insert is actually being triggered by an omnievent. I put a debug in the event handler for the edittable and that's how I saw all the different events that were executed.
I have a workaround, but it is still a curiosity. Do events fire off for every column in the table?
Thanks for your help, oh great and wise Jedi master..
Michael