PxPlus User Forum

Twitter Twitter Twitter

Author Topic: Nomads Library Paths  (Read 853 times)

James Zukowski

  • Diamond Member
  • *****
  • Posts: 297
    • View Profile
Nomads Library Paths
« on: March 22, 2022, 09:12:22 AM »
Is there a simple way to have Nomads search multiple paths for a library? This would include a path not in the prefix.
What I had originally thought was something like:
Code: [Select]
process "MyPanel","MyLibrary",err=*next; goto It_Works
process "MyPanel","../nomlib/MyLibrary"
It_Works:
Unfortunately, this doesn't work as intended. If Nomads can't find the library using the language extension options, it bails out without taking the err=*next.
The other option I'm looking into is to simply try to open the library locally, then in the alternate path(s), until it's found and then use the result.
Any other suggestions?
James Zukowski
Sr. Developer - J&E

BRAND>SAFWAY
Brand Industrial Services

Stéphane Devouard

  • Diamond Member
  • *****
  • Posts: 122
  • PxPlus guru with skills in PHP, JS, C#, Java
    • View Profile
    • Stéphane's Web Resume
Re: Nomads Library Paths
« Reply #1 on: March 22, 2022, 10:13:47 AM »
James

Nomads has a special logic for this :

%NOMADS'Process$
%NOMADS_Process$
Pre-processing for panel name and library. Program is called using the SCRN_ID$ and SCRN_LIB$ as arguments.

Just set the variable or the %NOMADS property to the name of a program (or program;label) of your own in your START_UP or LPG / app initialization program
You can do whatever logic you want in this code, as long as you set the second argument to the actual full pathname of the library before EXITing

Hope this helps

Regards
« Last Edit: March 22, 2022, 10:15:44 AM by Stéphane Devouard »
Stéphane Devouard
Portfolio | Work

James Zukowski

  • Diamond Member
  • *****
  • Posts: 297
    • View Profile
Re: Nomads Library Paths
« Reply #2 on: March 22, 2022, 02:42:53 PM »
Thank you, Stéphane. By putting my second thought into a common routine that's set with %Nomad_Process$, it works perfectly!
James Zukowski
Sr. Developer - J&E

BRAND>SAFWAY
Brand Industrial Services