From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

G#

cancel
Showing results for 
Search instead for 
Did you mean: 

Need easy Tutorials to Understand G#

Hi,

I am sorry to ask more questions but have you implemented the hierarical type of inheritance how many sub classes can inherit from one base class ???? or should I implement implement interfacing like in java and like  how can we use xcontrols with G# plz help plz reply. waiting for reply

Thanks

Bharath

Thanks & Regards,
Bharath Kumar
GCentral
0 Kudos
Message 11 of 16
(1,760 Views)

1. inheritance: G# classes inheritance uses LabVIEWs inheritance. There is no difference there and no limitations I know of.

2. Interface: In G# it is possible to use interfaces. A feature I use in the current project and it works well.

3. Xcontrols: I use xcontrols in the current project and have not seen any issue. However, I advise you read all documentation and caveats for xcontrols.

Certified LabVIEW Architect
0 Kudos
Message 12 of 16
(1,760 Views)

How to use the class attributes in the protected. I try to access the attributes in create method but can only use the Objectattributes Am i worng?. I think the class attributes if defined it will be constant throughout the class. I try to put a refnum as constant for the class .Is it right ?

Bharath

Thanks & Regards,
Bharath Kumar
GCentral
0 Kudos
Message 13 of 16
(1,760 Views)

I have to say I don't really understand what you are asking. Perhaps you can share a code example in order to make it easier to help. But I can say from my own experience that I never use class attributes. Class attributes tend to hide implementation and there is always a design pattern that will solve the problem better.

If you need to learn more about design patterns, I suggest you start with Gang of Four: http://books.google.se/books/about/Design_Patterns.html?id=IvujngEACAAJ&redir_esc=y

//Thomas

Certified LabVIEW Architect
0 Kudos
Message 14 of 16
(1,760 Views)

Hi Mattias,

To inherit a base class should i select the base class instead of G# object when creating a class?

Thanks & Regards,
Bharath Kumar
GCentral
0 Kudos
Message 15 of 16
(1,760 Views)

Yes.

Mattias

0 Kudos
Message 16 of 16
(1,760 Views)