[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.
Advertisement