defining path to video files

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
reelstuff
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 254
Joined: Mon Apr 16, 2007 12:06 am
Contact:

defining path to video files

Post by reelstuff » Fri Feb 26, 2010 8:32 pm

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, ?

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10052
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: defining path to video files

Post by FourthWorld » Fri Feb 26, 2010 10:31 pm

Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

reelstuff
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 254
Joined: Mon Apr 16, 2007 12:06 am
Contact:

Re: defining path to video files

Post by reelstuff » Fri Feb 26, 2010 10:46 pm

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.

Post Reply