3 Questions from a New User

Jeanne A. E. DeVoto jeanne at runrev.com
Mon Aug 5 12:49:00 CDT 2002


At 1:32 AM -0700 8/5/2002, Boguss Twentysix wrote:
>(1) Menu Manager Functionality.  How do I put line breaks into a dialog such
>as "About" that is called from a menu item?  I cannot figure out how to do
>this with the "answer" command.  It is desirable to display something like
>this:
>
>Hello World
>By James Wages
>Version 1.0, August 2002
>Copyright 2002

You use the "return" constant to specify a line break with the answer
command. The parts of the string are "stuck together" with the
concatenation operator, "&":

  answer "Hello World" & return & "By James Wages" & return \
     & "Version 1.0, August 2002" & return & "Copyright 2002"

(The above command has been broken in half with the "\" keyword - this
simply lets you cut a line in half for easy readability in the script
editor while still having Rev treat it as a single line when executed.)

(By the way, the answer command isn't actually part of the Menu Manager as
such - you can use it in any script, not just menu scripts.)


>(2) Menu Manager Functionality.  Is it possible to call custom icons into
>dialogs via the answer command (or another similar command) (i.e., icons
>other than "information" and the like)?  If now, how about placing a custom
>graphic inside a dialog (such as the "About" dialog)?

You can't specify other icons with the answer command, but you can create
your own stack with whatever controls you wish to show, and use the "modal"
command to display it as a dialog box. (The answer dialog itself is a stack
displayed in this way.)


>(3) Distribution Builder: MacOS Options.  Under the "Macintosh Memory
>Information" cluster, how do I know what to input into the "Suggested,"
>"Minimum" and "Preferred Size" fields?

Unfortunately, there is no general rule for this. It's going to depend very
much on what's in your stack and on whether you show/use content (such as
movies) that are in files outside the stack, and you may have to do some
trial and error to find optimal settings.

As an extremely rough rule of thumb, you can total the size of all stack
files that will be open at once, plus any external media (pictures, movies)
you might display at any given time, plus 4M, to obtain a good working
minimum. Suggested and Preferred should generally be set to the same number
by default (the user can change "Preferred") - this might be the same as
the minimum, if your app's requirements aren't going to vary much in use,
or they might be set higher if your app allows the user to open several
documents or otherwise use very variable amounts of data. In either case,
testing will be necessary to make sure you are allowing sufficient memory
for normal use.

--
Jeanne A. E. DeVoto ~ jeanne at runrev.com
Runtime Revolution Limited - The Solution for Software Development
http://www.runrev.com/





More information about the use-livecode mailing list