TG Posted June 23, 2007 Report Share Posted June 23, 2007 Sorry , posted to 8.xx discussion forum by mistake. Reposting an edited version here. Let me try to re-phrase this Q since its possible I am looking at this the wrong way. GOOP 3.0.5 1) Create object (x) 2) Use object (x) in VI(a) : ( VI(a) runs independently using object(x) methods to do some task ) 3) Start VI(b) : (ALso an independent process) 4) Inside VI(b) obtain a valid reference to object (x) How to get this ref in VI(b) without a direct wire connection? Thank you JR Quote Link to comment
Thang Nguyen Posted June 23, 2007 Report Share Posted June 23, 2007 Hi, You can take a look at this topic http://forums.lavag.org/CR-Get-Reference-T...rols-t7354.html or for more simple just right click on the object and create reference. Then you can pass this reference and change the value base on the property node. Thang Quote Link to comment
Jeffrey Habets Posted June 23, 2007 Report Share Posted June 23, 2007 QUOTE(John Rouse @ Jun 22 2007, 06:48 PM) 1) Create object (x)2) Use object (x) in VI(a) : ( VI(a) runs independently using object(x) methods to do some task ) 3) Start VI(b) : (ALso an independent process) 4) Inside VI(b) obtain a valid reference to object (x) How to get this ref in VI(b) without a direct wire connection? You can name your objects.. The private "New" method that is used in the Create method to construct the object has inputs Create method and Object name. Set the latter to some unique name for your object and set Create method to Create or lookup existing. This way a first call to the create method will create the object, but every subsequent call will return a reference to the existing object. Quote Link to comment
TG Posted June 24, 2007 Author Report Share Posted June 24, 2007 QUOTE(Jeffrey Habets @ Jun 22 2007, 06:33 PM) You can name your objects..The private "New" method that is used in the Create method to construct the object has inputs Create method and Object name. Set the latter to some unique name for your object and set Create method to Create or lookup existing. This way a first call to the create method will create the object, but every subsequent call will return a reference to the existing object. Thanks guys for the comments. I think I figured it out. Sorry I am not always clear about what I am looking for because Im not sure myself sometimes I am using the singleton nature of a Named object and also the "Create or look up existing" feature. What I couldn't figure out (until today) is how to keep from initializing my object attributes from its external ini file in the create method. I guess the only obvious solution is to have a boolean attribute such as "Active" that I could set to TRUE once the object is created and properly initialized. Then, when creating it again elsewhere check on the "Active" boolean to determine what to do next. If "Active is True, pass the ref through and do nothing else. If "Active" is False, Load the attributes from disk file and do whatever other setup it needs. The destructor will set the "Active" back to False before storing the object state back to the disk file. I think this will work. Quote Link to comment
Michael Aivaliotis Posted June 25, 2007 Report Share Posted June 25, 2007 QUOTE(John Rouse @ Jun 22 2007, 09:48 AM) Sorry , posted to 8.xx discussion forum by mistake.Reposting an edited version here. Admin Note: Next time, you don't have to repost. Just click on the report post button at the bottom left of the post. Then type your request into the text box. An admin will move the post into the right forum. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.