LAVA: Why Child class cannot read its own values? - LAVA

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Why Child class cannot read its own values? Rate Topic: -----

#1 User is offline   Vidula S 

  • 1 more post to go.
  • Group: Members
  • Posts: 9
  • Joined: 24-October 07
  • Version:LabVIEW 2009
  • Since:2007

Posted 28 July 2010 - 08:44 PM

Class A ->
Private Data: Q Ref and Cluster-A
Protected Member function: “Initialize” which is a dynamic dispatch, Creates a Queue and assign user defined values to Cluster-A
Private Member function: “Start Write” which calls “Write Information” every xx interval of times
Public Member function: “Write Information” which is a dynamic dispatch



Class B -> Inherits from Class A
Private Data: Cluster-B
Protected Member function: “Initialize” which is a dynamic dispatch, first calls the Parent Initialize and then assigns the User define value to Cluster-B
Public Member function: “Write Information” which is a dynamic dispatch

Class C -> Inherits from Class B

Private Data: A Numeric Control (default = -1) and a Boolean Control (default = False)
Protected Member function: “Initialize” which is a dynamic dispatch, pass the user defined values of Cluster-A and Cluster-B to Parent Class
Public Member function:
1. Write Information – Write the information from Queue to the file depending on the Numeric control, Boolean Control and Cluster-B data of Class B
2. Create - creates an object of class C + Calls Initialize to pass data to respective class
3. Set # – Assign the user defined value to Numeric Control
4. Read # – Read the value of Numeric Control
5. Set Bool – Assign the user define value to Boolean Control
6. Read Bool – Return the value of Boolean Control

Class D -> Inherits from Class B

Private Data: Empty
Protected Member function: “Initialize” which is a dynamic dispatch, pass the user defined values of Cluster-A and Cluster-B to Parent Class
Public Member function:
1. Write Information – Write the information from Queue to the file depending on the Cluster-B data of Class B
2. Create - creates an object of class D + Calls Initialize to pass data to respective class

My application,
Create Object C + Set # (to say 10) and
Create Object D

Object D - Write Information works fine
Object C - Write Information has Read # and Read Bool which always returns the default value.

Not able to understand why?
Any help is appreciated.
Thanks.

This post has been edited by Vidula S: 28 July 2010 - 08:54 PM

0

#2 User is offline   Yair 

  • Extwemely Active
  • Group: Moderators
  • Posts: 2,211
  • Joined: 23-January 05
  • Version:LabVIEW 2009
  • Since:2003

Posted 29 July 2010 - 04:13 PM

Post the code. It's a lot easier than following all that text.
0

#3 User is offline   Aristos Queue 

  • LV R&D: I write C++ so you don't have to.
  • Group: NI
  • Posts: 1,871
  • Joined: 15-August 06
  • Location:Austin, TX
  • Version:LabVIEW 8.6
  • Since:2000

Posted 02 August 2010 - 09:35 PM

I tried to puzzle it out from your text description, but I couldn't get a good grasp on the situation. If you can post VIs, that would help a lot.
0

#4 User is offline   Vidula S 

  • 1 more post to go.
  • Group: Members
  • Posts: 9
  • Joined: 24-October 07
  • Version:LabVIEW 2009
  • Since:2007

Posted 04 August 2010 - 07:52 PM

View PostAristos Queue, on 02 August 2010 - 09:35 PM, said:

I tried to puzzle it out from your text description, but I couldn't get a good grasp on the situation. If you can post VIs, that would help a lot.


All I needed was reference class. I found the solution in examples.

Thanks!
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic