Newbie How do i see script of Demo stacks

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
jpottsx1
Posts: 46
Joined: Thu Jun 04, 2009 12:46 am
Contact:

Newbie How do i see script of Demo stacks

Post by jpottsx1 » Wed Feb 17, 2010 9:39 pm

Hi, I'm a new user and want to go through the tutorial lessons but I cannot figure out how to see the scripts from the demo downloads.

Also, How do I "tear appart" a stack and get a view of the cards. For example the "Using Tabs" lesson switches between cards and I can't loate them to view them?

Jeff
Jeff G potts

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10052
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Newbie How do i see script of Demo stacks

Post by FourthWorld » Wed Feb 17, 2010 10:33 pm

Where is this demo located?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

jpottsx1
Posts: 46
Joined: Thu Jun 04, 2009 12:46 am
Contact:

Re: Newbie How do i see script of Demo stacks

Post by jpottsx1 » Wed Feb 17, 2010 10:47 pm

The demo file is located at: http://lessons.runrev.com/spaces/lesson ... ab-Buttons,
and the file itself is located at: http://lessons.runrev.com/spaces/lesson ... on_id=7574.

I'm coming from Filemaker and from NSBasic where I can go to the scripts section or to view the layouts and dbl click to get the object scripts before compiling. Here I get a compiled app when I open the tutorial file.
Jeff G potts

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10052
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Newbie How do i see script of Demo stacks

Post by FourthWorld » Wed Feb 17, 2010 11:41 pm

There is no "compiled app" per se; one of the benefit of Rev is that it liberates the developer from the runtime-compile cycle.

What you have are objects, which have scripts in them. As soon as you close the script editor they're compiled and ready to run, right in the IDE.

The step-by-step instructions in that tutorial guide you to where the code is. You'll find bits and pieces in various objects throughout the stack. Going through the tutorial should provide a good introduction to how and why the objects and their scripts are laid out as they are.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

jpottsx1
Posts: 46
Joined: Thu Jun 04, 2009 12:46 am
Contact:

Re: Newbie How do i see script of Demo stacks

Post by jpottsx1 » Thu Feb 18, 2010 1:06 am

I understand what you've said, however have you tried to gain access to the cards that are part of the solution? Each one has its own set of butons etc. How do I get to those items? In filemaker I have layouts that are available, and scripts that I can edit independant of the forms. So I ask where are these in the demo. How do I get to them.

Double clicking on the obvious objects of the tab panel provides one script. Where are the rest

Jeff
Jeff G potts

jpottsx1
Posts: 46
Joined: Thu Jun 04, 2009 12:46 am
Contact:

Re: Newbie How do i see script of Demo stacks

Post by jpottsx1 » Thu Feb 18, 2010 1:24 am

The tutorial states that I should click on the tab and edit the object script.
The script should be an "on mouseup" but it is:

on menuPick pItemName
switch pItemName

end switch
end menuPick
Jeff G potts

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4172
Joined: Sun Jan 07, 2007 9:12 pm

Re: Newbie How do i see script of Demo stacks

Post by bn » Thu Feb 18, 2010 1:47 am

jpottsx1,
The script should be an "on mouseup" but it is:

on menuPick pItemName
switch pItemName

end switch
end menuPick
you can replace the script in the tabb panel with

Code: Select all

on mouseUp
--your script here
end mouseUp
just as the tutorial says. If you look at the tutorial stack it uses in the tab panel in the first stack "on mouseUp" to navigate between the cards. Here you could also say

Code: Select all

on menuPick theItem
  go card theItem
end menuPick
it is just a different way of coding, the main difference beeing that you have a parameter theItem that you get sent automatically in the latter case.
regards
Bernd

jpottsx1
Posts: 46
Joined: Thu Jun 04, 2009 12:46 am
Contact:

Re: Newbie How do i see script of Demo stacks

Post by jpottsx1 » Thu Feb 18, 2010 2:37 pm

ThX for the clarification . . . it went a long way to better understanding things. I also discovered that the joy of Runrev is its simplicicty. The Object browser was what was missing for me to better understand the problem.
Jeff G potts

Post Reply