start using

Ken Ray kray at sonsothunder.com
Tue Feb 24 10:31:03 EST 2004


Kevin,

When you use a relative location, it is relative to where the Revolution
engine is running. You can determine what that is by getting "the
directory" and seeing where it points to. To change the directory so it
is in the same folder as your currently running stack in the IDE, you
can execute this:

on preOpenStack
  set the directory to MyFolderPath(the filename of this stack)
end preOpenStack

function MyFolderPath pPath
  local tDir
  get matchText(pPath,"(.*\/)",tDir)
  return tDir
end MyFolderPath

-- BTW: The MyFolderPath function above uses regular expressions; if you
don't like/use regex you can do this instead:

function MyFolderPath pPath
  set the itemDel to "/"
  put (item 1 to -2 of pPath) & "/" into tDir
  return tDir
end MyFolderPath

HTH,

Ken Ray
Sons of Thunder Software
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/ 

> -----Original Message-----
> From: use-revolution-bounces at lists.runrev.com 
> [mailto:use-revolution-bounces at lists.runrev.com] On Behalf Of Kevin
> Sent: Tuesday, February 24, 2004 8:34 AM
> To: use-revolution at runrev.com
> Subject: RE: start using 
> 
> 
> 
> I could be doing one of those dumb user/developer tricks so 
> please forgive in advace if this is stupid.  I attempted last 
> night to put in the preOpen the following.
> 
> 
> start using "../common/libMine.rev" 
> 
> start: can't find object
> libGraph
> start using "../common/libMine.rev" 
> "/Users/kevin/src/transcript/graph/libGraph.rev
> 
> and 
> 
> start using stack "../common/libMine.rev"
> 
> Error 
> 
> Chunk: can't find stack
> libGraph
> start using stack "../common/libMine.rev"
> stack "/Users/kevin/src/transcript/graph/libGraph.rev"
> 
> 
> 
> 
> _______________________________________________
> Join Excite! - http://www.excite.com
> The most personalized portal on the Web! 
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com 
> http://lists.runrev.com/mailman/listinfo/use-> revolution
> 




More information about the use-livecode mailing list