making a popup insert text.

Dan Shafer revdan at danshafer.com
Mon Oct 3 15:08:14 EDT 2005


John....

Small mistake. There is no object in Revolution called a "check" or,  
for that matter, a "checkbox." It's a button. So a slight change to  
your code makes it work:

if hilite of button "AFR" = "true" then answer "You ticked AFR"

That said, you might (or might not) benefit from a couple of  
additional "tips."

First, you don't need the '= "true"' portion of your code because the  
hilite property returns either true or false so if you just test it,  
it comes out positive if the checkbox is ticked:

if hilite of button "AFR" then answer "You ticked AFR"

Second, there is a convention in Revolution that when referring to  
properties (such as the hilite property of a button), it's customary  
(but not always required) to put "the" in front of it. This is one  
way for you, when reading a script, to recognize that you're dealing  
with a property of an object rather than a variable or some other  
kind of identifier. THus, a seasoned Revolutionary would probably  
write your line more like this:

if the hilite of button "AFR" then answer "You ticked AFR"

HTH

On Oct 3, 2005, at 4:06 AM, Thornton, John wrote:

> if hilite of Check "AFR" = "true" then answer "You ticked AFR"



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Dan Shafer, Information Product Consultant and Author
http://www.shafermedia.com
Get my book, "Revolution: Software at the Speed of Thought"
 From http://www.shafermediastore.com/tech_main.html





More information about the use-livecode mailing list