Button.viible not working on Windows from app compiled on Mac

Is there a known bug with this? I have a simple app I’m testing and I set the button.visible property to false at design time. When I build on the Mac and run it’s fine. When I remote debug to Windows 10, the but still shows on the screen before I set it to visible in code.

Well, you haven’t mentioned a version, so no one would have any idea even if there were. But no, it’s definitely your code – I’ve just tested a sample in 2022r2.

I’m using the that version. I have no doubt it’s something that could be in my code. I’ll do a very basic test app to see if I can repo it.

Well I found the issue. It does work fine on a test app. I was tinkering with having a small app that plays a video and a quit button was supposed to appear when he video stopped. It seems for some reason it was getting activated by the movie player, but not sure why. I was able to fix it be setting the button visible property to false in the movie player started event and it stayed hidden until I change to visible when the movie has stopped.

This reminds me of another thread, created by you:

MoviePlayer is a finnickey control. Some of the events aren’t the same cross platform and it’s just been a known limitation for years. Check to see if the Stopped event is being raised because loading a movie has finished (ie, mp.Load may be causing the stopped event). There isn’t much you can do about it, but you can implement workarounds.

1 Like

Not quite the same, the issue in this case wasn’t the movieplayer but a button.

Thanks Tim. Great response and suggestion as usual! :slight_smile:

MoviePlayer does seem quite finicky. As I deal with it’s quirks and find solutions, I’ve been using “If TargetWindows then…”, etc. to deal with it per the OS it’s running on. I’m glad Xojo has that feature, would be nice if it wasn’t necessary for things like this. But at least there’s usually a work around.

Yes, but the movie player was in both issues.