Button "greyed out" (disabled)
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Button "greyed out" (disabled)
I have a small program. The stack has 2 cards. I placed a third card in the stack and moved a button on to it. It was "greyed out", (as though it was disabled) unlike other buttons that I put on cards 1 and 2. The button was not disabled. If I add an additional card and put a button on it, the button is also greyed out. The buttons are not part of a group. Does anyone know why this is happening?
urbaud
-
- Posts: 344
- Joined: Tue Feb 24, 2009 6:14 pm
- Contact:
Re: Button "greyed out" (disabled)
any further info you can share? what version of revolution? sample scripts in the stack? if possible, the stack source itself?
Re: Button "greyed out" (disabled)
My version of Revolution Studio is: Version 3.5.0, Build 870. I wrote this small program because the built in calculator in Snow Leopard is inadequate for my needs. It is essentially an on screen calculator with a focus on adding a series of numbers. I shows the numbers inputed, how many numbers were inputted and a running total. I add series of numbers frequently. So this program which I call the “Add Program” is card 1 of the stack. I then realized that I needed access to some quick conversions so the Converter program is on card 2 of the stack. It has several buttons on it. Each button represents a different conversion factor.
So, the main button on the Add Program is called: Add. The code for it is below:
on mouseUp
put empty into field "text1"
put empty into field "text4"
put empty into field "text40"
put empty into field "text41"
put empty into field "text43"
put empty into field "text44"
put empty into field "label6"
put empty into field "label7"
put empty into field "label8"
put empty into field "label9"
put empty into field "text8"
put empty into field "label19"
put empty into field "label33"
put empty into field "label34"
put empty into field "label35"
put empty into field "label77"
repeat until it = 0
ask "Enter a number, press Enter; zero (0) ends Input"
add it to c --this is the math for running total
add 1 to x --this increments one line at a time in text1
put it into line x of field "text1" --displays user input numbers vertically
put c into line x of field "text4" --displays running total
put x into line x of field "text8" --displays line numbers
end repeat
set numberformat to "#.00"
put "$ "& format(c) into field "label6" --price
put "$ " & (c * .07) into field "label7" --pst
put "$ " & (c * .05) into field "label8" --gst
put "$ " & c + (c * .12) into field "label9" --total
subtract 1 from x --this removes the extra number that shows in line #,s
put (c * .25) into field "label33" --25%
put (c * .50) into field "label34" --50%
put (c * .75) into field "label35" --75%
put (c/x) into field "label19" --average
add 1 to x
put "" into line x field "text8"
put "" into line x field "text1"
put "" into line x field "text4"
put c into field "text40"
put c into field "text41"
put c into field "text43"
put c into field "text44"
put c into field "label77"
put "" into field "text45"
put "" into field "text46"
put "" into field "text47"
put "" into field "text48"
put "" into field "l49"
put "" into field "l50"
put "" into field "l51"
put "" into field "l52"
end mouseUp
The other button on the Add Program is called: Print. Code is below:
on mouseUp
go card 3
end mouseUp
The buttons for the Convert program on card 2 are shown below:
on mouseUp
put "" into fld "l22" --sq ft to sq meters
set numberformat to "#.##"
put fld "t1" * 0.092903 into fld "l22"
end mouseUp
on mouseUp
put "" into fld "l44" --sq metres to sq feet
set numberformat to "#.##"
put fld "t3" * 10.7639 into fld "l44"
end mouseUp
on mouseUp
put "" into fld "l66" --cm to inches
set numberformat to "#.##"
put fld "t5" * 0.39 into fld "l66"
end mouseUp
on mouseUp
put "" into fld "l88" --inches to cm
set numberformat to "#.##"
put fld "t7" * 2.54 into fld "l88"
end mouseUp
on mouseUp
put "" into fld "l100" --inches / .03937; mm to inches
set numberformat to "#.##"
put fld "t9" * .03937 into fld "l100"
end mouseUp
on mouseUp
put "" into fld "l120" --mm X .03937; inches to mm
set numberformat to "#.##"
put fld "t11" / .03937 into fld "l120"
end mouseUp
on mouseUp -- metres to feet, inches
put "" into fld "l71"
put "" into fld "l72"
set numberformat to "#.##"
put fld "t70" * 3.28083 into fld "l71"
put fld "t70" * 39.37007 into fld "l72"
end mouseUp
on mouseUp
put "" into fld "l73" --feet, inches to metres
set numberformat to "#.##"
put fld "t71" * 0.3048 into fld "l73"
end mouseUp
on mouseUp
put "" into fld "l201" --metres to yards
set numberformat to "0.##"
put fld "t200" * 1.0936133 into field "l301"
end mouseUp
on mouseUp
put "" into fld "l203" --yards to metres
set numberformat to "#.##"
put fld "t202" * 0.9144 into fld "l203"
end mouseUp
on mouseUp
--convert F to C
set numberformat to "0.##"
put fld "t100" into fah
put fah+40 into fah40
put fah40*(5/9) into fah59
put fah59-40 into fahend
put fahend into fld "l102"
end mouseUp
on mouseUp
--Celsius to Fahrenheit
set numberformat to "0.##"
put fld "t101" into cel
put cel +40 into cel40
put cel40 * (9/5) into cel95
put cel95 - 40 into celend
put celend into fld "l201"
end mouseUp
on mouseUp --percent increase
put empty into field "l80" --l4
put empty into field "l81" --l5
put empty into field "l82" --l6
put empty into field "l83" --l8
ask "Enter First Number or Number with Earlier Date: "
put it into fld "l80"
put it into intNum
Ask "Enter Second Number: "
put it into field "l81"
put it into SecondNum
put (SecondNum-IntNum) into field "l82"
set numberformat to "#.0"
put (SecondNum-IntNum)/intNum into percent
put percent*100 into field "l83"
end mouseUp
on mouseUp --wind chill
set numberformat to "#.0"
put 13.12 + 0.6215 * field "tfield1" - 11.37 * (field "tfield2" ^ 0.16) + 0.3965 * field "tfield1" * (field "tfield2" ^ 0.16) into WC
put WC into field "flabel1" --textbox1 is temperature and textbox2 is wind speed
end mouseUp
on mouseUp --monthly loan payment
set numberformat to "$" & "#.00"
put "" into fld "l33"
ask "What is the amount of the loan?"
put it into loanAmt --loan amount
ask "What is the yearly interest rate?"
put it into yearlyInterest
put (yearlyInterest / 12) /100 into monthlyinterest --monthly interest rate
Ask "Amortized over how many years?"
put it into numYears
put numYears * 12 into totalmonths --total number of months
put (loanAmt *(1+monthlyinterest) ^ totalmonths * monthlyinterest / ((1 +monthlyinterest) ^ totalmonths -1)) into payment
put payment into fld "l33"
end mouseUp
Card 3 is the print report card for the Add Program. When I attempted to add a button to card 3 to allow the user to return to card 1, the button was “greyed out”. When I tried to add card 4 the same thing occurred, the button(s) were “greyed out”.
Any advise you could provide would be most appreciated. Thank you in advance for any suggestions.
So, the main button on the Add Program is called: Add. The code for it is below:
on mouseUp
put empty into field "text1"
put empty into field "text4"
put empty into field "text40"
put empty into field "text41"
put empty into field "text43"
put empty into field "text44"
put empty into field "label6"
put empty into field "label7"
put empty into field "label8"
put empty into field "label9"
put empty into field "text8"
put empty into field "label19"
put empty into field "label33"
put empty into field "label34"
put empty into field "label35"
put empty into field "label77"
repeat until it = 0
ask "Enter a number, press Enter; zero (0) ends Input"
add it to c --this is the math for running total
add 1 to x --this increments one line at a time in text1
put it into line x of field "text1" --displays user input numbers vertically
put c into line x of field "text4" --displays running total
put x into line x of field "text8" --displays line numbers
end repeat
set numberformat to "#.00"
put "$ "& format(c) into field "label6" --price
put "$ " & (c * .07) into field "label7" --pst
put "$ " & (c * .05) into field "label8" --gst
put "$ " & c + (c * .12) into field "label9" --total
subtract 1 from x --this removes the extra number that shows in line #,s
put (c * .25) into field "label33" --25%
put (c * .50) into field "label34" --50%
put (c * .75) into field "label35" --75%
put (c/x) into field "label19" --average
add 1 to x
put "" into line x field "text8"
put "" into line x field "text1"
put "" into line x field "text4"
put c into field "text40"
put c into field "text41"
put c into field "text43"
put c into field "text44"
put c into field "label77"
put "" into field "text45"
put "" into field "text46"
put "" into field "text47"
put "" into field "text48"
put "" into field "l49"
put "" into field "l50"
put "" into field "l51"
put "" into field "l52"
end mouseUp
The other button on the Add Program is called: Print. Code is below:
on mouseUp
go card 3
end mouseUp
The buttons for the Convert program on card 2 are shown below:
on mouseUp
put "" into fld "l22" --sq ft to sq meters
set numberformat to "#.##"
put fld "t1" * 0.092903 into fld "l22"
end mouseUp
on mouseUp
put "" into fld "l44" --sq metres to sq feet
set numberformat to "#.##"
put fld "t3" * 10.7639 into fld "l44"
end mouseUp
on mouseUp
put "" into fld "l66" --cm to inches
set numberformat to "#.##"
put fld "t5" * 0.39 into fld "l66"
end mouseUp
on mouseUp
put "" into fld "l88" --inches to cm
set numberformat to "#.##"
put fld "t7" * 2.54 into fld "l88"
end mouseUp
on mouseUp
put "" into fld "l100" --inches / .03937; mm to inches
set numberformat to "#.##"
put fld "t9" * .03937 into fld "l100"
end mouseUp
on mouseUp
put "" into fld "l120" --mm X .03937; inches to mm
set numberformat to "#.##"
put fld "t11" / .03937 into fld "l120"
end mouseUp
on mouseUp -- metres to feet, inches
put "" into fld "l71"
put "" into fld "l72"
set numberformat to "#.##"
put fld "t70" * 3.28083 into fld "l71"
put fld "t70" * 39.37007 into fld "l72"
end mouseUp
on mouseUp
put "" into fld "l73" --feet, inches to metres
set numberformat to "#.##"
put fld "t71" * 0.3048 into fld "l73"
end mouseUp
on mouseUp
put "" into fld "l201" --metres to yards
set numberformat to "0.##"
put fld "t200" * 1.0936133 into field "l301"
end mouseUp
on mouseUp
put "" into fld "l203" --yards to metres
set numberformat to "#.##"
put fld "t202" * 0.9144 into fld "l203"
end mouseUp
on mouseUp
--convert F to C
set numberformat to "0.##"
put fld "t100" into fah
put fah+40 into fah40
put fah40*(5/9) into fah59
put fah59-40 into fahend
put fahend into fld "l102"
end mouseUp
on mouseUp
--Celsius to Fahrenheit
set numberformat to "0.##"
put fld "t101" into cel
put cel +40 into cel40
put cel40 * (9/5) into cel95
put cel95 - 40 into celend
put celend into fld "l201"
end mouseUp
on mouseUp --percent increase
put empty into field "l80" --l4
put empty into field "l81" --l5
put empty into field "l82" --l6
put empty into field "l83" --l8
ask "Enter First Number or Number with Earlier Date: "
put it into fld "l80"
put it into intNum
Ask "Enter Second Number: "
put it into field "l81"
put it into SecondNum
put (SecondNum-IntNum) into field "l82"
set numberformat to "#.0"
put (SecondNum-IntNum)/intNum into percent
put percent*100 into field "l83"
end mouseUp
on mouseUp --wind chill
set numberformat to "#.0"
put 13.12 + 0.6215 * field "tfield1" - 11.37 * (field "tfield2" ^ 0.16) + 0.3965 * field "tfield1" * (field "tfield2" ^ 0.16) into WC
put WC into field "flabel1" --textbox1 is temperature and textbox2 is wind speed
end mouseUp
on mouseUp --monthly loan payment
set numberformat to "$" & "#.00"
put "" into fld "l33"
ask "What is the amount of the loan?"
put it into loanAmt --loan amount
ask "What is the yearly interest rate?"
put it into yearlyInterest
put (yearlyInterest / 12) /100 into monthlyinterest --monthly interest rate
Ask "Amortized over how many years?"
put it into numYears
put numYears * 12 into totalmonths --total number of months
put (loanAmt *(1+monthlyinterest) ^ totalmonths * monthlyinterest / ((1 +monthlyinterest) ^ totalmonths -1)) into payment
put payment into fld "l33"
end mouseUp
Card 3 is the print report card for the Add Program. When I attempted to add a button to card 3 to allow the user to return to card 1, the button was “greyed out”. When I tried to add card 4 the same thing occurred, the button(s) were “greyed out”.
Any advise you could provide would be most appreciated. Thank you in advance for any suggestions.
urbaud
Re: Button "greyed out" (disabled)
Bonsoir Jean-Marc,
hmmm, very strange!
Can you send me the stack?
klausATmajor-k.de
I would like to take a look since the scripts do not appear to cause this phenomenon.
Best
Klaus
hmmm, very strange!
Can you send me the stack?
klausATmajor-k.de
I would like to take a look since the scripts do not appear to cause this phenomenon.
Best
Klaus
Re: Button "greyed out" (disabled)
Hi Klaus,
How do I send you the stack? Never done it before.
Dan
How do I send you the stack? Never done it before.
Dan
urbaud
Re: Button "greyed out" (disabled)
Hi Dan,
oh come on, ever sent an email with attachment?
I bet
P.S.
Sorry for calling you Jean-Marc, looks I mixed you with someone else...
EDIT:
There is another user from switzerland with the name "Burnod", which sounds a bit similar
if you do not look close enough
oh come on, ever sent an email with attachment?
I bet

P.S.
Sorry for calling you Jean-Marc, looks I mixed you with someone else...
EDIT:
There is another user from switzerland with the name "Burnod", which sounds a bit similar
if you do not look close enough

Last bumped by urbaud on Tue Mar 02, 2010 11:06 pm.