revlet and path

Devin Asay devin_asay at byu.edu
Thu Aug 6 12:31:38 EDT 2009


On Aug 6, 2009, at 9:56 AM, Tereza Snyder wrote:

>
> On Aug 6, 2009, at 10:06 AM, Devin Asay wrote:
>
>> This is no different than stacks launched from a web server using a
>> desktop-based launcher app. The launched stack resides only in RAM
>> so it has no filename value, as it was not launched from a stackfile
>> in the local filesystem. If there is a defaultFolder, it's on the
>> desktop file system. When you work in this environment, you just
>> have to change your thinking a little bit. You can still have prefs
>> and resource files in a folder next to your stack, but instead of
>> looking in a relative filepath, you have to remember the URL to the
>> stack (obviously you know it or you couldn't launch the stack.)
>> Remove the stackname from the URL and you're left with the web URL
>> ("filepath", if you will) to the folder containing the stack. Just
>> build a new URL by appending the folder and file name of the
>> resources/prefs file and call it that way.
>
>
> and On Aug 6, 2009, at 9:21 AM, Phil Jimmieson wrote:
>
>> It seems that a number of system "globals" don't have values in
>> revlets.
>> I tried a small program to display the following:
>>
>> defaultfolder
>> platform
>> systemversion
>> environment
>
> First, if the global properties that Phil lists are empty, what's the
> best way to determine that my code is running in a Revlet?

   if the global properties that phil lists are empty then
     -- assume you're in revlet environment?
     -- ;-)
   end if

Seriously, I think RunRev ought to return "revlet" or something  
similar in the environment function when you're running as a revlet.  
Bug report/enhancement request, anyone?
>
> Second, some of my apps have a zillion referenced images that build
> the UI. Will I have to define new paths for them on preopenstack or
> preopencard? No shortcut way? I wonder whether I'll have to come up
> with a scheme to cache images...

I think you'd have to build URLs for them on openWhatever as I  
described earlier.

Devin

Devin Asay
Humanities Technology and Research Support Center
Brigham Young University




More information about the use-livecode mailing list