Stu's test review software learing experience.

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller

stuartls
Posts: 49
Joined: Mon Jan 22, 2007 10:59 pm
Contact:

Stu's test review software learing experience.

Post by stuartls » Wed Jan 24, 2007 11:25 pm

Well here is the situation. I have various slides on powerpoint that deal with my testing software. I can and have saved each one of them as a GIF file. Now the image size is 900x700 which is fine. I can adjust my cards to this size, and have. So I import as an active control? or a referenced control? What happens is when I import as an active control I lock the size and postion and then import buttons over this so called layer. But I seem to have problems with the script working on my final card that says something like "can't find background?". So any problems that any of you can think of of importing as a referenced control to get the GIF. I do this because it is much easier and better looking to do my questions in powerpoint than to create in Revolution. The gif that I import looks something like this.

So which real estate property is the better buy?

The oceanfront property
The mountain property
The city property.
The country property.

Now then what I do is to put radio buttons in front of the answers. Then of course groupt them. Then I have a test question with the four answers. Can any of you think of any problem with doing it this way?

Stu

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5147
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Wed Jan 24, 2007 11:58 pm

Hi Stuart,

Summarizing your problem, you have created a group presumable containing radion buttons, to which you refer from a script while the last card is the current card. Are you sure that the group, aka background, you refer to is actually on the last card?

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

marielle
Livecode Opensource Backer
Livecode Opensource Backer

Re: Stu's test review software learing experience.

Post by marielle » Thu Jan 25, 2007 12:04 am

stuartls wrote:The gif that I import looks something like this.
Within these forums, you have to use a syntax slightly different from the usual html one.

Code: Select all

[img]http://domain.com/path/image.gif[/img]
or paste the link, select it, an then click on the "Img" button when in edit mode.

If you use the same background picture everytime, then best would be to import that picture only once, put it on some card that you name "pix", "images", or whatever suits you. Better even to have it in a substack. What I tend to do is create a substack called "testreview_resources" with all libraries, images, and other resouces associated with my stack (the prefix, "testreview" is a must have to avoid problems when opening multiple projects as stack names must always be unique).

Then, create a button on the card. Select this button (pointer mode). Open the property palette (top men -> Object -> Object Properties; alternatively double click on the button).

1. In the topmenu of the property palette, select "Basic properties"
1.A. Set the style (dropdown menu) to transparent
1.B. Untick the checkbox before "showname"

2. In the topmenu of the property palette, select "Icons & Borders"
2.A. next to Icon, provide as value the image id of the relevant picture. You will know what that id is by click on the corresponding image (basic properties -> ID).

3. resize the button to fit the size of the picture.

Now you can easily copy the button on each new page. You could use the option "behave like a background", but I tend to keep away from that option.

Marielle

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5147
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Thu Jan 25, 2007 12:33 am

Marielle,

[quote]
The gif that I import looks something like this.

So which real estate property is the better buy?

The oceanfront property
The mountain property
The city property.
The country property.
[/quote]

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

stuartls
Posts: 49
Joined: Mon Jan 22, 2007 10:59 pm
Contact:

Post by stuartls » Thu Jan 25, 2007 12:47 am

hmmmmmmmmmm.....

Mark,

Very interesting. What I have is just as a beta run 5 cards. Each import an image (aka, the background, and also the actual test question). Now on the final card, I have a button "grade test". That I have tried to program to find the right highlighted radio buttons on each of the cards. I have had help with the programming and understand (in general) the programing. (Thanks and you know who you are! Yes you Marielle and Karl.) But anyway it seems that on this last card the programming doesn't even realize what i am referring to or trying to "get". Keeps refering to the actual location this beta program has on my hard drive. So I think your question has some merit. And alot at that!

Stu

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5147
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Thu Jan 25, 2007 1:03 am

Hi Stuart,

An image is not a background. I am a little confused now, because I don't know whether you are actually using groups, aka backgrounds. Image is not aka background.

Perhaps you should post the script that causes problems.

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

marielle
Livecode Opensource Backer
Livecode Opensource Backer

Post by marielle » Thu Jan 25, 2007 10:50 am

The gif that I import looks something like this.
Two interpretations were possible indeed and I gave a 40% chance that Stu had pasted image. I know from off-forum email that Stu is quite familiar with html and the first thing I did on the forum was to try to define an image the html way, with little success.

Only 40% chance for the image insertion trick within forums to be useful to Stu, but more than 50% chance to be useful to other new users on this forum ;-).

stuartls
Posts: 49
Joined: Mon Jan 22, 2007 10:59 pm
Contact:

Post by stuartls » Thu Jan 25, 2007 10:12 pm

