B4J Question Viewing Compiled help files in release mode

wheable

Member
Licensed User
I can view my compiled help file from within my app when in debug mode but when I switch to release mode I can't see it .
I'm using this command to view .
fx.ShowExternalDocument(File.geturi(File.Dirassets, "Help.chm"))

In release mode I get a Windows error saying I need a new app to view this 'jar link.
Packaging it up using B4Jpackager results in the same error

Am I missing a basic step ?
 

sorex

Expert
Licensed User
Longtime User
the command is ShowExternalDocument but file.DirAssets are internal files.

maybe you need to copy it to file.DirApp first and then open it there?
 
Upvote 0

wheable

Member
Licensed User
Should have read the documentation more closely . ShowExternalDocument function documentation clearly states that it will fail with files in 'assets as sorex suggested.

I can get it to work with files in the app directory OK but I have to manually copy them there. Where would I put the *.chm help files in my B4J project so that the packager automatically puts them where I can access them. Will I have to move them from within the program ?
 
Upvote 0

sorex

Expert
Licensed User
Longtime User
I think it's the easiest to put it in the files folder and copy it at run time to the app folder then you know that it works when working on the project.

you can always delete the file again when the displayer loaded the file and displays it. not sure what events you can rely on for that.

there's also the dirTemp that you can abuse for that which is probably the user's temp folder.
 
Upvote 0

wheable

Member
Licensed User
I think it's the easiest to put it in the files folder and copy it at run time to the app folder then you know that it works when working on the project.

you can always delete the file again when the displayer loaded the file and displays it. not sure what events you can rely on for that.

there's also the dirTemp that you can abuse for that which is probably the user's temp folder.
 
Upvote 0

wheable

Member
Licensed User
dirApp doesn't seem to work (Am I allowed to write to that directory ? ) dirData works fine . I don't need to delete the help file, just not keep writing it .

I have a workable solution now, maybe not the most elegant but it works !

Thanks for your help
 
Upvote 0

sorex

Expert
Licensed User
Longtime User
I'm using file.dirApp all the time for my game tools so it should work aswell.

maybe it's a limitation to that packager thing?
 
Upvote 0

sorex

Expert
Licensed User
Longtime User
you can always wrap your packager into a setup file where you can add your help file so that it gets copied by the installer.

I never worked with that java packager so it might be a step too much.

or stick to using that temp folder which worked fine.
 
Upvote 0
Top