• Login
sketchucation logo sketchucation
  • Login
🤑 SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

Script Problem - HTML

Scheduled Pinned Locked Moved Developers' Forum
12 Posts 5 Posters 412 Views 5 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    Physicsguy1
    last edited by 17 Jul 2009, 07:33

    Other things don't work either 😞. I can't figure out what my error is...

    1 Reply Last reply Reply Quote 0
    • C Offline
      chrisglasier
      last edited by 17 Jul 2009, 07:47

      I don't think anyone can help unless you are specific.

      But as general advice, what is ruby do with ruby, what is html do with html. For example try to avoid writing html with ruby. Then all you have to worry about is making the link - and generally that is pretty straightforward.

      With TBA interfaces we can analyse what is to be achieved so that IT can help with automation to achieve it.

      1 Reply Last reply Reply Quote 0
      • T Offline
        thomthom
        last edited by 17 Jul 2009, 09:41

        I second the previous replies.

        An HTML file needs a header and footer. It could work without it, but the results are unpredictable. To get reliable result, you must make a properly formatted result - especially if you try to make it work cross platform. As the Internet engine will not recover from malformed markup as the Safari engine does.

        Thomas Thomassen — SketchUp Monkey & Coding addict
        List of my plugins and link to the CookieWare fund

        1 Reply Last reply Reply Quote 0
        • F Offline
          fredo6
          last edited by 17 Jul 2009, 16:43

          @unknownuser said:

          dlg = UI;;WebDialog.new("Unit Inspector", true,
          > "ShowUI", 739, 641, 150, 150, true)
          > dlg.set_html ('<b>What?</b>')
          > dlg.show
          

          I can't get the HTML to work correctly. Ive tried it without the quotations, but I get this error: 'Unterminated strings meets end of file'
          i'm not sure what I'm doing wrong.

          The minimum is to put a HTML tag. Keep in mind that it is the browser interpreting the code, not Ruby.
          So try instead:

          dlg.set_html "<HTML><b>What?</b></HTML>"

          1 Reply Last reply Reply Quote 0
          • P Offline
            Physicsguy1
            last edited by 17 Jul 2009, 20:30

            Thank you. Now here we go again...

            I've noticed some HTML-based input boxes. I know how to create them, but I don't know how to associate the text in the box with a ruby variable. How would I do this?

            1 Reply Last reply Reply Quote 0
            • T Offline
              thomthom
              last edited by 17 Jul 2009, 20:43

              http://code.google.com/apis/sketchup/docs/ourdoc/webdialog.html#add_action_callback

              Use the add_action_callback method and call a function that sets the arguments to the variables.

              Thomas Thomassen — SketchUp Monkey & Coding addict
              List of my plugins and link to the CookieWare fund

              1 Reply Last reply Reply Quote 0
              • C Offline
                chrisglasier
                last edited by 17 Jul 2009, 23:32

                I was pointed to a very good article in sketchupapi.blogspot when I first started to look at web dialogs. It is called "Passing variables .... " or something like that. Try to find it otherwise I'm afraid you will go from pillar to post and end up (wrongly) decrying web dialogs.

                With TBA interfaces we can analyse what is to be achieved so that IT can help with automation to achieve it.

                1 Reply Last reply Reply Quote 0
                • C Offline
                  Chris Fullmer
                  last edited by 18 Jul 2009, 01:08

                  I'm not sure what one you are thinking of Chris, but this article talks about web dialogs:

                  Link Preview Image
                  Sharing data between SketchUp Ruby and Javascript

                  Posted by Scott Lininger, SketchUp Software Engineer If you are building rich WebDialogs in your SketchUp Plugin, then you are probably usin...

                  favicon

                  (sketchupapi.blogspot.com)

                  I have read it many times, and I still don't quite get some of it. I am discovering I need to rad up on HTML. Its more involved than I ever realized 😄

                  Chris

                  Lately you've been tan, suspicious for the winter.
                  All my Plugins I've written

                  1 Reply Last reply Reply Quote 0
                  • C Offline
                    Chris Fullmer
                    last edited by 18 Jul 2009, 01:26

                    Oh, and also this little post here, which was the one right before the one I linked to above. I guess Scott had web dialogs on his mind back then.

                    Link Preview Image
                    WebDialog

                    Posted by Sang Ahn, SketchUp Software Engineer One of the interesting features of SketchUp's Ruby API is the UI::WebDialog class. Since ...

                    favicon

                    (sketchupapi.blogspot.com)

                    Chris

                    Lately you've been tan, suspicious for the winter.
                    All my Plugins I've written

                    1 Reply Last reply Reply Quote 0
                    • C Offline
                      chrisglasier
                      last edited by 18 Jul 2009, 01:37

                      @chris fullmer said:

                      I'm not sure what one you are thinking of Chris, but this article talks about web dialogs:

                      The trouble you see is that I cannot open anything with blog in it (nor you or tube) but the date seems right. Perhaps the other other Chris will let us know if it is useful. As you know I am very keen to interest more people in web dialogs, because, for example, I agree with this chap.

                      @unknownuser said:

                      Vic Gundotra, Google Engineering vice president and developer evangelist, told the Mobilebeat conference in San Francisco on Thursday that the web had won and users of mobile phones would get their information and entertainment from browsers in future.

                      ...

                      “What we clearly see happening is a move to incredibly powerful browsers,” he said.

                      “Many, many applications can be delivered through the browser and what that does for our costs is stunning.

                      “We believe the web has won and over the next several years, the browser, for economic reasons almost, will become the platform that matters and certainly that’s where Google is investing.”

                      With TBA interfaces we can analyse what is to be achieved so that IT can help with automation to achieve it.

                      1 Reply Last reply Reply Quote 0
                      • 1 / 1
                      1 / 1
                      • First post
                        12/12
                        Last post
                      Buy SketchPlus
                      Buy SUbD
                      Buy WrapR
                      Buy eBook
                      Buy Modelur
                      Buy Vertex Tools
                      Buy SketchCuisine
                      Buy FormFonts

                      Advertisement