Page 1 of 1
Questions to resolve before purchasing Rev
Posted: Tue Apr 13, 2010 8:13 pm
by jwbuzz
Hi guys.. I'm in the process of evaluating Rev for a couple of projects. I have a couple of questions I need to resolve before I can recommend that we purchase it.
1. I can't figure out how to call a message on a card from onMouseUp of a label on the card. I get this error but can't make much sense of if. Right now, the call is like this: call "transferFile" of "transfer_card"
field "lbl_track1": execution error at line n/a (Chunk: error in object expression) near "transfer_card", char 1
2. I created a timer by saying "send blah to me in 5 seconds" and then just repeating it. How can I stop a timer?
Re: Questions to resolve before purchasing Rev
Posted: Tue Apr 13, 2010 8:26 pm
by jmburnod
Hi jwbuzz,
Maeby you can try
Code: Select all
on mouseup
transfer_card
end mouseup
on transfer_card
-- what you want
end transfer_card
Best
Jean-Marc
Re: Questions to resolve before purchasing Rev
Posted: Tue Apr 13, 2010 8:29 pm
by jwbuzz
Thanks for the response.. I need to call the message in a different object because I have 8 buttons that need to call the same message. This is why I can't put the code in the script for the label field.
Re: Questions to resolve before purchasing Rev
Posted: Tue Apr 13, 2010 8:36 pm
by bn
jwbuzz,
could you explain a little more where the buttons are (on the same card?) and where the handler for "transfer_card" is and what the label fields are supposed to do on top/besides the buttons. This all matters because by placing the "transfer_card" handler to the right place and using "the target" you could do all your message passing in one place.
jwbuzz wrote:How can I stop a timer?
Just add a condition. That could be a counter that is a script local variable
Code: Select all
local tCounter
on mouseUp
put 0 into tCounter
startMyTimer
end mouseUp
on startMyTimer
-- do your code here
add 1 to tCounter
if tCounter < 11 then
send "startMyTimer" to me in 2 seconds
end if
end startMyTimer
this could also be a time based condition like the seconds in a script local variable then test if the seconds - tSeconds > 60 then exit startMyTimer.
regards
Bernd
Re: Questions to resolve before purchasing Rev
Posted: Tue Apr 13, 2010 8:39 pm
by jwbuzz
Bernd.. Thanks for responding. I'm new so I'm not sure if my terminology is correct.. I don't have buttons. I have labels that I'm using as buttons. So.. I have my card (transfer_card) with 8 labels on it. When any of the 8 labels is clicked, I want to call transferFile on transfer_card.
Re: Questions to resolve before purchasing Rev
Posted: Tue Apr 13, 2010 8:41 pm
by jwbuzz
Ah.. I get it now. So I code onMouseUp in transfer_card instead of each individual button. Then how do I get info about which button was clicked?
Re: Questions to resolve before purchasing Rev
Posted: Tue Apr 13, 2010 8:42 pm
by bn
jwbuzz,
the error you mentioned earlier is probably due to the fact that you left out card.
Code: Select all
call "transferFile" of card "transfer_card"
tell us if this helps
regards
Bernd
Re: Questions to resolve before purchasing Rev
Posted: Tue Apr 13, 2010 8:52 pm
by jwbuzz
Bernd... your last suggestion worked too. Thanks for the input. How do I know what label was clicked though?
Re: Questions to resolve before purchasing Rev
Posted: Tue Apr 13, 2010 8:53 pm
by bn
jwbuzz,
jwbuzz wrote:Then how do I get info about which button was clicked?
if your label fields are on the card "transfer_card" and from what I see you numbered your label fields like "lbl_track1" then you could put into the card script:
Code: Select all
on mouseUp
if the target contains "lbl_track" then
put char - 1 of the short name of the target into tNumberOfField -- the number
-- do what you want depending on the number of the field
put tNumberOfField -- this puts the number into the message box just to see it
end if
end mouseUp
mind you: no mouseUp handler in the label fields, just name them in a way for the handler in the card script to work with them.
If you have more then 9 label fields you would have to adapt the script. Just ask if it is unclear.
regards
Bernd
Re: Questions to resolve before purchasing Rev
Posted: Tue Apr 13, 2010 9:21 pm
by jwbuzz
Thanks a lot.. Is there no documentation on what to do with the target? For example, I want to get the value of the label instead of the name of the field. I'm used to being able to look stuff like this up in PHP but can't find how to look this up here.
Re: Questions to resolve before purchasing Rev
Posted: Tue Apr 13, 2010 9:36 pm
by bn
jwbuzz,
Code: Select all
on mouseUp
put the short name of the target into tShorNameOfTarget
if tShorNameOfTarget contains "lbl_track" then
put char - 1 of the short name of the target into tNumberOfField
put the text of field tShorNameOfTarget into tLabel -- here is the label = text of the label field
-- do what you want depending on the label of the field
put the text of field tShorNameOfTarget of this card -- just to show it in the message box
end if
end mouseUp
Well the label of a label field is the text of a label field.
regards
bernd
jwbuzz wrote:Is there no documentation on what to do with the target?
look at the pdf user guide. Not bad at all.
Re: Questions to resolve before purchasing Rev
Posted: Tue Apr 13, 2010 9:44 pm
by jwbuzz
Ok.. I started out in the user guide but abandoned it because I couldn't find some things.. I'll go back to it for stuff like this. Thanks for the help. This forum is really good.