Baffling error with setting a label

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: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Andycal
Posts: 144
Joined: Mon Apr 10, 2006 3:04 pm

Baffling error with setting a label

Post by Andycal »

Code: Select all

on mouseUp pMouseBtnNo
if the label of me is "Edit"
    set the label of me to "Generate"
end if 

end mouseUp
Surely that should work? Gives me a compile error every time.
Andycal
Posts: 144
Joined: Mon Apr 10, 2006 3:04 pm

Post by Andycal »

D'oh!

Code: Select all

then
bjb007
Posts: 313
Joined: Fri Dec 28, 2007 4:56 am

Me too!

Post by bjb007 »

Andycal

I forget "then" every time but the compiler
pops up a message to remind me.

I do think the "then" is a useless piece of baggage
and it shouldn't be too difficult to change Rev to
work without it. After all the line always starts
with "if" so ......
Life is just a bowl of cherries.
Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark »

Hey Grumpy,

Every language needs some sort of "then". Sometimes it is ( and ) or { and }, sometimes it is ";". Be happy to have a readable "then" in xtalk languages.

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
Post Reply