[quote=134172:@Peter Fargo]Thanks Michel but I have stepped through the code and the window is being set to visible and the debugger shows its visible property as true.
I can work around it but I am trying to understand why it works in Windows and not OSX. Also why the debugger does not agree with reality :)[/quote]
I don’t have your db, so I have slightly modified the code to :
[code] Dim nw As New MainWin
nw.Visible = false
'nw.QueryControl.db = ConnectionWin.Connect
if “nw.QueryControl.db” <> “” then
nw.Title = “Visual Data Drill (”
'nw.QueryControl.LoadTableSchema
nw.Visible = true
'else
'nw.Close
end if[/code]
Essentially, I simply test for a condition that will always be true. The window does become visible.
I rather trust my own eyes than the debugger.
What about nw.Title ? Is it properly set as well ? I suspect the condition in the if is not met.
Check in the debugger to see if your window object does indeed exist. If so, check the width and height of the window you created.
It’s entirely possible you are creating a window with zero width and zero height. Yes, it’s possible. I had it happen in my app that the window sized got stored in the settings file as 0 width and 0 height. I kept running the app and getting no window. Drove me nuts until I figured it out.
end if[/code][/quote]
What if instead of setting the database stuff in the code above, you add it to the MainWin Constructor? That way, you don’t need to worry about visibility.
@Jon Ogden Done all that @Jeff Tullin No change @Michel Bujardet I agree that something is happening due to the modal dialog (connection window). But it is odd it only happens on OS X. @Tim Jones and @Sam Rowlands I can make it work various ways I just find it odd that it works on Windows and not OS X.
Thanks everyone for the help. I’ll try to isolate it for a bug report or find my issue. Workaround is not hard. Sam’s is simplest so he gets the green check