Re: [fpc-pascal] specifying the relative path to a file that is located in the same folder as the application bundle?

2009-02-06 Thread Travis Siegel
So, as someone who only uses terminal apps written in fpc ( since ibuilder isn't really that usable and writing interface generating code is still beyond me despit trying for 4 years) Could you please post a copy of a code segment that shows how you performed this little marvel of finding

Re: [fpc-pascal] specifying the relative path to a file that is located in the same folder as the application bundle?

2009-02-06 Thread Frank Peelo
Ken G. Brown wrote: Basically from point of sale system running on Macintosh, I needed to pick up a file with a known name located in the same folder as the application bundle, and process it for printing in a custom format. This way it does not need the file path hard coded in case it is

Re: [fpc-pascal] specifying the relative path to a file that is located in the same folder as the application bundle?

2009-02-06 Thread Jonas Maebe
On 06 Feb 2009, at 17:05, Frank Peelo wrote: Ken G. Brown wrote: Basically from point of sale system running on Macintosh, I needed to pick up a file with a known name located in the same folder as the application bundle, and process it for printing in a custom format. This way it does not

Re: [fpc-pascal] specifying the relative path to a file that is located in the same folder as the application bundle?

2009-02-06 Thread Ken G. Brown
At 4:05 PM + 2/6/09, Frank Peelo apparently wrote: Ken G. Brown wrote: Basically from point of sale system running on Macintosh, I needed to pick up a file with a known name located in the same folder as the application bundle, and process it for printing in a custom format. This way it does

Re: [fpc-pascal] specifying the relative path to a file that is located in the same folder as the application bundle?

2009-02-05 Thread Jonas Maebe
On 05 Feb 2009, at 08:54, Ken G. Brown wrote: How can I find the directory path to the executable of the currently executing program from within the program? Or alternately, how can I specify the relative path to a file that is located in the same folder as the application bundle for my

Re: [fpc-pascal] specifying the relative path to a file that is located in the same folder as the application bundle?

2009-02-05 Thread Ken G. Brown
Thx for the quick response! I think I'm almost there. I seem to have a bundlePath : CFURLRef; but I don't quite know what to do with it. How do I convert it to something I can use in a Reset() to open a file? Thx, Ken G. Brown At 10:29 AM +0100 2/5/09, Jonas Maebe apparently wrote: On 05 Feb

Re: [fpc-pascal] specifying the relative path to a file that is located in the same folder as the application bundle?

2009-02-05 Thread Jonas Maebe
On 05 Feb 2009, at 17:03, Ken G. Brown wrote: Thx for the quick response! I think I'm almost there. I seem to have a bundlePath : CFURLRef; but I don't quite know what to do with it. How do I convert it to something I can use in a Reset() to open a file? If you enter CFURLRef in the

Re: [fpc-pascal] specifying the relative path to a file that is located in the same folder as the application bundle?

2009-02-05 Thread Ken G. Brown
Whew! Thx! I was part way through all that but wasn't sure what I could pass to reset(); Digging through it now. I haven't dealt with this stuff before. Ken At 6:24 PM +0100 2/5/09, Jonas Maebe apparently wrote: On 05 Feb 2009, at 17:03, Ken G. Brown wrote: Thx for the quick response! I think

Re: [fpc-pascal] specifying the relative path to a file that is located in the same folder as the application bundle?

2009-02-05 Thread Jonas Maebe
On 05 Feb 2009, at 21:29, Ken G. Brown wrote: So far I have the following external definitions: All external definitions you need are already in the MacOSAll unit shipped with FPC. Function CFStringGetFileSystemRepresentation(myPathString : CFStringRef; buffer : ppchar; maxBufLen :

Re: [fpc-pascal] specifying the relative path to a file that is located in the same folder as the application bundle?

2009-02-05 Thread Ken G. Brown
At 9:51 PM +0100 2/5/09, Jonas Maebe apparently wrote: On 05 Feb 2009, at 21:29, Ken G. Brown wrote: So far I have the following external definitions: All external definitions you need are already in the MacOSAll unit shipped with FPC. Function CFStringGetFileSystemRepresentation(myPathString

Re: [fpc-pascal] specifying the relative path to a file that is located in the same folder as the application bundle?

2009-02-05 Thread Ken G. Brown
Thanks a bunch for all the help! My legacy OS 9 app is now upgraded to OS X and working! It put up a hell of a fight but with all your help, the obstacles have been overcome. Awesome! Ken G. Brown At 9:51 PM +0100 2/5/09, Jonas Maebe apparently wrote: You have to allocate memory for it.

[fpc-pascal] specifying the relative path to a file that is located in the same folder as the application bundle?

2009-02-04 Thread Ken G. Brown
MacOS X, 10.5.6, fpc 2.2.2 How can I find the directory path to the executable of the currently executing program from within the program? Or alternately, how can I specify the relative path to a file that is located in the same folder as the application bundle for my currently executing