Actually I didn't try to display the image that I used. Let me see If I clear up what I am doing. Each of my cards measures 960x720. Now in Power Point, the program I have used before to have students do a practice test I already have all the questions that I of course want to put on the new interactive program I am trying to develope in Revolution. I just want to give my students a CD rom, and away they go to take the practice test. My slides on Power Point are set up pretty neatly. They have a blue background, the question is in yellow and the "4" multiple test questions are in white. I learned that in Power Point I could save each slide as an image in a folder on my computer. The image that I save measures 960x720. Now I mentioned that my card measures 960x720, so what I do is to go to File/New Referenced Control/Image and import one of the images which I have named Quest1. Again this image came from Power Point. And BOOM, what I end up with is a beautifuly centered image that has a blue background, yellow question, and the 4 possible questions. Then what I do is to go and place a radio button in front of each possible answer. i group them of course. Doing it this way I don't have to full with typing in the question, typing in that answers... i can just import an image that already has them on it. Any thoughts? Now you guys see why this "demo software" will only have 5 questions on it because I figure you guys will eventually come up with an "ut-o" that will cause me to rethink my strategy. But why wouldn't my plan work. Oh I put my navigation buttons on the bottom for the students to go to the next question, the previous question or so forth.

Stu

malte
Posts: 1098
Joined: Thu Feb 23, 2006 8:34 pm
Location: Ostenfeld germany
Contact:

Post by malte » Thu Jan 25, 2007 10:47 pm

Hi stu,

I think you want to import the images from the powerpoint presentation and place them on the lowest layer of the card. So far so good. Then on each card you have a group with 4 radio buttons in it. Good. On the final card you want the answers given by the students, right?

You get them with this property:

the hilitedButton of group "nameOfGroupHere" of card "nameOfCardHere"

Is that what you are after?

Concerning the images. Any reason you want them as a referenced control? Do you want to dynamically change the image in the background on the same card? If not I would import them as control, as this saves some headaches with file paths.
Also you end up with a single file for your users. However to avoid file size bloat you might want to recreate the design in Rev. If Powerpoint can Ddo it, you can create it in rev. :-)

All the best,

Malte

stuartls
Posts: 49
Joined: Mon Jan 22, 2007 10:59 pm
Contact:

Post by stuartls » Thu Jan 25, 2007 11:00 pm

Malte,

You are exactly right. That is exactly what i want to do! The reason I did it as a referenced control is that in following good advice on how to set up the "grading button" on the final card i got a pretty weird error message, so for trial and error this time I am going to use them as a referenced control and see if I get the same error message. If I do then I am going to post the exact script and error message on the board and beg for help at that time. lol. It may be something that i am doing wrong in saving the stack, or something else. The problem in not really knowing what I am doing when i first started was that I probably did something wrong in saving the file, adding a card, or something else. You know how you start clicking buttons to see what happens? :shock: Later today I'll be able to see if my small 5 question test works!

Stu, and thanks Malte, I appreciate the help!

stuartls
Posts: 49
Joined: Mon Jan 22, 2007 10:59 pm
Contact:

Post by stuartls » Fri Jan 26, 2007 12:44 am

"Error"... lol...

Here is the code I am using under a button under my final card to go back to the first card and see what is the hilitedbutton and thus determine if the student got that question right or wrong.

on mouseUp
put the hilitedbutton of group "Quest1multi" into tResult
if the hilitedbutton of tResult = 1005 then add 1 to field "wrong"
else add 1 to field "right"
end mouseUp

here is the error message.............
Type -- Chunk: can't find background
Object -- Button
Line -- put the hilitedbutton of group "Quest1multi" into tResult
Hint -- button id 1038 of card id 1036 of stack C:/documents and settings/stuart/my documents/RealEstateTestDemo/RealEstateTestDemo.Rev


have nooooooooooooo idea...

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5147
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Fri Jan 26, 2007 1:01 am

Hi Stuart,

There is no need to go back to the first card. You can refer to it by script without going there. The only condition is that the stack containing the card is in memory, which it definitely is, since it is the current stack.

Here is a script that might work:

on mouseUp
put the hilitedbutton of group "Quest1multi" of cd 1 into tResult
if tResult = 1005 then add 1 to field "wrong" -- of the last cd???
else add 1 to field "right" -- of the last cd???
end mouseUp

I assume your group is on card 1. I also assume that the currently visible card is the last card, which contains fields" wrong" and "right". If fields "wrong" and "right" are on a different card, you may have to add a reference to that card:

add 1 to field "wrong" of card 2

or whatever the number of that card would be. The variable tResult will contain a numer rather than a reference to an object, which means that you don't need to write "the hilitedbutton of tResult" but can simply use tResult.

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

stuartls
Posts: 49
Joined: Mon Jan 22, 2007 10:59 pm
Contact:

Post by stuartls » Fri Jan 26, 2007 1:14 am

Mark,

I still get the same error message. It is on the last card and my groups are named appropriately. You are right on the last card I have just one button that says "grade exam" and one field for right and the other one for wrong. Shoot. Does it have anything to do with the layers of my cards?

Stu

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5147
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Fri Jan 26, 2007 1:23 am

What happens if you enter

put there is a group "Quest1multi" of cd 1

in the message box and press enter? If you get "false" you should check the name of the group on card 1.

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

stuartls
Posts: 49
Joined: Mon Jan 22, 2007 10:59 pm
Contact:

Post by stuartls » Fri Jan 26, 2007 1:34 am

Mark,

Wooooooooooooooooooooo Hoooooooooooooooooooooooo!!!!!!!! If i could send ya a beer right now believe me I would!

Stu, and my bad, group was named wrong!!!! Going to go rename my first born now!

Post Reply

Return to “Getting Started with LiveCode - Experienced Developers”