(RDMLX) Any way to force a focus refresh?

Please do not use to report errors- use your regional help desk.
Please mark posts as being for RPG or RDMLX (LANSA) developer.
To subscribe by email, display this forum, scroll to the end and select ‘Subscribe Forum’.
Mark_Dale
Posts: 61
Joined: Thu Apr 19, 2012 11:06 am

Re: (RDMLX) Any way to force a focus refresh?

Post 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
MarkDuignan
Posts: 346
Joined: Wed Apr 18, 2012 10:33 am

Re: (RDMLX) Any way to force a focus refresh?

Post 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.
stevec
Posts: 138
Joined: Thu Aug 23, 2012 6:45 am

Re: (RDMLX) Any way to force a focus refresh?

Post 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?
MarkDuignan
Posts: 346
Joined: Wed Apr 18, 2012 10:33 am

Re: (RDMLX) Any way to force a focus refresh?

Post by MarkDuignan »

We don't know yet.
Will post a response when we have figured out what the issue is.
Mark_Dale
Posts: 61
Joined: Thu Apr 19, 2012 11:06 am

Re: (RDMLX) Any way to force a focus refresh?

Post 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)
stevec
Posts: 138
Joined: Thu Aug 23, 2012 6:45 am

Re: (RDMLX) Any way to force a focus refresh?

Post by stevec »

Thanks. I will wait for R16. Is there an eta on this?
MarkDuignan
Posts: 346
Joined: Wed Apr 18, 2012 10:33 am

Re: (RDMLX) Any way to force a focus refresh?

Post by MarkDuignan »

Next 2 to 3 weeks if all goes well.
stevec
Posts: 138
Joined: Thu Aug 23, 2012 6:45 am

Re: (RDMLX) Any way to force a focus refresh?

Post 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.
Mark_Dale
Posts: 61
Joined: Thu Apr 19, 2012 11:06 am

Re: (RDMLX) Any way to force a focus refresh?

Post 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
stevec
Posts: 138
Joined: Thu Aug 23, 2012 6:45 am

Re: (RDMLX) Any way to force a focus refresh?

Post by stevec »

Thanks Mark I installed and it works now!
Post Reply