i have a problem that cost me lots of time, but i couldnt solve it.
Filesystem-history:
help.app/Contents/MacOS/helpfiles/
The app is called "help"
the html-files are how you see above in a sub-folder called "helpfiles"
the damn webgadget should show me the shit with file://
I have a sidebar-list on the left-side of the window and the webgadget at the rightside.
if i click on a html-file in the list, it shell show the damn content in the webgadget.
now the problem:
the app works in the compiled-directory very well. think the compiled-directory is just the project directory. think something like this:
/Users/myhome/myprojects/myhelpApp/
in that path is my source-code and if I compile the whole shit, I get there my help.app
if i double click on it, everything works perfect.
if i copy the shit to another directory on my computer, the program loads, but the html-files wont see.
i cannot post the whole code, because its to large. this is my code to find the correct root permanently:
Code: Select all
Global myPath.s = ""
myPath = GetPathPart(ProgramFilename())
CompilerIf #PB_Compiler_OS = #PB_OS_Windows
#sys_char = "\"
CompilerElse
#sys_char = "/"
CompilerEndIf
If Right( myPath, 1 ) <> #sys_char
myPath + #sys_char
EndIf
Global myFiles.s = myPath + "helpfiles/"
Code: Select all
SetGadgetText( webGadgetID, "files://" + myFiles + currentFile )
Code: Select all
If eventCode = #PB_Event_Gadget And EventGadget() = MyListID And EventType() = #PB_EventType_Change
currentFile = GetGadgetItemText( MyListID, GetGadgetState(MyListID) )
SetGadgetText( webGadgetID, "files://" + myFiles + currentFile )
EndIf
what do you i wrong?
has anyone an idea?