Jump to content

XControl & inheritance


Recommended Posts

There should be a way to inherit properties and methods of build-in LabVIEW control to the properties and methods of an XControl. If XControl front panel consists of more than one control, developer should be able to choose one control to inherit from. This is a must for XControls to really be usable. Very common use case for XControls is to extend the functionality of built-in control in a much a same fashion as one can extend functionality of an OOP class.

In pseudo language a user defined XControl should be able to look something like the following

Class MyTreeXControl extends TreeControl implements XControl

{

...

}

Link to comment
There should be a way to inherit properties and methods of build-in LabVIEW control to the properties and methods of an XControl.

I agree,

do you think it is a lot of work to read all the properties/methods of a normal control and process this into properties and methods of an XControl? with scripting off course

Then if you have a XControl consisting of several controls, should you build all the controls, or just some?

Ton

Link to comment
do you think it is a lot of work to read all the properties/methods of a normal control and process this into properties and methods of an XControl? with scripting off course

Then if you have a XControl consisting of several controls, should you build all the controls, or just some?

This should be possible. I'm looking into it at the moment, so lets see what comes out. :rolleyes:

Link to comment
This should be possible. I'm looking into it at the moment, so lets see what comes out. :rolleyes:

Good,

a question for all:

I have a framework where the developer can choose for which facade VI controls the inheritance should take place.

Now in the XControl a folder %control1%.properties and %control1%.methods will be placed with the properties and methods.

But several issues arise:

  • How to get the facade VI control reference inside the property VI. A reference to the XControl is available but that is not easily parsable into the facade VI
    Should we pass the controls around via the display state?
  • What about the inherited properties like 'Scales', 'Text' and 'Numeric'? I think we need them

What do you think about these Items, esp. nr 1!!!!

Basically I am looking for VI's that allow automatic property and method generation

Ton

Link to comment
  • What about the inherited properties like 'Scales', 'Text' and 'Numeric'? I think we need them

Does anyone know how to detect the type of the inherited item?

If I use a propertyitem label on a string control I get a label-reference, I haven't succeeded in determing the type using OpenG-toolkits. PJM private class generator doesn't know the classes as well. I have found out that the classID is 5 one of the low ones PJM hasn't identified.

Does anyone have a clue?

Ton

Link to comment
Does anyone know how to detect the type of the inherited item?

If I use a propertyitem label on a string control I get a label-reference, I haven't succeeded in determing the type using OpenG-toolkits. PJM private class generator doesn't know the classes as well. I have found out that the classID is 5 one of the low ones PJM hasn't identified.

Does anyone have a clue?

I'm not exactly sure what you're asking, but ClassID 5 is the Text class (GObject->Decoration->Text).

Do you need the private parts of this class?

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
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.