01-22-2010 04:45 AM
OK - it worked except for data access.
I created a new Public function in the RootClass: "get Node ref.vi" which has NodeName as input and returns the DataNode*. Code is as you described above.
Now how do I change the data of that object when I receive new data in the main.vi (assuming it happend at a time when the node UI is not runnning)?
In the examples it seems that data is only accesible during execution of the UI in the subpanel.
01-22-2010 06:30 AM
Brian - again
Forget about my last post!
The data are encapsulated by the object (and should be) so I figured out how to update these during run of the UI.
02-16-2010 08:13 AM
Figured it out:
On the main.vi -> Initialize there is a call to Initialize root. The InitRoot input should ALSO bundle the glyphs folder. F.eks. C:\Program Files\National Instruments\LabVIEW 2009\examples\general\controls\treecontrol\max_sym
For the lvclass override the GetGlyphFile.vi and return only the name of the file in the glyph folder. For example: max_mysystem_max_remotesystems.png.
It works :-)
02-16-2010 09:31 AM
01-26-2011 08:41 AM
I'm really interested in this subject. Because I believe that since labview allows us to do things in a quick way we fall in a stupid situation where we are always doing the same code. And the configuration system it's a good example.
OOP it's a new thing for me but I already read some tutorials.
But a very nice way to understand, would be by modifying the the example posted here. I was pretending to add a new class. But I can't understand the procedure for that... The Object init should be something that all got to have. And there must be a way to do a "copy-paste". Can someone illuminate me?
Thanks to all!
01-26-2011 09:49 AM
LVOOP can take a little while to understand. To create a new class I would follow this
If you need to see examples on how the xCE works I would look at the LCE:
01-27-2011 03:47 AM
Hello again and thanks for the reply...
In the first link that Brian sent ("To create a new class") I can see the generic procedure to create class.
Probably I expressed myself in a bad way. I was trying to know a way of creating a new in the posted example. So, I would want to know the procedure to create a new class using the "channel" class.
I created a new class named "TCPDevices" where the object will be the IP string. The next step that i tried was the "Initialize.vi". That I supposed that should be a good way for copy that. Making this example more easy to grow. And that was my first problem. But it's not possible to copy-paste that vi.
A solution for my problem was by using "Clone Class" option. But is this the correct way?
Another strange thing that i saw was the following.... I made the next steps:
1. Create TCP class
2. create "new... vi from static dispatch template"
3. Named "Initialize.vi" (because I wanna something similar to Initialize.vi of the ChannelClass)
4. Placed the "Set UiViName.vi" on this
5. Tried to connect my object to the input... But it returns an error. And I can see that the width of my object wire it's larger than the one in the Channel example.
So... What's the basic error that I'm making here??
I'm really trying to jump to OOP but it's not very easy.
01-27-2011 08:03 AM
01-27-2011 08:38 AM
yes you are.
I will take your suggestion and think a little on that.
Thanks for the help