cancel
Showing results for 
Search instead for 
Did you mean: 

How to get the value of instance variable

Former Member
0 Kudos

Hi,

I have  the following window , window1,window2,window3.

window2, window3 are  inherited from window1.  Window1 has an instance variable  with value  is_flag = 'First Counter"  which was set in window1. But when I am using that variable is_flag ,  in Window2 and Window3  it is getting as null. The value "First Counter" is not getting from window2 and window3.

How I can access  the value  in Windows2, Windows3 ,  from WIndow1.

Regards

Pol

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Polochan,

It works for me. Can you show your code?

ancestor window declaration

string is_flag = 'First Counter'

open event of decendant window

st_1.text = is_flag

hth,

Mark

Former Member
0 Kudos

Hi Polachan;

  Did you declare the variable as Protected?

ie: Instance Pool

Protected:

is_flag = 'First Counter"

PS: I am assuming that you meant PB Classic vs PB.Net which will not allow you to see this in its IDE (a major flaw IMHO) in Window 2/3.

Regards ... Chris

Former Member
0 Kudos

Chris,

What are you talking about? All this works fine in PB.Net AND I can have both objects open at the same time.

For the 100th time please stop bashing PB.Net. You're doing a disservice to the PB community as a whole.

Mark

Former Member
0 Kudos

Hi Mark;

  You misunderstood my post .. the Protected Instance variable does NOT display in the descendants property sheet in PB.Net like it does in PB Classic.

   I was not talking about displaying the ancestors instance pool in the descendant like you posted.

HTH

Regards .... Chris