PxPlus User Forum

Twitter Twitter Twitter

Author Topic: Loading Nomads defined list boxes  (Read 1127 times)

crcanassr

  • Member
  • **
  • Posts: 9
    • View Profile
Loading Nomads defined list boxes
« on: March 28, 2021, 06:39:26 PM »
I am moving an application from Providex to PxPlus and I an stuck on loading a list box defined through Nomads.

In Providex I just use the directive:

LIST_BOX LOAD MY_LIST_BOX,1,"TITLE"
   
Where MY_LIST_BOX is defined in a Nomads screen with that control name. Providex finds the control and displays the list box.

I try the same on PxPlus and it fails.  It does not find the control.

Is it there something I am missing?  I looked at PxPlus documentation and it does not indicates how it works with Nomads.

Thanks in advance for your insight.

Mike King

  • Diamond Member
  • *****
  • Posts: 3810
  • Mike King
    • View Profile
    • BBSysco Consulting
Re: Loading Nomads defined list boxes
« Reply #1 on: March 29, 2021, 09:15:38 AM »
There should be no difference.  To determine the cause of your issue more information would be needed such as how you defined the list box, what type of list box (list view, standard, formatted, tree view, ...)

Also are you running this may also make a difference, are you using WindX and if so what versions and what type of host.
Mike King
President - BBSysco Consulting
eMail: mike.king@bbsysco.com

Mike King

  • Diamond Member
  • *****
  • Posts: 3810
  • Mike King
    • View Profile
    • BBSysco Consulting
Re: Loading Nomads defined list boxes
« Reply #2 on: March 29, 2021, 10:31:12 AM »
Just re-read your post and you indicated that you named your list box "MY_LIST_BOX" in Nomads.

All versions of Nomads have always assigned the handle to the control to the variable with the name of the control suffixed with ".CTL".

So given you named the list box "MY_LIST_BOX" then the LIST_BOX LOAD command should have been:

LIST_BOX LOAD MY_LIST_BOX.CTL,1,"TITLE"
Mike King
President - BBSysco Consulting
eMail: mike.king@bbsysco.com

crcanassr

  • Member
  • **
  • Posts: 9
    • View Profile
Re: Loading Nomads defined list boxes
« Reply #3 on: March 29, 2021, 01:59:54 PM »
Thank you for your prompt response.

I added .CTL to the list box name, but still no dice.  The list box is part of a panel and defined as standard, COLUMN 1, ROW 1, WIDE 75, LENGTH 3.  Nothing else as the list box is populated by the program after loading it.  I even try to create a new panel  with just the list box and still no dice, it gets stuck on LIST_BOX LOAD.  What I have is:

LIST_BOX LOAD MY_LIST_BOX.CTL,1,"TITLE"

I know I will encounter some compatibility problems moving to PXPlus but right now this is my roadblock.

Thank you.

crcanassr

  • Member
  • **
  • Posts: 9
    • View Profile
Re: Loading Nomads defined list boxes
« Reply #4 on: March 29, 2021, 02:44:13 PM »
I get an error 65, meaning that the control is not found, and that can be because the panel containing it has not been drawn.

I call the panel using: PROCESS "mypanel","pos.en",COMPANY$

Before loading the panel performs "program1:init"

Then after loading it performs "program1:process_mylistbox"

Here is where I get the error.  The statement on program1 is the one I have posted.  Now the panel is loaded and therefore the list box should be accessible, but it is not.

Sorry to bother you.

crcanassr

  • Member
  • **
  • Posts: 9
    • View Profile
Re: Loading Nomads defined list boxes
« Reply #5 on: March 29, 2021, 03:00:48 PM »
Found it!!!

I was issuing a CLOSE(*) before loading the list box.  It looks like that under ProvideX, CLOSE(*) just closed the data files but not the library, but PxPlus does closed the library and therefore the panel.   .CTL is no required.

Thank you for your help.

crcanassr

  • Member
  • **
  • Posts: 9
    • View Profile
Re: Loading Nomads defined list boxes
« Reply #6 on: March 29, 2021, 03:30:11 PM »
Now, close(*) should no close the window as I have SET_PARAM 'WK' at the start of my program.
WK does not work even when launching PXPlus with -WK parameter.
Changed close (*) to close individual files and voila, it works!!!!