Mac Webdialog opens in background
-
Is this a common issue on Mac's with Webdialogs? Do you need to explicity call 'bring_to_front' for the dialog to open in front of the SketchUp window? I don't have a Mac so I can't test this but would the following code work to ensure that the dialog opens in front of the SketchUp window?
@dlg.show{@dlg.bring_to_front}
I doubt that the following would work:
@dlg.show{} @dlg.bring_to_front
OR
@dlg.bring_to_front @dlg.show{}
Thanks.
-
...still having no success with getting Mac Webdialogs to open 'on top'. Doesn't anyone know the solution?
-
edited...does not work.
-
Here's another idea. Does anyone know of any Ruby script that has a working Webdialog for Mac's (i.e. dialog does not open in background).
-
I tried several with no luck. That was my idea as well.
The only one I know are from Google ( If the instructor/ mentor is one of them )
-
Here's what I do: I detect if the user is on a mac, and if so I open the dialogs with "show_modal". Modal dialogs on the PC are truly modal, meaning when they're visible you can't click on anything else in SketchUp, but on the mac they aren't truly modal... they just float on top of everything.
if is_mac == true dialog.show_modal else dialog.show end
It's a bit hacky, but it works.
-
-
Not-Really-Modal modal window... would never have though of trying that.
I feel there should be a list of SU Ruby tricks. And this should be on the list.
btw,how do you find out if SU is running on a mac?
-
PLATFORM = (Object;;RUBY_PLATFORM =~ /mswin/i) ? ;windows ; ((Object;;RUBY_PLATFORM =~ /darwin/i) ? ;mac ; ;other)
edit: It's a one-liner.
azuby
-
Just had another though, if you really want a modal window on mac? Not possible?
-
@thomthom said:
Just had another though, if you really want a modal window on mac? Not possible?
Not currently possible, unfortunately.
Advertisement