(no subject)

J. Landman Gay jacque at hyperactivesw.com
Sun Apr 18 12:47:31 CDT 2010


Hi Haroldo, how nice to see you here!

> (example from Rev dictionary)
> on arrowKey theKey -- make Up arrow go to the first card
>   if theKey is "up" then go to card 1
>   else pass arrowKey
> end arrowKey
> 
> Instead of going to card 1 it kept going to the next card each
 >time I pressed the up arrow key, and after the last card the stack 
just closed.

This is the default behavior for arrowkeys. If you have navigationarrows 
set to true (which you said you do) then the up and down arrows 
basically do a "go back" or a "go forth". When the stack closed, it was 
likely popping to another stack to go to a card there, which you had 
probably visited recently.

Since you are getting the default arrow behavior instead of the scripted 
one, that tells me that your arrowkey message isn't reaching your 
handler for some reason. My first thought was that you might be using a 
card group instead of a background group (and as an HC convert, that's 
something you'll want to read up on,) but since it's an HC import that's 
unlikely unless you've added some groups since you imported the stack.

Because the script works in a new stack, you're right it's probably 
something in that particular stack. I agree that you should probably set 
the hcBehavior of the stack to false; you don't need that in Rev and it 
may clear up some issues. You can still continue to refer to bgs and 
controls the way you are used to, though you'll probably change that 
later as you get used to Rev.

About the advice to separate the data from the interface -- it's good 
advice. Rev isn't meant to use cards as a database. But to be honest, I 
wouldn't worry about that for now. If you have under 5,000 cards in the 
stack it will work just as it does in HC and I'd keep that structure 
until you've learned a little more about Rev. One thing at a time. If 
this stack is just for your own use, you may not want to change its 
database structure at all. I still use a number of old HC stacks in Rev 
that keep databases -- for example, I have an address book stack with 
one record per person and it works just fine. I don't even know 5,000 
people. :)

If you can't isolate the arrowkey problem, feel free to upload the stack 
somewhere and post a link to the list. You'll probably get a lot of 
solutions once we can see the scripts.

-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com



More information about the use-livecode mailing list