Jump to content

Default Value for Class


Recommended Posts

QUOTE(NormKirchner @ Sep 26 2007, 04:02 PM)

If the data type of a class (alpha) is another class(beta), how would one set the default value of beta to one of it's children class?

That sounds a little bit like, "how much wood would a woodchuck chuck if a woodchuck could chuck wood? :laugh:

Your question is not very clear to me and I don't understand the context. What are you trying to accomplish?

Link to comment

QUOTE(NormKirchner @ Sep 26 2007, 06:02 PM)

If the data type of a class (alpha) is another class(beta), how would one set the default value of beta to one of it's children class?

Translation: An element of class Alpha is a control of class Beta. You want to set the default value of this control to be Gamma, which is a child class of Beta.

To do this, you must have LV8.5. It won't work in LV8.2.

Open a blank VI. Drop a control of type Gamma. Popup on the control and choose "Copy Data". Then go to the private data control of Alpha and popup on the Beta control and select Paste Data. Then popup again and choose "Make Current Value Default." Save Alpha.

Viola!

Link to comment

QUOTE(Jim Kring @ Sep 26 2007, 07:43 PM)

That sounds a little bit like, "how much wood would a woodchuck chuck if a woodchuck could chuck wood? :laugh:

Your question is not very clear to me and I don't understand the context. What are you trying to accomplish?

It's part of what AQ does in his map structure. The structure of the map class is simply a container of a parent class, but the default value of the map class is not a container of that parent class but rather a container of the parent class who's default value is of a child class.

So I think there may be some clever way of exploiting this so that we can make a parent class aware of it's children somehow.... hmmm...

I don't like to work outside of the box... I like to take the box and fashion it into a trebuchet and use it to smash down the walls of everyone elses box.

~,~ in full effect

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.