Difference between APPLY "FOCUS" and APPLY "E

Posted by slacroixak on 31-Jan-2018 10:27

Hi all, I was wondering about doing  APPLY "FOCUS" TO hwidget.  Is there a known difference with APPLY "ENTRY" TO hWidget.

So far, I cannot find a lot of literature about this FOCUS option as an event.  Could someone tell us a story about these two options?

Posted by Matt Gilarde on 31-Jan-2018 11:00

There is no FOCUS event. APPLY "FOCUS" does nothing. So that's one difference between it and APPLY "ENTRY".

The compiler doesn't validate the string in the APPLY statement. APPLY "FOCUS" is accepted by the compiler but it won't do anything. ON "FOCUS" OF <whatever> doesn't compile.

All Replies

Posted by Ken McIntosh on 31-Jan-2018 10:57

FOCUS is a handle which references the currently focused widget.  I don't believe you can apply it as an event.

Posted by Matt Gilarde on 31-Jan-2018 11:00

There is no FOCUS event. APPLY "FOCUS" does nothing. So that's one difference between it and APPLY "ENTRY".

The compiler doesn't validate the string in the APPLY statement. APPLY "FOCUS" is accepted by the compiler but it won't do anything. ON "FOCUS" OF <whatever> doesn't compile.

Posted by slacroixak on 01-Feb-2018 01:39

Thank you sirs.  Gee I'm confused.  I used to think it was an obscure point a bit like the CLOSE event for procedure object that is not much documented (ON CLOSE OF THIS-PROCEDURE  ....)

I just double checked and indeed, this APPLY "FOCUS" does nothing.  I am wondering where I picked that virtual trick from, and above all how I managed to believe it would do something close to the ENTRY event.

Posted by OctavioOlguin on 01-Feb-2018 09:47

could it be defined as user's event and then subscribe to it?...

Just wondering...

This thread is closed