We are having a major problem after enabling renderstyle directx on our vl-forms.
Simply moving the mouse over a list "selects" the values in the list, but doesn't fire a list.itemgotselection event.
What happens is a user will click on an entry, say for customer id 100. Then they mouse down over the list to make a change to the values in the list (we have them as fields below the list). They make a change and click save, but the values in memory are from the last entry they moused over.
Below is a screen shot of what I'm talking about. We submitted this to support in N.America and it came back this is expected behavior.
The keys to our table are in the list but not displayed. They are NameId and ContactId. Here you can see I've clicked Abby but since I've moved the mouse over Leonard and Sean, Sean's name id and contact id are in memory, even though Abby has selection.
If I click to select abby, them mouse left out of the grid, go down to save, the values are correct.
VL-Win problem
-
dannyoorburg
- Posts: 177
- Joined: Mon Jan 04, 2016 9:50 am
- Location: Australia
Re: VL-Win problem
Hi,
Running in DirectX introduces the capability to handle mouse-over/enter/leave events.
Rightly or wrongly, following the logic of all other events in Visual LANSA, these events update the current item and the corresponding field values as they fire.
That's the behaviour you're seeing.
I think you can do two things, either take it up with LANSA Support to see if they consider it a bug or not (I agree it's unwanted behaviour in your case), or change your code so that your entry fields have different names from the one in the list, and specifically handle the ItemGotSelection event to update the fields in RDMLX.
Cheers,
Danny
Running in DirectX introduces the capability to handle mouse-over/enter/leave events.
Rightly or wrongly, following the logic of all other events in Visual LANSA, these events update the current item and the corresponding field values as they fire.
That's the behaviour you're seeing.
I think you can do two things, either take it up with LANSA Support to see if they consider it a bug or not (I agree it's unwanted behaviour in your case), or change your code so that your entry fields have different names from the one in the list, and specifically handle the ItemGotSelection event to update the fields in RDMLX.
Cheers,
Danny
Re: VL-Win problem
Thanks Danny. LPC says this is as designed. But it breaks code that’s been in production a long time.
Many LANSA examples used the technique of naming the fields the same as the grid columns.
I think they need a property on the grid/list that lets you turn off this behavior.
Maybe I’ll email Hamad again and see if he will ask for a lm enhancement.
Is anyone using VL-forms?
Thanks
Many LANSA examples used the technique of naming the fields the same as the grid columns.
I think they need a property on the grid/list that lets you turn off this behavior.
Maybe I’ll email Hamad again and see if he will ask for a lm enhancement.
Is anyone using VL-forms?
Thanks
Art Tostaine
Re: VL-Win problem
When changing over to use Direct X mode you should consider running through your event handlers looking for code based on 'current' or 'focus' field values alone. In my experience changing such event handlers to start with:
Get_Entry Number(#MyGrid.FocusItem.Entry) From_List(#MyGrid)
or
Get_Entry Number(#MyGrid.CurrentItem.Entry) From_List(#MyGrid)
makes them work exactly as before.
Get_Entry Number(#MyGrid.FocusItem.Entry) From_List(#MyGrid)
or
Get_Entry Number(#MyGrid.CurrentItem.Entry) From_List(#MyGrid)
makes them work exactly as before.
- Stewart Marshall
- Posts: 417
- Joined: Thu Nov 05, 2015 5:25 pm
Re: VL-Win problem
Hi Art
Have a look at this tip about adopting DirectX. There are a few other gotchas to look out for.
https://www.lansa.com/support/tips/t0587.htm
Regards
Have a look at this tip about adopting DirectX. There are a few other gotchas to look out for.
https://www.lansa.com/support/tips/t0587.htm
Regards