Control.Visible problem in optimise compile

Discussion in 'Bug Reports' started by agraham, Jan 14, 2008.

  1. agraham

    agraham Expert Licensed User

    If TextBox1 and Table1 are added at design time then this code leaves the controls visible when run from the optimising compiler. The IDE and legacy compile leaves them invisible as expected.
    Code:
    Sub App_Start
       Form1.Show
       
    Msgbox("1")
       Table1.dispose
       TextBox1.Dispose
       AddTable(
    "Form1","Table1",20,20,100,100)
       AddTextBox(
    "Form1","TextBox1",20,150,100,22,"")
       Table1.Visible=
    false   
       TextBox1.Visible=
    false   
    End Sub
    This code, adding the initial controls at runtime works fine in the optimising compiler.
    Code:
    Sub App_Start
       Form1.Show
       AddTable(
    "Form1","Table1",0,0,100,100)
       AddTextBox(
    "Form1","TextBox1",0,150,100,22,"")
       
    Msgbox("1")
       Table1.dispose
       TextBox1.Dispose
       AddTable(
    "Form1","Table1",20,20,100,100)
       AddTextBox(
    "Form1","TextBox1",20,150,100,22,"")
       Table1.Visible=
    false   
       TextBox1.Visible=
    false   
    End Sub
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    Thanks agraham.
    This is the same bug that caused the problem in the original thread.
    It will be fixed in the next release (one week from now).
     
Loading...