simple code failure

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, asayd

chris25
Posts: 354
Joined: Tue Oct 08, 2013 9:32 pm

simple code failure

Post by chris25 » Mon Oct 14, 2013 6:47 pm

Screen shot 2013-10-14 at 18.42.22.png
I have up loaded the snapshot of my screen to demonstrate. I really have no idea, I checked the library, checked all that I know.
I can not believe after last night that tis went wrong, I received this error messages but can not understand their real meaning, just one moment ago when I did the EXACT same thing the error message read "char 13" instead of the char 20 that you see now. (what char means I have no idea) I still can not believe that after three days I am unable to write a single simple piece of "toddler" code.

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am
Location: Palo Alto

Re: simple code failure

Post by Simon » Mon Oct 14, 2013 6:57 pm

Slow down there Turbo! :)
Read aloud that line of script (the put... one). Maybe read it aloud to someone else and ask what is wrong with the English sentence?

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

chris25
Posts: 354
Joined: Tue Oct 08, 2013 9:32 pm

Re: simple code failure

Post by chris25 » Mon Oct 14, 2013 7:09 pm

I just did the time from the clock and it worked perfectly, so I went back to the date and inserted the word"into" and it worked. But I would NEVER have made this mistake if it were not for the fact that I read many times that you did not need to use prepostions in the sentences. So having omitted words like "to" I assumed, obviously erroneously, that I could omit the word "into". So from now on I will always use prepositions because I need consistency.

Thanks Simon. On a side not what on earth does "char" mean anyway?



Simon, I just spent half an hour on that button exercise trying to get it to enable and disable timezones (from the exercise last night). Now SUCCESS. But where I was going wrong has eluded me. I kept inserting the text: enable field TZones.....but all the time it should have been enable button TZones.
Question: this is a Text field, why is it then Button? that's why I was going wrong.
Last edited by chris25 on Mon Oct 14, 2013 7:39 pm, edited 1 time in total.

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am
Location: Palo Alto

Re: simple code failure

Post by Simon » Mon Oct 14, 2013 7:19 pm

Char is the abbr/abbrev/abbreviated :) Character

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

chris25
Posts: 354
Joined: Tue Oct 08, 2013 9:32 pm

Re: simple code failure

Post by chris25 » Mon Oct 14, 2013 7:42 pm

Simon wrote:Char is the abbr/abbrev/abbreviated :) Character

Simon
ok funny. So there do seem to be quite a lot of [ {ab/{abb}/ [abbr] /abbre/ \abbrev/ | abbrevia/]\ [ | abbreviated} ] shortened forms around these days eh?

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am
Location: Palo Alto

Re: simple code failure

Post by Simon » Mon Oct 14, 2013 8:04 pm

Yeah, yesterday I tried to see if there was a way to list all of them, but no go.
Common ones I use:
btn = button
fld = field
char = character
chars = characters
grp = group
grc = graphic
img = image
cr = return (put "I am new" & cr & "to liveCode") I have some confusion on return vs enter, I think one is Mac the other is Win but there is something about it being related to a number keypad as well.

There are a bunch more listed in the dictionary entries under the Synonyms: sub heading.

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

chris25
Posts: 354
Joined: Tue Oct 08, 2013 9:32 pm

Re: simple code failure

Post by chris25 » Mon Oct 14, 2013 8:40 pm

Hi Simon, I don't know if this helps, but as I have understood things down through the years the Enter button is used to execute a command, the return button is used in word processing to stipulate a return carriage in the text file, in other words a return carriage carries with it the text formatting where as an enter will end the text formatting. I think....which is different from an enter which stipulates an END in word processing. Now these two buttons have become blurred in their use I think.

I am stuck! I have completed all scripting exercises up to page 8 on the scripting exercise assignments. page 9 is where the instructions are more confusing than the scripting language; any chance you could interpret what is being asked please? I don't understand it. Should have said, the Arrow buttons exercise. Not sure how to begin this one. Suppose I should add, part two is self explanatory, but it seems to make part three instructions null void and redundant. Part one is really confusing since I could make the icons and highlights of the black buttons appear, but then what's that got to do with the four blue ones on top?

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am
Location: Palo Alto

Re: simple code failure

Post by Simon » Mon Oct 14, 2013 9:06 pm

Hi Chris,
He just wants you to
1) change the icons of the black arrows using the blue images.
2) This is like that yellow note thing (still I'm not sure of how you place it on existing cards)
3) visual effects is in the lesson.

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

