Results 1 to 2 of 2

Thread: Public Variables 'Not Found'

  1. #1
    Member
    Join Date
    Oct 2012
    Posts
    32

    Public Variables 'Not Found'

    I have the following page init and load procs.

    proc page1_init()
    public proc_date, chose_deal, display_chosen
    //use deallist597 alias deals597
    proc_date = date()
    chose_deal = "F "
    display_chosen = .t.
    endproc

    proc page1_load()
    messagebox("Made it 1")
    // select chosen,long_name,filename,settle_dt from deallist597 into cursor deals597 readwrite
    m_deals = lianja.getelementbyID("gDealList")
    //m_deals.addItems("select * from deals597")
    m_deals.addItems("select chosen,long_name,filename,settle_dt from deallist597")
    endproc


    Even though the 3 public variables listed in the init() proc actually are showing up correctly in the displayed Page1 (attached), the Debug window is producing 'not found' messages:

    Thu May 9 15:51:24 2013
    **** Lianja error ****
    proc_date
    ^
    Variable/field 'PROC_DATE' not found

    Thu May 9 15:51:24 2013
    **** Lianja error ****
    proc_date
    ^
    Variable/field 'PROC_DATE' not found

    Thu May 9 15:51:24 2013
    **** Lianja error ****
    display_chosen
    ^
    Variable/field 'DISPLAY_CHOSEN' not found

    Thu May 9 15:51:24 2013
    **** Lianja error ****
    display_chosen
    ^
    Variable/field 'DISPLAY_CHOSEN' not found

    Thu May 9 15:51:24 2013
    **** Lianja error ****
    chose_deal
    ^
    Variable/field 'CHOSE_DEAL' not found

    Thu May 9 15:51:24 2013
    **** Lianja error ****
    chose_deal
    ^
    Variable/field 'CHOSE_DEAL' not found


    Not sure what I'm doing incorrectly and would appreciate feedback. tia Jeff
    Name:  Test_Screen.jpg
Views: 87
Size:  63.2 KB

  2. #2
    Lianja Team yvonne.milne's Avatar
    Join Date
    Feb 2012
    Location
    Berkshire, UK
    Posts
    1,379
    The init() events fire as follows:

    App Init
    Section Init
    Field Init (memvar will be checked here)
    Other Section Init
    Page Init

    If you declare the memvars in the App init() (Settings button in the ModeBar) or in the Section init() (or relevant Field), the 'not found' error will not occur.

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Journey into the Cloud
Join us