Newbie: Functional difference between cards and stacks?
b.xavier at internet.lu
Fri Mar 25 18:32:13 EST 2005
Welcome aboard Nicole!
> My first question is simple: What is the functional
> difference between cards and stacks? ...
Think of any window in RunRev as another stack first.
Any of those stacks can have one or more cards. Like a stack of cards, it's
that simple. Or if you prefer the database file/records analogy, but the
first is nicer to use in scripts ;)
You can makes any card independent of each other or have them share common
background controls like fields which is where stacks can start acting like
go to card x
get field "name" of card 2
> answer format. In other words, for each card, the user types
> in the "answer," then highlights individual words or phrases
> to be turned into "blanks" on the "question" card. Each blank
> could have multiple possible answers (or not).
so here you can build a stack with the questions and answers hidden, display
the question in a "front-end" stack and wait for a user answer to check and
give the user her/his result ;)
There's a few words to learn, lots of examples in the RunRev documentation
and a few starter movies in the RevOnline you should check out. Takes a
couple days to get used to it and then zap you'll be on your way! If only
piano playing was that easy!
You can have the test engine and front end in one stack, the preferences
into another stack and the questions listed in a 3rd stack. Any stack can be
a substack of another (like a local utility palette). But no deeper than one
stack. It's just a practical thing to have to regroup fixed stacks into one
mothership stack instead of having different stacks around for release (but
this is easier to update while in development.)
so here's how you put and get info anywhere!
get field "question" of cd thisquestionID of stack "questions"
put it into fld "questions" -- of this card assumed...
add 1 to fld score of card thisplayer of stack score
im sure you get the picture now! It's quite fun playing with words. The
trick is getting used to the grammar and learning why it did that ...
Now that you know about objects, you should also learn about events as you
see them appear for any object in the revdocumentation... Dont be afraid to
test anything in a new stack. Save often. Make backups, the rest is a cool
everyday-a-new-thing-learned tool of all trades!
More information about the Use-livecode