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

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

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

Cheers, Stu ;-) I'm glad it has been solved now.

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:51 am

Mark,

What can the message box be used for in general? I used it like you said and that is when I got back "false". Is it used for testing a script? or? Haven't read anyting yet that covers that although Marielle did suggest "Programming for Dummies". I've programmed in the past, but in programs that no longer matter. Used to have a Lotus 1-2-3 macro that i made that took 2 hours to run. I know..... but that was years ago. So not totally "ignorant" to programming thought. I would have already bought the book "Programming for Dummies" but didn't know or think it had much stuff in it about Rev.

Stu

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

Post by Mark » Fri Jan 26, 2007 2:08 am

Stu,

Section 3.6 of the user guide (in the pdf folder of the documentation folder of the Revolution application folder) says:
The Message Box is a command line tool that allows you to run scripts or perform automated editing operations. It allows you to try out short scripts, test parts of your program, provides a convenient output window for debugging, can be used for editing and setting properties.
I use it whenever I need to run a script while I don't need to save that script.

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 » Fri Jan 26, 2007 9:52 am

Mark wrote:put there is a group "Quest1multi" of cd 1
If my memory is correct, this is the test for files and folders. For controls, this is a very similar construct:

Code: Select all

if exists(group "Quest1multi") then 
   .. do something ...
end if
The other approach is with try. In a try construct, any line of code that triggers an execution error gets the program to move to the catch part of the construct. Any line of instruction that follows the one that triggered the error in the try part is simply being ignored. (That's a bit more advanced a concept, you may want to keep it for later... however keep it in mind as something to try and understand when you become more familiar with the language)

Code: Select all

try
  ... do something with group "Quest1multi ...
catch tErr
  ... tErr contains the error message, useful to track down what the problem may be and to eventually handle trick parts directly in the program ...
end try

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

Post by Mark » Fri Jan 26, 2007 10:09 am

Hi Marielle,

There is nothing wrong with "there is a group..." to check that the group exists. This syntax can also be used with any other control.

Although I use try-control structures quite often, in aboce discussed problem a try-control structure was unnecessary.

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 » Fri Jan 26, 2007 10:47 am

Mark wrote:There is nothing wrong with "there is a group..."
Indeed!
there is a {object | file filePath | folder folderPath | process procName}

Use the there is a operator to make sure an object or file exists before working with it, or to find out whether there are any objects of a specified type.

Whereas:

exists(object)

Use the exists function to make sure an object exists before you try to perform an action on it, or to determine whether to create an object.

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

Post by Mark » Fri Jan 26, 2007 10:49 am

Hi Marielle,

Yes, that is exactly what everybody can read in the docs that come with Revolution.

Thanks,

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 » Fri Jan 26, 2007 10:58 am

Mark wrote:Yes, that is exactly what everybody can read in the docs that come with Revolution.
As you well know, there is a *lot* to read in the docs :-). It takes a long time to master them completely.

Affordance is an interesting concept to remain aware of.

Affordance @ wikipedia
Psychologist James J. Gibson originally introduced the term in 1966, then explored it more fully in his book The Ecological Approach to Visual Perception in 1979. He defined affordances as referring to all "action possibilities" latent in the environment, objectively measurable, and independent of the individual's ability to recognize those possibilities. Further, those action possibilities are dependent on the capabilities of the actor. For instance, a set of steps with risers four feet high does not afford the act of climbing, if the actor is a crawling infant. So affordances must be measured always in relation to the relevant actor(s).

As well written and helpful as the docs are, their "affordance" remains very very low for new learners. Pasting a bit of the doc at a time, in the context of a question being asked, is known to greatly help new learners ;-).

Marielle

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

Post by Mark » Fri Jan 26, 2007 11:11 am

Sure, there is a lot to read, but most of the docs are easy to search through, although I made my own plugin to search the docs even faster.

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 » Fri Jan 26, 2007 11:24 am

Mark wrote:Sure, there is a lot to read, but most of the docs are easy to search through, although I made my own plugin to search the docs even faster.
(content not relevant to this thread. Go Helpful Resources :: helpful enough for getting started? to discuss this)
Last edited by marielle on Sat Jan 27, 2007 9:10 am, edited 3 times in total.

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

Post by Mark » Fri Jan 26, 2007 11:34 am

Hi Marielle,

Maybe you start a new thread "making revolution more affordable" and keep everything regarding the subject inside that thread? That would probably make it easier for newcomers to decide where to go in this forum. Now, your advice for starters is scattered all over the forum, it seems.

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 » Fri Jan 26, 2007 11:40 am

Mark wrote:Now, your advice for starters is scattered all over the forum, it seems.
[..] I will simply delete this lead in this thread tomorrow. (Done)

Marielle
Last edited by marielle on Sat Jan 27, 2007 9:08 am, edited 1 time in total.

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

Post by Mark » Fri Jan 26, 2007 11:54 am

Hi Marielle,

I think Stu wrote off-list because he understood that the subject was only indirectly related to this thread. So, maybe it would have been more appropriate to start a new thread. I'm only speculating of course, as I can't read Stu's mind and I don't know what he wrote to you. Obviously, I don't mind bringing your discussion with Stu back to the forum, as your contributions are generally valuable contributions.

Thanks again,

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 » Fri Jan 26, 2007 12:19 pm

Mark wrote:our contributions are generally valuable contributions.
Cool, a compliment :oops:. Likewise, Mark. I always appreciate your contributions, this one included.

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

Post by Mark » Fri Jan 26, 2007 12:55 pm

Thanks. It's fun, isn't it :-)

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

Return to “Getting Started with LiveCode - Experienced Developers”