Help for a non-code newbie!

Ken Norris pixelbird at interisland.net
Tue Jul 22 02:57:01 EDT 2003


Hi Lars, and welcome to the Rev list,

> Date: Mon, 21 Jul 2003 15:29:28 -0600
> Subject: Help for a non-code newbie!
> From: Lars Brehmer <lbrehmer at rof.net>

---------snip
> 1. Is there a way to hide multiple objects without a line for each one
> in the handler?
----------
Sure, but I wish I knew exactly what you want to do. It looks like there may
be a better way to accomplish your task. In the meantime, if you name your
fields in order, i.e., Field 1, Field 2, etc., then:

on myHandler
  repeat with fNum = 1 to 8
    hide fld ("Field " & fNum) -- Note the space after Field
  end repeat
end myHandler
----------
> I also tried grouping themand hiding the group, but when other handlers
> need to show individual objects, it either doesn't work or I need to
> ungroup the group and am right back where I started!  Can anyone help
> me?
----------
In the scenario I'm using here, you can either hide/show the group or
individual fields. It's just that if you hide the group, you can't show
individual fields while the group is hidden. I hope that makes sense?

You still may want to group the fields, though, so you can set the
backgroundBehavior of the group to true. This way, they will be on all
cards, even new ones, and yet you can still hide/show individual fields or
all at once in a loop. This, of course, saves memory of having different
sets on each card (just to clarify).

If you want to hide several individual fields, i.e., 3, 5, 6, 8, then you
must hide them separately.

But remember, they are STILL grouped, so they'll be the same on all cards.
i.e., the only way to have some show on card 1 and different ones to show on
card 2 is to set them up in an openCard handler. You could do this in each
card script, or specify which card shows which fields in a boolean statement
in an openCard handler in the stack script (don't forget to pass it so
openCard handlers can be activated in individual cards later if you need
to).

That may be over your head right now, so just ask as you go.
----------
> 2. Is there a way to build a feature into a stack so that once the
> stack is a standalone and installed from a disk it requires the disk it
> was installed from to be present in the drive in order to continue?
> I don't know whether what I am saying makes sense, I just know that
> lots of reference works that are installed on my machine require that I
> insert the disk they came on in order to use them.  I would like my app
> to do the same. 
----------
Why? What is the purpose? Will there be files on CD that you don't want on
the HD? That's usually a case where you either want to protect files (you
can delete them either by accident or maliciously on a hard drive, but not
on a write-once CD), or you want to conserve HD space, or, as in games, you
have a set of such large files (like video/animation/control sets), that
there may not be enough memory to have them all actively available
simultaneously (notice in high res flight sims you can't fly a Mustang and
Messershmidt at the same time). Not that Rev is quite ready to do
sophisticated flight sims yet ;-)
----------
> Is there a stack script that creates a message to the
> user like "Please insert disk "xyz" to continue?"
----------
Well, if you script what files it wants and where it expects them to be in
advance, then yes, you can script that. You could actually transfer
encrypted files off the internet that way if you like, as well.
----------
> Revolution is terrific
----------
Yeah, it is.

HTH,
Ken N.




More information about the use-livecode mailing list