Vanishing Dock

I have a window that is instantiated in code

Function  GetLongText(byref s as string)
  Dim d As New TextWindow
  Me.Enabled=False
  s=d.gettext(s)
  Me.Enabled=True
End Function

in the TextWindow there is one Method

Function GetText(s as string) as string
  oldvalue=s
  Me.TextArea1.text=s
  Self.ShowModal
  Return result

When I call GetLongText… the OSX Dock vanishes… and re-appears when the TextWindow closes…
otherwise everything works fine…

OSX 10.93/Xojo 2014R1/Cocoa

The only way I can reproduce that is when I set MenuBarVisible to False. That hides the Dock too.

Sounds like the Dock thinks you’re going fullscreen for some reason.

I saw reference to this in the old RealStudio forum (I was doing my homework :slight_smile: )
But I see no such option available anywhere

I did it in code. self.MenuBarVisible = False in the Open event. I don’t see it in the Inspector.

Yup… just figured that out myself…
Putting in the OPEN event of the window works like I want it too… Thanks!

It works elsewhere as well and hides both menu and dock. Interesting :slight_smile:

FYI… It needs to be set to TRUE , not to FALSE

Well yeah, I’d expect it to work anywhere. That’s just how I did my test project.

Dave, just for fun, put self.MenuBarVisible = not self.MenuBarVisible into a Timer. :slight_smile:

False is how you make it vanish, and that’s what I was trying to recreate. Otherwise, it all stayed visible for me.

I like this AppleScript to hide only the dock :

tell application "System Events" tell process "finder" keystroke "d" using {command down, option down} end tell end tell

Nice. You don’t need tell process "finder" though, and safer without it in case the Finder isn’t running.

menubarVisible=false is dangerous - if the app crashes with the dock hidden, it won’t come back (a user will have to do some Win32 secret magic to get it back).

Remember… my problem was the DOCK HAD vanished… and I wanted it back…

Setting this to TRUE did the trick.

And you don’t have that code anywhere else in your project? I wonder what the heck is making it vanish in the first place.

No, and yeah so do I :slight_smile:

You are right. I removed the tell process “finder”. Thanks.