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 » Tue Jun 17, 2008 10:14 am

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 » Tue Jun 17, 2008 10:15 am

D'oh!

Code: Select all

then

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

Me too!

Post by bjb007 » Wed Jun 18, 2008 6:00 am

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 » Wed Jun 18, 2008 8:01 am

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