Parental Gate for Apple - Math problem
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: Parental Gate for Apple - Math problem
Hi Al,
I like this way to have a Parents portal.
Why not a function getPressedBtns which check the hilite of each btn of and return a result like "3,6,9" ?
Each concerned button have a name like "myBtn_1"," myBtn_2" ...
Best regards
Jean-Marc
I like this way to have a Parents portal.
Why not a function getPressedBtns which check the hilite of each btn of and return a result like "3,6,9" ?
Each concerned button have a name like "myBtn_1"," myBtn_2" ...
Best regards
Jean-Marc
https://alternatic.ch
-
- Posts: 11
- Joined: Wed Nov 12, 2014 6:28 pm
Re: Parental Gate for Apple - Math problem
Grrrr ... so frustrated. I have tried so many things now. Can't get it working. So, I'm trying something different and I am wondering why this won't work. On one of the button scripts I put this ...
on mouseUp
if (me + button "button6" + button "button9") is true then
go to card "ParentMenu"
end if
end mouseUp
So, I guess I'm not getting how "+" works? I guess I'm extra frustrated because this is the only thing that caused my app to be rejected from App Store. Thanks!
on mouseUp
if (me + button "button6" + button "button9") is true then
go to card "ParentMenu"
end if
end mouseUp
So, I guess I'm not getting how "+" works? I guess I'm extra frustrated because this is the only thing that caused my app to be rejected from App Store. Thanks!
-
- VIP Livecode Opensource Backer
- Posts: 157
- Joined: Thu Jun 29, 2006 4:16 pm
Re: Parental Gate for Apple - Math problem
Hi All,
Interesting ideas. I'll offer another one. I've attached a demo stack. But, in short… I'd wrote two handlers that would then be placed in the nine number buttons… one for mouseDown and one for mouseUp. In mouseDown I send the labels of the buttons 3, 6, and 9 to a "results" field… when I first began coding I really needed to "see something happen" when I had the script "do something." I still do this a lot (even though it's a bit slower and I've learned how to use custom properties). I also separted out the "hold for three seconds" part of the code into a button that shows when the correct number buttons have been pressed.
Anyway, just another thought to share with the conversation.
be well,
randy
Interesting ideas. I'll offer another one. I've attached a demo stack. But, in short… I'd wrote two handlers that would then be placed in the nine number buttons… one for mouseDown and one for mouseUp. In mouseDown I send the labels of the buttons 3, 6, and 9 to a "results" field… when I first began coding I really needed to "see something happen" when I had the script "do something." I still do this a lot (even though it's a bit slower and I've learned how to use custom properties). I also separted out the "hold for three seconds" part of the code into a button that shows when the correct number buttons have been pressed.
Anyway, just another thought to share with the conversation.
be well,
randy
- Attachments
-
- Divisible_by_Three.livecode.zip
- (2.04 KiB) Downloaded 233 times
-
- Posts: 11
- Joined: Wed Nov 12, 2014 6:28 pm
Re: Parental Gate for Apple - Math problem
Hey Randy! Thanks for adding to the convo. When I go to check out your stack it says it's corrupted. I'm using LiveCode 6.7. Do I need to get a newer version? Thank you!
Steve
Steve
-
- VIP Livecode Opensource Backer
- Posts: 157
- Joined: Thu Jun 29, 2006 4:16 pm
Re: Parental Gate for Apple - Math problem
Oh yeah, sorry I used 7.0 Here's one saved in the earlier format….
- Attachments
-
- Divisible By Three.livecode.zip
- This stack saved in pre-LC7.0 format
- (2.03 KiB) Downloaded 225 times
Re: Parental Gate for Apple - Math problem
hi Steve,
This stack uses the way I described in my post
All scripts are in the cd script
Best regards
Jean-Marc
This stack uses the way I described in my post
All scripts are in the cd script
Best regards
Jean-Marc
- Attachments
-
- parentPortal001.livecode.zip
- (1.72 KiB) Downloaded 219 times
https://alternatic.ch
Re: Parental Gate for Apple - Math problem
Hi Stepehen,
well, the PLUS sign is meant to ADD something to another thing, so this not works!
Remember that LC is very "english" like, so you need to check each condition separately with AND like this:
If you are checking for TRUE like in my example, you can omit the -> = TRUE part, lazy moi
Hint: If the user will check ALL of your 9 buttons, he will get access, too
OK, that's one for the next update.
Best
Klaus
well, the PLUS sign is meant to ADD something to another thing, so this not works!

Remember that LC is very "english" like, so you need to check each condition separately with AND like this:
Code: Select all
on mouseUp
## Parens not really neccessary, but will show how the engine will parse this line: evaluating one condition after another!
if (the hilite of me) AND (the hilite of btn 3) AND (the hilite of btn 9) THEN
go to card "ParentMenu"
end if
end mouseUp

Hint: If the user will check ALL of your 9 buttons, he will get access, too

OK, that's one for the next update.
Best
Klaus
-
- Posts: 11
- Joined: Wed Nov 12, 2014 6:28 pm
Re: Parental Gate for Apple - Math problem
Hey everybody! I'm in between a few different major life developments (all good stuff, I hope!:D), so I haven't checked the code/advice/encouragement y'all shared with me yet. Hoping to have time to check everything out tomorrow. I just want to say to all of you, from the bottom of my heart, thank you for your help. I'll keep ya posted. Have a great night (or day if you live across the pond:)