Page 1 of 1

VLF question re. GetCurrentInstance and #vf_lw002

Posted: Tue Aug 30, 2016 11:58 pm
by HMJust
Hello everyone

I work on a VLF solution but have been unable to find the documentation for the manager objects that are being used. Specifically I have a bug in my solution where I have an instance list and call

Define_Com Class(#vf_sw100) Name(#avFrameworkManager)
Define_Com Class(#vf_lw002) Name(#avListManager) Reference(*Dynamic)
...
#avListManager.GetCurrentInstance Visualid2(#VARNR) Nkey1(#LISTCOUNT) Nkey2(#OPSNR) Nkey3(#EANTAL) Nkey4(#OANTAL) Akey1(#LEVNR) Akey2(#LKORT) Akey3(#ART)

and in one case I get a value in #OPSNR while in another, I don't. And I am pretty sure I set the value when I updated the instance list

#avListManager.BeginListUpdate
#avListManager.ClearList
...
#avListManager.AddtoList Visualid1(#OPSNR.AsString) Visualid2(#VARNR) Nkey1(#LISTCOUNT) Nkey2(#OPSNR) Nkey3(#EANTAL) Nkey4(#OANTAL) Akey1(#LEVNR) Akey2(#LKORT) Akey3(#ART) Acolumn1(#LEVNR) Acolumn2(#LKORT) Acolumn3(#ART) Acolumn4(#FPLDK) Acolumn5(#FPLNO) Ncolumn1(#OANTAL) Ncolumn2(#TOTDK) Ncolumn3(#TOTNO) Ncolumn4(#EANTAL) Ncolumn5(#EANTAL2) Ncolumn6(#AVPCT) Ncolumn7(#UDSAL1)
...
#avListManager.EndListUpdate

I hope that if I understand the listmanager better, I will be able to find the bug, so if anyone has any suggestion please tell me :-)

I would, of course, also like to see some documentation for #vf_sw100 / frameworkmanagers methods, like
#avFrameworkManager.avRestoreValue and .avSaveValue

Re: VLF question re. GetCurrentInstance and #vf_lw002

Posted: Wed Aug 31, 2016 6:28 am
by MarkDale
Just checking.
This is in a WAM filter is it?
What version of the VLF are you using?

There is a hotfix 5 for VLF132100 which is described as
153642 The first attempt to retrieve an NKEY (numeric key) of the current instance list entry may return 0 instead of the correct value.

So that might be your problem. Contact support to get the hotfix.

Re: VLF question re. GetCurrentInstance and #vf_lw002

Posted: Wed Aug 31, 2016 4:31 pm
by HMJust
Yes.

VLF build #140006, so I would expect it to be included already.

And incredibly, after looking through the various docs for VL for a month, I found some that may be useful here: http://docs.lansa.com/14/EN/lansa048/in ... istmanager. I'll begin to go through that now.

Re: VLF question re. GetCurrentInstance and #vf_lw002

Posted: Wed Aug 31, 2016 4:47 pm
by MarkDale
There's a hotfix 1 for 140006 that's in the same area and might well solve your problem. You can get that from support.

Re: VLF question re. GetCurrentInstance and #vf_lw002

Posted: Wed Aug 31, 2016 11:19 pm
by HMJust
Thank you.