Skip to Content
avatar image
Former Member

How to get the value of instance variable

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Dec 23, 2014 at 12:25 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      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

      pastedImage_0.png (16.3 kB)
  • avatar image
    Former Member
    Dec 23, 2014 at 01:20 PM

    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

    Add comment
    10|10000 characters needed characters exceeded