VL-Win problem

This Q&A forum allows users to post and respond to "How Do I Do ....." questions. Please do not use to report (suspected) errors - you must use your regional help desk for this. The information contained in this forum has not been validated by LANSA and, as such, LANSA cannot guarantee the accuracy of the information.
Post Reply
atostaine
Posts: 282
Joined: Wed Jan 20, 2016 7:38 am

VL-Win problem

Post by atostaine » Tue Feb 13, 2018 5:25 am

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 810 times
Art Tostaine

dannyoorburg
Posts: 124
Joined: Mon Jan 04, 2016 9:50 am
Location: Australia

Re: VL-Win problem

Post by dannyoorburg » Tue Feb 13, 2018 11:13 am

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

atostaine
Posts: 282
Joined: Wed Jan 20, 2016 7:38 am

Re: VL-Win problem

Post by atostaine » Tue Feb 13, 2018 11:33 am

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
Art Tostaine

MarkD
Posts: 454
Joined: Wed Dec 02, 2015 9:56 am

Re: VL-Win problem

Post by MarkD » Tue Feb 13, 2018 12:17 pm

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.

atostaine
Posts: 282
Joined: Wed Jan 20, 2016 7:38 am

Re: VL-Win problem

Post by atostaine » Tue Feb 13, 2018 12:25 pm

That’s interesting Mark. I’ll give that a try.

Art
Art Tostaine

User avatar
Stewart Marshall
Posts: 409
Joined: Thu Nov 05, 2015 5:25 pm

Re: VL-Win problem

Post by Stewart Marshall » Tue Feb 13, 2018 2:52 pm

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
Stewart Marshall

Independent IT Consultant
www.marshallfloyd.com.au

atostaine
Posts: 282
Joined: Wed Jan 20, 2016 7:38 am

Re: VL-Win problem

Post by atostaine » Tue Feb 13, 2018 3:42 pm

Stewart: thanks for this. Lots of info, sorry I missed it.

Art
Art Tostaine

Post Reply