If I have a .prg in my app and I right-click & select ‘Add to Library‘ then the prg gets copied into the library section and I can use it as a library file, all ok.
The original file stays behind with the ‘app files’ though and it appears that there is no link between the newly created ‘library file’ and the original one because changes are not persisted between them – is this just done for safety? I guess after adding a file to the library I would probably want to delete the original one from the app right?
In an App, when you ‘Add to library’ (prg script file), the prg is copied to the library and can be used by other Apps. There is no link between the original App prg and the library copy. Changes to the library copy should be made in the Library workspace. If you want to use the library copy from your originating App, then yes, delete the App prg.
If you have files called ‘myprg.prg’ in both your App and the Library and issue ‘do myprg’, the one in the App will be run. If you issue ‘do myotherprg’ and no myotherprg.prg exists in the current App, then the Library will be checked and the file run if it exists.
with the library page in the library, the code called by the library page has to be in the library, and the delegates referenced in the page attributes have to have the lib:/ prefix on them
from a page, I open a saved page in the “Page Library” with the command: Lianja.showDialog (….), or showDialogPanel, is the same.
If I try to debug, I do not see the code executed ..
will it be possible to debug pages viewed with lianja.showDialog ()?
what I’ve found is that if the debugger misses where I put the breakpoint, I start in the program that calls the one I’m interested in, and then step into it.
In the past when I have had to debug a page that gets called from showdialog, I debugged it from the original project.
Meaning – lets say I had a project called leftpage. I then used that in another project called mainpage.
When I opened mainpage, I could not debug leftpage.
So I opened the project called lefpage and debugged the code in the original project where the code was created.