Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.

Dialog Box function causing CellConv errors

We discussed in another thread about how a tight loop will cause data conversion set by the CellConv property to not work properly in the SRP Edit Table. I am running into this again with the use of the Dialog_Box function. I have a form I am opening with Dialog_Box, which must be processing a tight loop as the parent window waits for the End_Dialog function to pass return data back. Is there any other way I can accomplish getting data passed back from a dialog window to the parent that will still allow the SRP Edit Table to do conversion properly?

Comments

  • Dan,

    Using the SRP EditTable within a modal dialog box is a long-standing problem. This is partially due to the tight-loop design of the Dialog_Box function, partially due to the Yield() calls that this function uses, and partially due to inherent problems with the way OLE messages are processed by the engine. We have had long discussions with Revelation engineers over the situation. Everyone agrees that it is a problem within OI, but there is no easy fix. We are "crossing fingers" and hoping that OI 10 might have better support for COM/OLE. Carl Pates has been kind enough to work with us to try and make sure our controls will remain compatible if not actually work better.

    It all comes down to synchronous events. These cannot be expected to work within modal dialog boxes. The current way that OLE messages are processed in conjunction with the Yield() statements causes our events to fire without respecting the synchronous flow. This can also cause events to fire out of order or some events just seem to never fire at all.

    The general solution is to not qualify your SRP EditTable events as synchronous (which should be limited to just a few events anyway even under normal circumstances). This means you will not be able to use the pre/post event flow as you might normally like. All event processing should be done in the pre event (i.e., BeforeUpdate, PosChanging, etc.). We also recommend setting the DefaultCancelBehavior property to 1 or 2.

    I am not certain if this will help your CellConv issue. I would have to set up a test environment to confirm. But what I have documented should be standard practice with dialog boxes so start there and let us know if this helps you move forward.
Sign In or Register to comment.