chris25
Posts: 354
Joined: Tue Oct 08, 2013 9:32 pm

Re: simple code failure

Post by chris25 » Mon Oct 14, 2013 9:30 pm

Yes, I have skipped this one, QUOTE: change the icons of the black arrows using the blue images.UNQUOTE this is a ridiculous instruction, it makes no sense whatsoever. Change the icons of the black arrows to blue arrows? or something How on earth do I use the blue arrows to change the black arrows, it sounds so absurd. I'll just delete the blue arrows and make an icon in the black arrows?

I am trying to place that yellow card, have been stuck on that for 30 minutes. I made it a group, I entered property inspector and set it as a background - yep Nothing happens. The beginner's pdf instructions are plain and simple enough sometimes, even after following the little instruction they give, my background group still does not appear on every card. I have used searched facilities but have turned up nothing. So i guess I will have to skip this one as well. It's annoying. The PDF gives a vital clue but then, as usual leaves you hanging, it says:

Once you create a group, you can display it on any or all cards in the stack. First, ensure
that the group’s Behave as Background option has been set in the Inspector. <<DONE>> Then
navigate to the card you want to place the group on and choose Object -> Place Group <<DONE BUT IS GRAYED OUT>>
to place an instance of a particular group on the current card. You can control these
features from script by using the backgroundBehavior <<HAVE YET TO LOOK THIS UP>>property and place
command.
Note: When you create a new card, if there are any groups on the current card whose
Behave as Background has been set, they are automatically placed on the new card. <<WELL MINE DOES'NT>>To
make it easy for all the cards in a stack to share a single group, create the group on the
first card and set this property to true <<NOW YES BUT WHERE IS THAT? SET PROPERTY to TRUE? HOW DO YOU ACCESS THIS>>, before you create any other cards.

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am
Location: Palo Alto

Re: simple code failure

Post by Simon » Mon Oct 14, 2013 10:19 pm

2) This is like that yellow note thing (still I'm not sure of how you place it on existing cards)
Ok I see by your post he wants to use "Place Group" I knew that one, thought he had something fancy.
I'll just delete the blue arrows and make an icon in the black arrows?
Nope, you know how to assign an image ID to a buttons icon.

Too many if's in your "behave like background" question.

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

chris25
Posts: 354
Joined: Tue Oct 08, 2013 9:32 pm

Re: simple code failure

Post by chris25 » Mon Oct 14, 2013 10:42 pm

Screen shot 2013-10-14 at 22.36.48.png
Hi

According to everything that I can find, there is no reason why this should not work. It does'nt. Yep found it, in a help file, and that was Very Clearly explained, the beginners pdf is awful.

As for the Buttons, I still do not understand what on earth I am supposed to do. Am I to "cause" the black button to become like the blue button by assigning script into the blue button Object that tells the black buttons to change into the blue buttons?
Last edited by chris25 on Mon Oct 14, 2013 10:57 pm, edited 1 time in total.

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am
Location: Palo Alto

Re: simple code failure

Post by Simon » Mon Oct 14, 2013 10:57 pm

Buttons: No just change the icons of the black buttons. Inspector > Icons & Border

Behave like background: Try starting a new stack, you have it selected correctly so everything should work, unless...

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

chris25
Posts: 354
Joined: Tue Oct 08, 2013 9:32 pm

Re: simple code failure

Post by chris25 » Mon Oct 14, 2013 11:00 pm

Have done the backgound (as explained above by selecting the Place command on each and every card but can not figure out the text yet.

You said: Buttons: No just change the icons of the black buttons. Inspector > Icons & Border I Knew all that, that's easy..... Why make the darn question so complicated. Now I'm madder than before :oops:

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am
Location: Palo Alto

Re: simple code failure

Post by Simon » Mon Oct 14, 2013 11:11 pm

Wow, I found it. The "place with text" had me going.

Ok I can't find a write up on it so here it is.
In the fld inspector (not the group) select "Share text"

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

chris25
Posts: 354
Joined: Tue Oct 08, 2013 9:32 pm

Re: simple code failure

Post by chris25 » Mon Oct 14, 2013 11:24 pm

Simon wrote:Wow, I found it. The "place with text" had me going.

Ok I can't find a write up on it so here it is.
In the fld inspector (not the group) select "Share text"

Simon
Ok Simon, wow, brilliant, but How did you find it so perhaps maybe I can learn something from your searching strategy for the future....

Post Reply

Return to “LiveCode University”