[Web dialog] switch snippet for pc / mac
-
I understand from driven that macs use show_modal rather than show. Assuming everything else is OK can anyone give me a snippet to detect the OS or whatever and direct to the correct command.
Thanks
Chris
-
Yes - webdialogs on OSX isn't parent to the SU window unless you use
.show_modal- and.show_modalisn't modal on OSX.
def self.is_mac? return (Object;;RUBY_PLATFORM =~ /darwin/i) ? true ; false end -
@thomthom said:
Yes - webdialogs on OSX isn't parent to the SU window unless you use
.show_modal- and.show_modalisn't modal on OSX.
> def self.is_mac? > return (Object;;RUBY_PLATFORM =~ /darwin/i) ? true ; false > end >and then how to do the
if bit?Sorry to be a pain.
Thanks
-
if is_mac? webdialog.show_modal else webdialog.show end -
Thanks. I'm a bit weary of Ruby + Mac when I cannot test it!
-
Did you mean weary of Ruby + wary of Macs?

-
To make or to become weary; A feeling of being mentally fatigued; Expressive of fatigue
Wary: marked by keen caution and watchful prudence;
Either I think is appropriate.
But more important cgScenes might well become compatible - some kind of milestone in PC/Mac WD compatibility perhaps.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better π
Register LoginAdvertisement