Page 1 of 1

VL-Win problem

Posted: Tue Feb 13, 2018 5:25 am
by atostaine
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.
screenshot2.png
screenshot2.png (10.69 KiB) Viewed 17652 times

Re: VL-Win problem

Posted: Tue Feb 13, 2018 11:13 am
by dannyoorburg
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

Re: VL-Win problem

Posted: Tue Feb 13, 2018 11:33 am
by atostaine
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

Re: VL-Win problem

Posted: Tue Feb 13, 2018 12:17 pm
by MarkD
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.

Re: VL-Win problem

Posted: Tue Feb 13, 2018 12:25 pm
by atostaine
That’s interesting Mark. I’ll give that a try.

Art

Re: VL-Win problem

Posted: Tue Feb 13, 2018 2:52 pm
by Stewart Marshall
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

Re: VL-Win problem

Posted: Tue Feb 13, 2018 3:42 pm
by atostaine
Stewart: thanks for this. Lots of info, sorry I missed it.

Art