Re: Sample stack demonstrating how to obtain all properties and custom properties of a stack?

2011-12-29 Thread Richard Gaskin

Bob Sneidar wrote:


It seems like it would be easier to clone a stack, then reset everything in it, 
or just keep a copy of a virgin stack around. You would have to update it every 
time you made any changes to the original though.


That's been my experience as well.  The stack file format is so compact 
and convenient that it's hard to beat for most project management tasks.


Keith, what is the problem you were looking to solve?

--
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 LiveCode Journal blog: http://LiveCodejournal.com/blog.irv

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Sample stack demonstrating how to obtain all properties and custom properties of a stack?

2011-12-29 Thread Bob Sneidar
Right. It seems like it would be easier to clone a stack, then reset everything 
in it, or just keep a copy of a virgin stack around. You would have to update 
it every time you made any changes to the original though. 

Bob


On Dec 28, 2011, at 1:51 PM, stephen barncard wrote:

> A while ago I experimented with saving complete descriptions of livecode
> objects as text with some success. It was possible to get most, but not all
> properties in repeat loops, however I found that the recursive code needed
> to bury within groups of groups was just too time consuming to be worth it.
>  It was pointless to continue, the packaging I desired was much more
> easily handled and portable with the Livecode containers.


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Sample stack demonstrating how to obtain all properties and custom properties of a stack?

2011-12-28 Thread stephen barncard
well if one were setting all of the properties of a stack, they'd have to
be set to  another stack.

 set the properties of stack "b" to the properties  of  stack "a"

Easier to copy the stack.Can all the properties be placed into a variable?
  I think some props will be left out by design, otherwise objects would
blow up.


 A while ago I experimented with saving complete descriptions of livecode
objects as text with some success. It was possible to get most, but not all
properties in repeat loops, however I found that the recursive code needed
to bury within groups of groups was just too time consuming to be worth it.
  It was pointless to continue, the packaging I desired was much more
easily handled and portable with the Livecode containers.


On 28 December 2011 13:17, Bob Sneidar  wrote:

> I meant all at once as in set the properties of this stack to
> theSavedProperties
>
> Bob
>
>
> On Dec 28, 2011, at 10:16 AM, Mark Wieder wrote:
>
> > Bob-
> >
> > Wednesday, December 28, 2011, 8:31:54 AM, you wrote:
> >
> >> Putting the standard properties back is a bit trickier though. I
> >> don't think you can set the properties of a stack.
>
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



-- 



Stephen Barncard
San Francisco Ca. USA

more about sqb  
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Sample stack demonstrating how to obtain all properties and custom properties of a stack?

2011-12-28 Thread Bob Sneidar
I meant all at once as in set the properties of this stack to theSavedProperties

Bob


On Dec 28, 2011, at 10:16 AM, Mark Wieder wrote:

> Bob-
> 
> Wednesday, December 28, 2011, 8:31:54 AM, you wrote:
> 
>> Putting the standard properties back is a bit trickier though. I
>> don't think you can set the properties of a stack.


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Sample stack demonstrating how to obtain all properties and custom properties of a stack?

2011-12-28 Thread Mark Wieder
Bob-

Wednesday, December 28, 2011, 8:31:54 AM, you wrote:

> Putting the standard properties back is a bit trickier though. I
> don't think you can set the properties of a stack.

Most of them you can. Some are read-only. If you wrap your code below
in a try-catch construct you can avoid the errors.

> I think you have
> to loop through them. repeat for each element pProp in
> theStackProps;set the pProp of this stack to theStackProps[pProp]
> off the top of my head. 

Oh - and there are a few (can't remember off the top of my own head)
that have to be done in the proper order, particularly the ones that
deal with height/width/right/left/top/bottom, etc.

-- 
-Mark Wieder
 mwie...@ahsoftware.net


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Sample stack demonstrating how to obtain all properties and custom properties of a stack?

2011-12-28 Thread Bob Sneidar
Get the customProperties of a stack. It is an array. Get the properties of a 
stack. It is (almost) all of the properties of the stack as an array. at this 
point the easiest thing to do to save them as a file on disk is to 
arrayEncode() them and write them to a low level file. Not sure if you need to 
base64 encode them too. Only way to tell is to try. See open file, read from 
file, and write to file in the dictionary. 

Putting the standard properties back is a bit trickier though. I don't think 
you can set the properties of a stack. I think you have to loop through them. 
repeat for each element pProp in theStackProps;set the pProp of this stack to 
theStackProps[pProp] off the top of my head. 

You may however be able to just set the customProperties of a stack. 

Bob


On Dec 28, 2011, at 12:38 AM, Keith (Gulf Breeze Ortho Lab) wrote:

> Hi All,
> 
> Does anyone know of a sample stack demonstrating how to pull all of the 
> properties and custom properties out of a stack, putting them into a file, 
> and then demonstrating how to put the file of data back into the stack (or 
> into another copy or clone of the original stack)?
> 
> Thanks,
> 
> - Boo
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Sample stack demonstrating how to obtain all properties and custom properties of a stack?

2011-12-28 Thread Keith (Gulf Breeze Ortho Lab)
Hi All,

Does anyone know of a sample stack demonstrating how to pull all of the 
properties and custom properties out of a stack, putting them into a file, and 
then demonstrating how to put the file of data back into the stack (or into 
another copy or clone of the original stack)?

Thanks,

- Boo
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode