Page 3 of 3
Re: (RDMLX) Any way to force a focus refresh?
Posted: Tue Apr 29, 2014 2:19 pm
by Mark_Dale
Your called objects should not be extending LRNG_FORM - they should be extending PRIM_OBJT. Otherwise you have multiple instances of LRNG_FORM
Re: (RDMLX) Any way to force a focus refresh?
Posted: Tue Apr 29, 2014 2:27 pm
by MarkDuignan
Passing the main form reference around is a useful technique.
Need to be careful with the called methods being in a different Role(*EXTENDS #LRNG_FORM) VL object.
They really should be clustered into a Role(*EXTENDS #PRIM_OBJT) object - otherwise there are going to be two or more class #LRNG_FORM objects floating around - which has instantiation performance implications - and possibility of confusion of #Com_Owner -v- #FormView references.
Not necessairly #PRIM_OBJT - as long as is it something other than #LRNG_FORM or any descendant of it.
Re: (RDMLX) Any way to force a focus refresh?
Posted: Tue Apr 29, 2014 2:53 pm
by stevec
Changing to prim_objt on ttier 2 and tier 3 here still has same effect of no focus.
Any solution or just another enhancement request?
Re: (RDMLX) Any way to force a focus refresh?
Posted: Tue Apr 29, 2014 4:13 pm
by MarkDuignan
We don't know yet.
Will post a response when we have figured out what the issue is.
Re: (RDMLX) Any way to force a focus refresh?
Posted: Fri May 02, 2014 9:45 am
by Mark_Dale
There is a plan to add a new property to the dropdown for RV16. This new property will force the dropdown to display expanded, even if it currently has focus.
The existing Hasfocus will continue to work as it always has done. (What it does is reasonable - it is just not what you want it to do)
You can wait for the new property in RV16, or you could use IsNewForm := true, or there is a workaround.
Earlier I suggested that the workaround was to set the dropdown to null.
i.e.
* Set to null
#Com_Owner.Set_Null Property('MYDROPDOWN')
*then load the dropdown items and display the dropdown
#Com_Owner.LoadDropdown uName('MYDROPDOWN')
#Com_Owner.Set_Dropdown Onvaluechange(LEVEL2CHANGED) Value(*blanks) Name('MYDROPDOWN') HasFocus(True)
This works for most scenarios.
The reason this did not work for your scenario is because your dropdown is displayed inside a Table cell.
Table cells cannot be individually set to null. What you have to do is set the table row to null, and recreate it.
So if you change your code to delete and recreate the Table row (and the dropdown in it) you will find that Hasfocus(True) will cause the dropdown to display as expanded.
* delete the Table row
#Com_Owner.Set_Null Property('TableTest.Row%2')
* recreate the table row
#TableRow := 'TableTest.Row%2'
#Com_Owner.Set_Label Name(#TableRow + '.Title') Text('DropDown 1:')
#Com_Owner.Set_Dropdown Name(#TableRow + '.Value') Disabled(False)
* Load the drop down
#Com_Owner.LoadLevel2 uName((#TableRow + '.Value'))
#Com_Owner.Set_Dropdown Onvaluechange(LEVEL2CHANGED) Value(*blanks) Name((#TableRow + '.Value')) HasFocus(True)
Re: (RDMLX) Any way to force a focus refresh?
Posted: Sat May 03, 2014 1:24 am
by stevec
Thanks. I will wait for R16. Is there an eta on this?
Re: (RDMLX) Any way to force a focus refresh?
Posted: Mon May 05, 2014 9:04 am
by MarkDuignan
Next 2 to 3 weeks if all goes well.
Re: (RDMLX) Any way to force a focus refresh?
Posted: Tue May 20, 2014 5:20 am
by stevec
How do I do this now in V16?
I have client updated but assume that I need new server piece. What is the new property to force the expansion called? I did not see it in the documentation.
Re: (RDMLX) Any way to force a focus refresh?
Posted: Tue May 20, 2014 11:15 am
by Mark_Dale
The new property is in the documentation for a dropdown - it is called PickerOpen
http://www.longrangemobile.com/docs/lan ... opdown.htm
Re: (RDMLX) Any way to force a focus refresh?
Posted: Fri May 23, 2014 1:26 am
by stevec
Thanks Mark I installed and it works now!