global feedback

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
inkachinka
Posts: 2
Joined: Fri Nov 30, 2018 11:12 am

global feedback

Post by inkachinka » Fri Nov 30, 2018 11:29 am

Hello folks!
I started learning livecode a week ago and now gotta work on a project as uni homework.
I wanna create a questionnaire with 4 options for each question (I'll use radio buttons).
And in the end the user should get a feedback depending on which option has the most score throughout the questionnaire.
What exactly do I need to write in the feedback card script?

thanks in advance :)

Klaus
Posts: 13829
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: global feedback

Post by Klaus » Fri Nov 30, 2018 11:46 am

Hi inkachinky,

welcome to the forum!

I would recommend to go through these stack to learn about the very basics of Livecode:
http://www.hyperactivesw.com/revscriptc ... ences.html

Best

Klaus

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7238
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: global feedback

Post by jacque » Fri Nov 30, 2018 5:53 pm

First off, thanks for being up front about the purpose of your question. Some people aren't. In general we don't do school assignments for you but we're happy to answer any specific questions you may have as you work through the assignment.

You probably already figured out that you need to store the user responses somewhere as they go along. Your subject title is almost the answer, you can use a global variable as storage. Keep a list there of the answers and you can parse through those when you need to provide feedback.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

inkachinka
Posts: 2
Joined: Fri Nov 30, 2018 11:12 am

Re: global feedback

Post by inkachinka » Fri Nov 30, 2018 6:04 pm

Yes, I figured out how to store data with global variables! :)
I have 4 variables now, each has different values.
How do I create a feedback according to the variable with the highest value?
I imagine I'd have to write sth like:

on mouseUp
if var1 > all other variables then
answer "something something"
...
....
end mouseUp

But I havent figured out the right progamming language and couldnt find anything related to my problem in the dictionary and google :o

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7238
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: global feedback

Post by jacque » Fri Nov 30, 2018 7:22 pm

What are the values of the global variables? Are you keeping each answer in a different variable? If so it would be easier to work with if the answers are all in a single variable in a list with one answer per line. But let's see what you've got already first.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9670
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: global feedback

Post by dunbarx » Fri Nov 30, 2018 8:43 pm

Hi.

You might sort the four variables (I assume they are numbers) and select the last (highest) one.

When you become a little more familiar with Livecode, we can experiment with other methods.

You are on your way. Just know that the ease of starting with LiveCode must not lead you to believe that a significant amount of time is not required to become proficient. It is. The good news is that the process is fun and rewarding the whole time.

Craig Newman

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”