G#

cancel
Showing results for 
Search instead for 
Did you mean: 

Bug??

Solved!
Go to solution

Hi,

 

Are you changing the inheritance using the G# IDE or are you changing it using the LabVIEW tools?

 

You should be doing everything through the IDE (right click > g# IDE) this includes making you classes.

 

 

Depending on what you want to do, you may also need to define your class as 'abstract' when creating it.

0 Kudos
Message 11 of 18
(4,272 Views)

All my operation Using G#IDE

0 Kudos
Message 12 of 18
(4,267 Views)

This is the change-inheritance bug in LV2020 I explained in https://forums.ni.com/t5/G/Inheritance-Error/td-p/4086662

 

The solution is in that thread.

Certified LabVIEW Architect
Message 13 of 18
(4,259 Views)

it seems that not this bug。

0 Kudos
Message 14 of 18
(4,254 Views)

"

1. create queue_class Inherit  from G#

2.create UI_class Inherit  from G#

3. change UI_class  Inherit  to queue_class 

4.create a test vi, this vi content is create a UI_class  ,then call dequeue method  it occur errors ."

 

I did exactly that and the inheritance error is the only error I get. Please post code that can produce the error you are seeing. The code you posted throws an error but for a completely different reason than what you are explaining, and the reason for that error is already explained and has nothing to do with G#. Is that the error you are referring to? Are you getting a dialog from the LabVIEW IDE or an error code on the error wire? What error code is it?

Certified LabVIEW Architect
Message 15 of 18
(4,244 Views)

8D_NAE3E%]BT{66Z_OK`5I0.png

1. create queue_class Inherit  from G#

2.create UI_class Inherit  from G#

3. change UI_class  Inherit  to queue_class 

  Until the third step, Does UI_create VI include Queue_Create Vi?

0 Kudos
Message 16 of 18
(4,213 Views)
Solution
Accepted by topic author yanzhanglin

@yanzhanglin wrote:

8D_NAE3E%]BT{66Z_OK`5I0.png

1. create queue_class Inherit  from G#

2.create UI_class Inherit  from G#

3. change UI_class  Inherit  to queue_class 

  Until the third step, Does UI_create VI include Queue_Create Vi?


Ah, I see what you mean now. When changing inheritance from G#Object, the Create-method of the base-class is not inserted. It has likely been like this since forever and no-one was bothered enough by it to report it.

 

The workaround is to insert it yourself, as you have found out.

 

I have added this issue to the issue-list for G# and have talked to the main developer about it and hopefully it will be implemented in the next version of G#.

Certified LabVIEW Architect
Message 17 of 18
(4,211 Views)

I think deep clone method 

yanzhanglin_0-1620286964809.png

and when we create property,we can create all property at one time,

yanzhanglin_1-1620287051132.png

 

and if we change objectAttribute members,we can just update property,it will change all create property VI。

 

 

0 Kudos
Message 18 of 18
(4,208 Views)