09-01-2010 12:33 PM
Solved! Go to Solution.
09-01-2010 12:37 PM
Sub-panels?
Load the config of the child into a sub-panel of the parent...
Just thinking out loud and not sure if that will work.
Ben
09-01-2010 01:19 PM
09-01-2010 01:28 PM
THe dialogs of the children were always so different from the parent that I never had a need to show both rather one of the other.
I came close in another project where I had classes that agregated others and the agregates wheer shown in their own sub-panel inside the Agregating class screen... but the customer was not comfortable with LVOOP so that app was tossed...
LVOOP is still new to many of us so don't be suprised if you attempt to do something nobody else has attempted.
Maybe the LAVA-ites have ideas.
If you do come up with an idea, could you please post about your solution?
I would appreciate it greatly!
Ben
09-01-2010 01:41 PM
09-01-2010 01:52 PM
My idea for this (which I haven't finished implementing yet) is to have a single listbox with a line for each class which supports this. Selecting the line would show the VI from the relevant class in a single subpanel, similar to what the LV options dialog has. This would allow you to add N classes, although the framework code for this would be a bit complicated, since the listbox would have to be dynamically updated as you select classes.
So, if your inheritence is Device->exfabulator->xFabber2000->Serial, you would have four lines in the listbox.
09-01-2010 01:55 PM
Thank you advance!
Ben
PS: Your avatar has always caught my eye. I was born with a sub-mucus clef palette back in the late fifties (before they figured out to fix it) that destroyed my left ear and did a lot of damge to the right ear. Seems like I spent most of my childhood in waiting rooms with pic
09-01-2010 02:05 PM
Forgive me if I misunderstand or over simplify, but...
If it's just the data you need and no fancy front panel graphics, you can call the read methods on the parent, and make an indicator or control of it on the front panel. This is what I do, and consequently, a lot of my child classes have very similar code (which is obviously what I'm trying to avoid by using OOP in teh first place) I'm trying to figure this out as well, so if there are other more elegant solutions I'd love to hear them.
As an aside, is it possible to read parent data from within a child without calling a Get method? It seems to me it should be part of the cluster..
09-01-2010 02:10 PM
@elset191 wrote:
Forgive me if I misunderstand or over simplify, but...
If it's just the data you need and no fancy front panel graphics, you can call the read methods on the parent, and make an indicator or control of it on the front panel. This is what I do, and consequently, a lot of my child classes have very similar code (which is obviously what I'm trying to avoid by using OOP in teh first place) I'm trying to figure this out as well, so if there are other more elegant solutions I'd love to hear them.
As an aside, is it possible to read parent data from within a child without calling a Get method? It seems to me it should be part of the cluster..
Well maybe it was me that mis-read the question.
I was thinking about a GUI associated with the Class and a desire to use the Parents version but add the Child data to the parents version.
Ben
09-01-2010 02:26 PM
I use what I described for providing a GUI to the class...kinda.
On my front panel I have a button to press that opens up what I'm talking about, and the user can set values. Here is one example
These pop ups get the data from the object (parent and self), populate the controls for user interaction, and when the user presses close, writes the new values of the controls back to the object. So, it's not actually the object gui, it's just an interface to the objects data.
My end game is to not need popups and have this information right on the main vi, but I can't figure out a good way to do it. Subpanels crossed my mind, but I can't get (or don't' know how) to get the data out as the user changes it. I also considered having an XControl for the class that had the data in it...but got tripped up on the implementation. Perhaps this is closer to the OP's question, because then I would need to possibly merge two xcontrols for a child class...
</ramble>