where is LiveCode language spec? Java-like alternative?

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, robinmiller, kevinmiller

Post Reply
EndangeringSpecies
Posts: 12
Joined: Thu May 05, 2011 4:47 am

where is LiveCode language spec? Java-like alternative?

Post by EndangeringSpecies » Mon Jun 06, 2011 2:01 am

I understand that LiveCode uses a native language with a weird syntax, but I seem unable to find a thorough, example-based guide to that language. Is such a spec published?

Also, does RunRev provide a Java-like alternative scripting language for people who don't actually like the "natural language" type languages? If not, has anybody tried making a translator that would have allowed converting from a LiveCode-oriented Java dialect into LiveCode language?

Dixie
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1336
Joined: Sun Jul 12, 2009 10:53 am
Location: Bordeaux, France

Re: where is LiveCode language spec? Java-like alternative?

Post by Dixie » Mon Jun 06, 2011 6:24 am

EndangeringSpecies...

Please find below a couple of script handlers for those who think that using virtually 'plain english' with which to write syntax is wierd. Please note that the script below does not use any of the dialect externals like 'scouse', 'cockney' or 'geordie' that might confuse your understanding when first learning how to converse in LiveCode's natural english like syntax...

Code: Select all

global myUnderStanding

on basicUnderStanding
   answer "Choose level of understanding" with "Overview" or "Detailed Explanation" or "Cancel"
   if it is "Cancel" then exit basicUnderStanding
   if it is "Overview" then readUserGuide
   if it is "Detailed Explanation" then RTFM
end basicUnderStanding

on RTFM
   repeat with count = 1 to (the number of entries in theDictionary)
      put entry count of theDictionary in front of me on card 1
      highlight the examples of entry count of theDictionary
      read entry count of theDictionary slowly from top to bottom
      wait 5 minutes
      add 1 to myUnderStanding
   end repeat	
end RTFM

on readUserGuide
   ask file "Please choose the 'LiveCode User Guide.pdf"
   if it is not empty then
      launch it with Adobe Acrobat Pro
      read it from cover to cover
      put 1 into myUnderStanding
      exit readUserGuide
   else
      put empty into myUnderStanding
   end if
end readUserGuide
Hope that it helps...

Dixie

EndangeringSpecies
Posts: 12
Joined: Thu May 05, 2011 4:47 am

Re: where is LiveCode language spec? Java-like alternative?

Post by EndangeringSpecies » Mon Jun 06, 2011 5:37 pm

this may be "easy" to read for people who don't know Java. It doesn't make it easy to write for Java programmers. Which is why I pointed out that it would have made sense to have a translator from java/javascript/similar language to RevTalk or just natively support a C-style language for scripts along with the RevTalk.

Anyway, so where is the TFM that I should be RTFM'ing to get the gist of the RevTalk?

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

Re: where is LiveCode language spec? Java-like alternative?

Post by jacque » Mon Jun 06, 2011 5:52 pm

Dot syntax has been debated many times over the last few years, but it won't happen. Once you get the hang of the existing language you won't feel any need for it; that's what happens to most people. As I mentioned before, there is an "unlearning" curve you have to go through initially but it's pretty quick. I've posted the web page before where the main differences are noted for people coming from C-based languages, but if you need that link again just let me know and I'll go find it.

All the user guides and help info are accessible from LiveCode's Help menu. Start first with the main User Guide, then move on to the Android release notes. The desktop release notes can also be helpful, since those contain the very latest additions and some of that hasn't yet been put into the dictionary.

The User Guide will give you a general overvieiw of how the language and structure of LiveCode works. For details, the Dictionary is key; most of the nitty-gritty is in there. So after wrapping your head around the general concepts, start poking through the dictionary, which you can open from the toolbar. You'll find a wealth of info in there about all the commands, properties, and functions that LiveCode supports, all 4000+ of them.

Another very good source of info are the lessons that RR has been putting out at a tremendous rate. These are on the web site, you may have already seen some of them. From the main web page, choose "support" and then "lessons". Lots of stuff in there.

And finally, there is nothing better than looking at examples of working code. Click the User Samples icon on LiveCode's toolbar and RevOnline will open. This is a public repository of user contributions and you can find a huge number of working examples for lots of different things. Because it is all user-created, some examples are better than others, but you are apt to find code in there for many things you want to do.

And finally, keep posting here or on the mailing list. We'll help.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2780
Joined: Mon Jan 22, 2007 7:36 am
Location: Berkeley, CA, US
Contact:

Re: where is LiveCode language spec? Java-like alternative?

Post by mwieder » Tue Jun 07, 2011 10:59 pm

Once you get the hang of the existing language you won't feel any need for it
I use dot syntax in my LiveCode scripts quite a bit. I realize this probably annoys people who are dogmatic about "no dot syntax", but I find it makes my code (IMO) more readable and helps keep my scripts organized. YMMV.

That said, I've seen an attempt an a BNF syntax for xtalk - I'll see if I can dig up a reference.

Update: I should've guessed it would be on Jeanne's site <g>

http://www.jaedworks.com/hypercard/scri ... k-bnf.html

Might be a good idea to post a link to the lessons:
http://lessons.runrev.com/

Post Reply

Return to “Getting Started with LiveCode - Experienced Developers”