Application Data

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Application Data

Peter Bogdanoff
Hi,

I’m designing a new application whereby a user creates animation: images, buttons, fields, graphics, new cards, etc., are created in my LC runtime using the standard LiveCode controls. I will have a palette of tools available to the user to do their creative work. The user then saves the file which can be reopened by anyone who has my application.

I like the design of Apple’s Pages page layout application where the single window is a working area (canvas) for the page you’re working on, an inspector area on the right, and a sort of menubar area on the top of the whole thing that also has additional tools. As you resize the window a grey backdrop shows behind.

I can recreate this in LiveCode pretty easily. However, the stuff in the canvas, the working area needs to be saved as a project file outside my application to be reloaded again later. It would be great if this was simply a stack that is opened and shows in my application window. But I don't see how I can “connect” that stack into my application window, so you can drag the window around, resize it, work on it, and it is one single window.

The alternative I see is to save data describing each object into an external file and recreate the controls and text content when the project file is reloaded.

I strongly suspect that someone has done this sort of thing before… Is there a way to physically “connect” two stacks together? Or, any suggestions on saving and reloading descriptive data about the contents of a stack?

Thanks!

Peter Bogdanoff
UCLA
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Application Data

Monte Goulding

> On 29 Oct 2015, at 9:54 am, Peter Bogdanoff <[hidden email]> wrote:
>
> Or, any suggestions on saving and reloading descriptive data about the contents of a stack?

Feel free to look at lcVCS source as an example of exporting and importing objects. It’s really not very complicated if you are talking about just one group or something. The complicated parts come when you start dealing with inter-stack dependencies, object IDs and unshared data in shared groups…

Cheers

Monte
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Application Data

David Bovill-3
Cloning a group from one stack to another is very fast?

On Wednesday, 28 October 2015, Monte Goulding <[hidden email]>
wrote:

>
> > On 29 Oct 2015, at 9:54 am, Peter Bogdanoff <[hidden email]
> <javascript:;>> wrote:
> >
> > Or, any suggestions on saving and reloading descriptive data about the
> contents of a stack?
>
> Feel free to look at lcVCS source as an example of exporting and importing
> objects. It’s really not very complicated if you are talking about just one
> group or something. The complicated parts come when you start dealing with
> inter-stack dependencies, object IDs and unshared data in shared groups…
>
> Cheers
>
> Monte
> _______________________________________________
> use-livecode mailing list
> [hidden email] <javascript:;>
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Application Data

Peter Bogdanoff
Monte, with lcVCS, the user of my application would have their file data saved into a number of folders? Would the users of my runtime need to install dlls and such?

David, yes, copying a group back and forth seems simpler. I’m trying to understand this concept… So, to save to another file, I could clone the stack, delete unwanted groups and what not, and save. To import the controls, I would open that stack and copy the cards over, or copy the controls??

On a side note…it seems to be true that because a runtime with the LC engine can create a new stacks complete with controls, properties, and scripts, and save, open, modify, and interact with it, in essence my runtime application becomes a shadow version of LiveCode, and me now a mini-LiveCode mogul?

Peter

On Oct 28, 2015, at 4:18 PM, David Bovill <[hidden email]> wrote:

> Cloning a group from one stack to another is very fast?
>
> On Wednesday, 28 October 2015, Monte Goulding <[hidden email]>
> wrote:
>
>>
>>> On 29 Oct 2015, at 9:54 am, Peter Bogdanoff <[hidden email]
>> <javascript:;>> wrote:
>>>
>>> Or, any suggestions on saving and reloading descriptive data about the
>> contents of a stack?
>>
>> Feel free to look at lcVCS source as an example of exporting and importing
>> objects. It’s really not very complicated if you are talking about just one
>> group or something. The complicated parts come when you start dealing with
>> inter-stack dependencies, object IDs and unshared data in shared groups…
>>
>> Cheers
>>
>> Monte
>> _______________________________________________
>> use-livecode mailing list
>> [hidden email] <javascript:;>
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Application Data

Monte Goulding

> On 29 Oct 2015, at 11:22 am, Peter Bogdanoff <[hidden email]> wrote:
>
> Monte, with lcVCS, the user of my application would have their file data saved into a number of folders? Would the users of my runtime need to install dlls and such?

I was purely talking about it as an example not an implementation you would directly use.

Cheers

Monte
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Application Data

Peter Bogdanoff
Of course, thanks.


On Oct 28, 2015, at 5:37 PM, Monte Goulding <[hidden email]> wrote:

>
>> On 29 Oct 2015, at 11:22 am, Peter Bogdanoff <[hidden email]> wrote:
>>
>> Monte, with lcVCS, the user of my application would have their file data saved into a number of folders? Would the users of my runtime need to install dlls and such?
>
> I was purely talking about it as an example not an implementation you would directly use.
>
> Cheers
>
> Monte
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Application Data

tbodine
In reply to this post by David Bovill-3
There's one potential problem with cloning or copying a group or controls from one stack to another... In a standalone that uses password protection, the engine will silently block the copy/clone operation as part of that protection. (In the IDE, everything works fine. It's only shows up as a problem when you build a protected standalone.)

So when using stacks as user files in a protected app, I've found these two things are necessary:
1) make those user file stacks unprotected.  
2) any controls or groups being copied into the user stacks needs to originate from stacks (or substacks) that are also not protected.

Hope that's useful.

Tom Bodine
Reply | Threaded
Open this post in threaded view
|

Re: Application Data

Peter Bogdanoff
Tom,

Thanks very much for this info! You’re saving me a lot of grief!!

Peter

On Oct 29, 2015, at 9:08 AM, tbodine <[hidden email]> wrote:

> There's one potential problem with cloning or copying a group or controls
> from one stack to another... In a standalone that uses password protection,
> the engine will silently block the copy/clone operation as part of that
> protection. (In the IDE, everything works fine. It's only shows up as a
> problem when you build a protected standalone.)
>
> So when using stacks as user files in a protected app, I've found these two
> things are necessary:
> 1) make those user file stacks unprotected.  
> 2) any controls or groups being copied into the user stacks needs to
> originate from stacks (or substacks) that are also not protected.
>
> Hope that's useful.
>
> Tom Bodine
>
>
>
> --
> View this message in context: http://runtime-revolution.278305.n4.nabble.com/Application-Data-tp4698191p4698215.html
> Sent from the Revolution - User mailing list archive at Nabble.com.
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Sri
Reply | Threaded
Open this post in threaded view
|

Re: Application Data

Sri
In reply to this post by Peter Bogdanoff
Peter:
Will this work?

1. Use windowShape property to create your "application" stack with a rectangular hole in the middle for the "user" stack.
2. Constrain the location and dimensions of the user stack so it stays within bounds when the user resizes it.
3. Use mouseEnter and mouseLeave to activate the respective stack.

Regards,
Sri