Roger,
I think there is an issue with your newly added function DC_EditControlLastFocus().
You get an error if you have a screen with some dc_gets and dc_pushbuttons and all gets on the screen are EDITPROTECTed and the button has DC_EditControlLastFocus() in the action clause. System does not recognize this situation and does not return the focus to the tab page itself (or any other available object if there is no tab page, just a DC_STATIC). Error code is BASE/2266 (receiver of message is not an object).
Please refer to my attached sample code for testing (just click on the button and close the action message).
DC_EditControlLastFocus() and EDITPROTECT
DC_EditControlLastFocus() and EDITPROTECT
- Attachments
-
- Test.zip
- (7.71 KiB) Downloaded 705 times
Re: DC_EditControlLastFocus() and EDITPROTECT
Ivan -
There is nothing wrong with DC_EditControlLastFocus().
The reason there is no object is because there was never any object that received focus because the gets are all protected.
When you have code like that, just make a change like so:
There is nothing wrong with DC_EditControlLastFocus().
The reason there is no object is because there was never any object that received focus because the gets are all protected.
When you have code like that, just make a change like so:
Code: Select all
@ 0, 1 DCPUSHBUTTON ;
CAPTION "Push Me" ;
SIZE 10, 1.2 ;
ACTION { |o|o := DC_EditControlLastFocus(GetList), ;
DC_MSGBOX( ,, { "Close this message box and", "you will NOT get an error." } ), ;
IIF(Valtype(o)=='O', DC_SetAppFocus(o),nil) }
The eXpress train is coming - and it has more cars.
Re: DC_EditControlLastFocus() and EDITPROTECT
That solved it. Thanks Roger, I appreciate it.