the platform...

Something you want to see in a LiveCode product? Want a new forum set up for a specific topic? Talk about it here.

Moderator: Klaus

Post Reply
massung
Posts: 93
Joined: Thu Mar 19, 2009 5:34 pm

the platform...

Post by massung » Sat Jan 02, 2010 3:12 pm

...or the environment should be capable of returning "Web" or similar to indicate that the stack is running in a browser.

With the application I'm currently working on, I'm wanting to put a slightly gimped, web version of my app online as a trial version. It'd be nice to have everything be the same app and just a couple if statements to disable certain features.

Or, if this feature is already there, can someone point me to it?

Thanks!

Jeff M.

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: the platform...

Post by Klaus » Sat Jan 02, 2010 4:02 pm

Hi massung,

I think that "the environment" returns "Browser" in a Revlet.
Check the "user contributed notes" in the docs (Rev Dictionary) under "environment"!


Best

Klaus

Dixie
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1336
Joined: Sun Jul 12, 2009 10:53 am

Re: the platform...

Post by Dixie » Tue Jan 05, 2010 11:05 am

massung...

use something like this...

Code: Select all

on openStack
   /*on the desktop */
   if environment() = "development" OR environment() = "standalone" then
         -- do something
   end if
   
   /* on the server */
   if environment() = "browser" then
        -- do something else
   end if
end openStack
be well

Dixie

Post Reply