Need size of record (OpenInsight Specific)
At 25 SEP 1998 07:04:02PM Ron Hollar wrote:
I am converting a window from Arev, and one thing I haven't figured out how to do is check the size of the record being created by the form, and since there is no @RECORD, I can't use LEN(@RECORD). I want to prompt the user that the record is getting too big before too much data is entered and it blows up, losing the data entered before it has been written. Maybe this isn't as much an issue in OI as it was in Arev, but I would like to know if anyone has an insight on this.
Thanks,
Ron Hollar
At 26 SEP 1998 09:22AM Don Bakke wrote:
Ron,
The equivalent of @RECORD in OI is using the RECORD property. For example:
Record=Get_Property(@Window, "RECORD")
Size_record=Len(Record)
So on a very simple basis you can put the above code and your warning routine in strategic LOSTFOCUS events on the form. If you want to simulate the perpetual process in AREV then I would recommend creating a promoted LOSTFOCUS event and place the code in there. The latter would be much more efficient since you only have to create it once for a particular window or whole application (depending on how you name your promoted event) whereas the former requires you to make duplicate events for every control you want to intercept.
BTW, OI does not avoid the 64K problem either so if your application benefitted from this warning system then it would be a good idea to put it in your OI application as well.
At 28 SEP 1998 11:31AM Ron Hollar wrote:
Don,
Thanks for the thorough answer. I was wondering about the perpetual process issue, and the promoted LostFocus event is just the idea I needed.
Thanks!