hide Command-line argument variables (&0)?

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
erikhans08
Posts: 87
Joined: Wed Mar 25, 2015 2:01 am

hide Command-line argument variables (&0)?

Post by erikhans08 » Mon May 11, 2015 3:10 am

page 146 LiveCode Users Manual:
Command-line argument variables
If you start up the application from a command line, the command name is stored in the
variable $0 and any arguments passed on the command line are stored in numbered
variables starting with the $ character.

A long list of $... entries appears in the Variables section of the Code Editor.
Can you hide these?

TIA

Erik Hansen

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: hide Command-line argument variables (&0)?

Post by Mark » Mon May 11, 2015 10:18 am

Hi Eric,

The $ variables in the code editor aren't command line variables. They are environment variables. Only $0, $1, $2... are command line variables. The other $ variables are environment variables, which are defined by the operating system and read by LiveCode on startup. For each environment variable, LiveCode creates a global variable and gives it a name starting with $. Normally, you don't want to hide these variables, because they may appear to be useful.

I din't think you can hide them in edit mode, but you can hide the global variables in debug mode. Go to the Script Editor pane of the preferences window and turn off the option "Show globals". This will hide all global variables in debug mode, except those that are used by the currently running handler.

Kind regards,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

Post Reply