Focal Point
Maintain: Winform GET formname.FOCUS fails

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/3311056891

November 28, 2006, 05:20 PM
John Price
Maintain: Winform GET formname.FOCUS fails
WebFOCUS 7.1.4 - Windows platform
Winform GET formname.FOCUS is supposed to return the current object that has "focus". My attempts to use this produce an error.

EXAMPLE:
Formname = Books_Form
Variable = CursorXXX/A44=;

CODE: WINFORM GET Books_Form.FOCUS INTO CursorXXX;
ERROR: (FOC03610) FOCUS IS NOT A FIELD IN (OR MEMBER OF) TYPE WF_BOOKS_FORM.

Anyone have suggestions.
I currently use an EVENT to compute the object but would prefer to use the correct form of the WINFORM GET command.


John Price
November 29, 2006, 08:48 AM
Maintain Wizard
It doesn't look like:

Winform GET form.focus INTO Here;

is available in WebFOCUS. It was a Mainframe command that may never have been included. I did find a reference to it in the doc. Let me check with programming and see what they say.

If you would like to track this issue, open a case with Customer Support.

Thank you,
Mark Derwin
November 29, 2006, 10:17 AM
Maintain Wizard
John
Programming says that this would be better accomplished with an OnFOCUS trigger for your objects. In my example, I placed a field called Fld on my form. In my objects I used:

function OnButton1_Focus ( ) {
Form1.Fld_Edit.value = "Button1";
}

function OnButton2_Focus ( ) {
Form1.Fld_Edit.value = "Button2";
}

Whenever the object got focus, I set the variable on my form. I can then query the field Fld and get the value in my Maintain code. I hope this helps.

Mark
November 30, 2006, 07:28 AM
John Price
Thanks Mark.

The event (trigger) is the method I'm using and it works fine.

Like you I based my use of WINFORM GET on the manual.


John Price