Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently December 23rd, 2024, 6:42 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 11 posts ] 
Author Message
 Post subject: GetPersistentObject()
PostPosted: February 16th, 2009, 5:05 pm 
Offline

Joined: January 19th, 2005, 5:15 pm
Posts: 83
Location: Netherlands
Does anyone know how to use this function ?

The help only states the next:

Syntax:

GetPersistentObject()

Return:

A unique persistent copy of this object.

Remarks:

The first time this function is called for any particular object a new script object is created as if the script "new Object" had been used. Subsequent calls to the function will return the same object. By setting properties of the object returned information can be stored that will remain even while the page is not visible. This mechanism is required because the objects on the page are destroyed when the page is no longer visible and are recreated when it becomes visible again.


Top
 Profile  
 
 Post subject:
PostPosted: February 16th, 2009, 6:48 pm 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
This function creates a new native Object for the given host object.

As the Object is persistent, it is not destroyed like host objects when the page is changed.

To use it you would assign the new Object to variable, etc.

For example

var obj = Frame_1.GetPersistentObject()

Mack

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


Top
 Profile Visit website  
 
 Post subject:
PostPosted: March 31st, 2009, 8:53 am 
Offline
Godlike
Godlike

Joined: November 12th, 2005, 1:56 am
Posts: 1474
Location: SFBay Area
Opus: OpusPro v9.0x, & Evol.
OS: Vista32
System: Core 2 duo 2Ghz, RAM 3GB, Nvidia Go 7700 - laptop
I tried using this command with no success. Am I wrong in my thinking? If execute the code above on Page1, can I show and manipulate 'obj' or 'Frame_1' on Page2?

If it doesn't enable using objects across pages, what benefit or use is this command?

_________________
_good things come to those who wait(0)_


Top
 Profile  
 
 Post subject:
PostPosted: March 31st, 2009, 11:30 am 
Offline

Joined: October 25th, 2004, 3:03 pm
Posts: 540
Location: Tyalgum Creek. Australia
Opus: Opus Pro Latest version 9.02 Build 16458
OS: Won 10
System: Asus laptop Intel Core i5 8 gig ram, big monitor, reading glasses
One sometimes gets this function repeatedly after you fail to follow your wife's directives :D

_________________
Too much coffee can result in frequent toilet breaks!


Top
 Profile  
 
 Post subject:
PostPosted: March 31st, 2009, 1:25 pm 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
Which is shortly followed by IsObjectIntersecting() :-)

Mack

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


Top
 Profile Visit website  
 
 Post subject:
PostPosted: March 31st, 2009, 10:07 pm 
Offline
Godlike
Godlike

Joined: November 12th, 2005, 1:56 am
Posts: 1474
Location: SFBay Area
Opus: OpusPro v9.0x, & Evol.
OS: Vista32
System: Core 2 duo 2Ghz, RAM 3GB, Nvidia Go 7700 - laptop
I think you're both confusing this with some undocumented commands?
-- GetPersistentObjections()
-- IsObjectionInteresting() == false { do Chores() }

Code:
while (married) {
for (ever) {
var diff_opinions = null ; //returns 'invalid value', NaN, NaG ...
}  }

Been there, done that. So trying some OOPs scripts.

_________________
_good things come to those who wait(0)_


Top
 Profile  
 
 Post subject:
PostPosted: April 1st, 2009, 2:42 pm 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
damn those undocumented commands!

As for being persistent, controlling across pages is not it's cuppa tea :-(

It's a weird beastie, this one and most would probably simply create the same effect by reading the host objects into a global array but if you are creating a large multi-page program and want to be a super-ooper, then you could employ this method as it would offer an element of ease over using a super-array to track objects unless being associative is your kettle of fish (mostly piranhas) but that sounds like hard work.

On a serious point though, if Opus was able to access the persistent native object for a host object on other pages, this could provide large scale projects with an amazing internal data management system and scrap the need for lots of extra variables but alas on the family tree that is the publication - it doesn't seem to get much farther than the page branch :-?

Mack

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


Top
 Profile Visit website  
 
 Post subject:
PostPosted: April 2nd, 2009, 8:40 pm 
Offline
Godlike
Godlike

Joined: November 12th, 2005, 1:56 am
Posts: 1474
Location: SFBay Area
Opus: OpusPro v9.0x, & Evol.
OS: Vista32
System: Core 2 duo 2Ghz, RAM 3GB, Nvidia Go 7700 - laptop
Mack wrote
Quote:
most would probably simply create the same effect by reading the host objects into a global array but if you are creating a large multi-page program and want to be a super-ooper, then you could

I don't know what I need/will-do yet.

I still don't know/understand how exactly GetPersistentObject would be useful if it simply keeps an object alive for its page of residence. I guess if I rotated something and changed its colour, then returning to the page would restore it with that set of properties.

I might explore it further. What was thinking is to have a constructed object (ie, new Object()) in script hold various Page 'states' so that when a User returned to that page he is returned to the page the way he left it. But I think simply scripting will not accomplish that without a Pub level var or writing out to file or DB.

Quote:
using a super-array to track objects unless being associative is your kettle of fish (mostly piranhas) but that sounds like hard work.

I think that is what you are referring to here. 'Yeah', rather involved... at least at the thinking and designing phase.

And the above mentioned GPO() only works for Host objects it seems.

Thanks.

_________________
_good things come to those who wait(0)_


Top
 Profile  
 
 Post subject:
PostPosted: April 3rd, 2009, 10:43 am 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
Hi Lar,

Yeah, you're pretty much hitting the nail on the head. Any native object would need to be stored in a global variable, but of course you only need one variable to hold the super object which then holds the sub objects which then holds the properties.

But then this can hurt the head as much as working out the set-up for a GPO() but for large projects and when dealing with customers this a serious must. It's much easy to adapt a project that has been created using the principles of OOP that one with a crazy number of variables.

As for GPOs only for host objects - yes but then I cannot see why they'd be necessary for anything less.

Enjoy,

Mack

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


Top
 Profile Visit website  
 
 Post subject:
PostPosted: April 3rd, 2009, 7:15 pm 
Offline
Godlike
Godlike

Joined: November 12th, 2005, 1:56 am
Posts: 1474
Location: SFBay Area
Opus: OpusPro v9.0x, & Evol.
OS: Vista32
System: Core 2 duo 2Ghz, RAM 3GB, Nvidia Go 7700 - laptop
Thx.
Quote:
but for large projects and when dealing with customers this a serious must. It's much easy to adapt a project that has been created using the principles of OOP than one with a crazy number of variables.

Good timing with this advice. I am migrating a pilot layout after some rethinking. Trying to get my mind around the various piecemeal operations I built and bring some sense of order to it all.

I'll try using your past post on OOPs to see what I can sketch out for a super-Array.

_________________
_good things come to those who wait(0)_


Top
 Profile  
 
 Post subject:
PostPosted: April 3rd, 2009, 9:12 pm 
Offline
Godlike
Godlike

Joined: November 12th, 2005, 1:56 am
Posts: 1474
Location: SFBay Area
Opus: OpusPro v9.0x, & Evol.
OS: Vista32
System: Core 2 duo 2Ghz, RAM 3GB, Nvidia Go 7700 - laptop
Mack wrote:
Quote:
Any native object would need to be stored in a global variable, but of course you only need one variable to hold the super object which then holds the sub objects which then holds the properties.


I'd like to continue this part of the discussion, so am going over to previous post which is more directly on-topic for OOPs:
posting.php?mode=reply&t=3521

_________________
_good things come to those who wait(0)_


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 18 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group