Opening a Stack from the Server

This lesson shows  you how to open a stack from a server using a desktop based standalone. This technique means you can  download data to your application temporarily, administer updates to all your users via the server stack, or  connect to other users by using a common stack from the server. It can also be used to reduce the standalone size and for a variety of other purposes.

Step 1: Create the Standalone Launch Stack

Step 1: Create the Standalone Launch Stack

From this launch stack, we call the Main Application from the server using this code

on mouseUp

  go stack url "http://techsupport.on-rev.com/MainApplication.livecode"

end mouseUp

Step 2: Creating the main stack which will be opened from server

Step 2: Creating the main stack which will be opened from server

This is the Main stack which is uploaded to the server. Here we can also get the image from the server using on openCard:

on openCard

  set the filename of image "city" to "http://karthiktest.on-rev.com/edinburgh_004p.jpeg"

end openCard

Please Note: This should be uploaded as a normal LiveCode stack and not as a standalone.

Step 3: Save the Launch stack as Standalone

Step 3: Save the Launch stack as Standalone

Step 4: Upload the Main stack and Image to the server

Step 4: Upload the Main stack and Image to the server

As you can see we have uploaded the raw LiveCode file.

Step 5: Running the Standalone to get the stack from the server

Step 5: Running the Standalone to get the stack from the server

Once we click the button "Get data from Web" the Main stack is opened.

That's it! Pretty simple, but a very useful technique to know.

0 Comments

Add your comment

E-Mail me when someone replies to this comment