Yet Another WebDialog Gotcha
-
Ruby handles text files correctly on both Windows and Mac. The line separator is the newline character (10, '\n'), regardless of platform.
This does not extend to text retrieved from a WebDialog textarea widget, which will be delimited with newlines on a Mac, with return/newline pairs on a PC. This little bit of extra code is needed:
text = web_dialog.get_element_value( 'textarea_id' ) text.gsub!( /\r\n/, "\n" ) # needed extra!Thank Todd Burch for his Mac support.
-
@martinrinehart said:
Yet Another WebDialog Gotcha
Seems to be annogolous with...
@unknownuser said:
Yet another Microsoft Windows Bug
...yes web dialogs are quite the cruel irony of SketchUp i would say. We sure could use a good ol built-in GUI about now.
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