cancel
Showing results for 
Search instead for 
Did you mean: 

setlibrarylist and machine compile

Former Member
0 Kudos

PB 12.5.2, current EBF

Windows 7, 8, 8.1 (32 and 64bit)

We're doing a machine compile to avoid a app crash (one specific response window, no weird code, worked in 10.2.1, now crashes at random) and have several PBD files that we normally use. Now they're DLL files.

How does PB handle SetLibraryList when there are no actual PBDs, but DLL files instead? Can a different app still open and use them like it's a PBD to grab datawindow objects? (we have a situation where some nested reports need to have sort order changed and there's no way to dynamically change it more than one time unless a separate app modifies it in a common pbl) Should I use GetEnvironment and check the MachineCode property and adjust the SetLibraryList calls as appropriate (changing .pbd to .dll)?

And as an aside - is the redraw bug known when changing sort order in 12.5.2 5652? (in the drag/drop sort order window, nothing changes visually when you move columns around, but the sort actually does change for the window and you can see it if you re-open the sort order again) I asked this 2 weeks ago and got no response at all.

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Brad;

  Yes, the SetLibraryList ( ) or AddToLibraryList ( ) methods will work with PBD's or DLL's.

Regards ... Chris

Former Member
0 Kudos

I know it'll work, but do I need to change which it's referencing.

Current code uses setlibrarylist with PBD extensions, if I don't change it, will it still find datawindows in DLL files when I compile as machinecode?

Former Member
0 Kudos

Hi Brad;

  Yes, you would need to refer to your libraries with the .DLL extension not .PBD for M-Code compilation.

Suggestions:

1) Define your library list in an INI file and load the values from there.    

   - or -

2) Use the GetLibraryList ( ) along with the POS ( ) to see if you get  a hit on ".dll" or ".pbd". Once you know the default extension - use the AddtoLibraryList ( ) or SetLibraryList from a format like "Library1.xxx, Library2.xxx, Library3,xxx  ..." using the  Replace ( ) method to swap out the ".xxx" with either a PBD or DLL extension as required.

Note: For P-Code compiles - your library list can be a mix of PBL and/or PBD's.

HTH

Regards ... Chris

Former Member
0 Kudos

Chris,

Since one of these apps won't have any PBD's by default, I'll use the environment object MachineCode property.

Thanks

Former Member
0 Kudos

Another good item to introspect to determine the library type you need to set! 

Answers (0)