Page 1 of 1

defining path to video files

Posted: Fri Feb 26, 2010 8:32 pm
by reelstuff
I have a small app I am trying to get to work in a standalone form,

currently it works in the IDE, but once it is compiled into a standalone, it fails to function, due to a path issue,

Code: Select all

  put the filename of this stack into fld "filename"
   set the itemdel to slash
   get fld "filename"
   ## Since I know the name of the folder my video files are located in there should be a method of defining that as a path
   ## put empty into the last item of it
   put it into fld "filename"
  put it into tFolder
  if there is no folder tFolder then exit mouseUp
  put tFolder into field "Folder"
this code, will produce a path that defines the path to some video files I want to play.

In the IDE, I get this type of path which functions perfectly, /Users/reelstuff/Desktop/Player2/

But in the standalone I get this, path,

/Users/reelstuff/Desktop/Player2/Media Player/MacOSX/Media Player.app/Contents/MacOS/

So the media or video files are located, here,

/Users/reelstuff/Desktop/Player2

is there an easy method of filtering out that path so that I can obtain only the path where the actual video
files are located.

So I am hoping to find a way to get the location of the folder where the app file is located not the bundle where the app is located.
Any thoughts on eliminating the unwanted bundle path in MAC OSX, ?

Re: defining path to video files

Posted: Fri Feb 26, 2010 10:31 pm
by FourthWorld

Re: defining path to video files

Posted: Fri Feb 26, 2010 10:46 pm
by reelstuff
Thank you for that reply, I appreciate the link, I do seem to remember that many of my app broke some time ago but I did not find the cause of it,

this explains the issue, and thanks also for the code example, that should help put things into perspective.