sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    UI::WebDialog => set_html => large HTML pages

    Scheduled Pinned Locked Moved Developers' Forum
    12 Posts 3 Posters 1.6k Views 3 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.
    • N Offline
      niccah
      last edited by

      @thomthom said:

      It's not really clear to me what the "problem" is. Can you specify?

      Oh sorry... okay, let me explain the "problem" a little bit more in detail...

      I have a plugin for Sketchup and I need a formular, where I can set a lot of options. So, I'm using a WebDialog and the content is written in a string.

      • advantage: I can insert some ruby variables (for example: "<input type="text" value="" + rubyVariable + """
      • disadvantage: The Webdialog gets larger and larger, so the string gets larger and larger => the code gets unclear.

      Now, my question is: can I write all the html code in an external file? So, normal text file, I can import with "File.open...". But then, I can't use some ruby variables in the html code.

      So, for me (a more or less Ruby newby), it is not clear what's the best way to handle large WebDialogs.

      @thomthom said:

      By the way: set_html doesn't work under OSX after an Safari update.

      Oh, that's an important hint... how I can handle this problem? Thanks a lot, ThomThom for your help!

      1 Reply Last reply Reply Quote 0
      • thomthomT Offline
        thomthom
        last edited by

        @niccah said:

        Now, my question is: can I write all the html code in an external file? So, normal text file, I can import with "File.open...". But then, I can't use some ruby variables in the html code.

        Don't understand what you mean by not being able to use ruby variables...
        If you compile a string with HTML and injected ruby variables, and use #set_html it's the same as if you wrote the same HTML to a file and used #set_file. I'm still not quite "getting it". πŸ˜•

        @niccah said:

        Oh, that's an important hint... how I can handle this problem? Thanks a lot, ThomThom for your help!

        Write out a temp file with the compiled HTML, then use #set_file.

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

        1 Reply Last reply Reply Quote 0
        • thomthomT Offline
          thomthom
          last edited by

          If you're new to WebDialogs in SketchUp you want to have a look at this thread: http://sketchucation.com/forums/viewtopic.php?f=180&t=23445#p198883

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

          1 Reply Last reply Reply Quote 0
          • N Offline
            niccah
            last edited by

            @thomthom said:

            If you're new to WebDialogs in SketchUp you want to have a look at this thread: http://sketchucation.com/forums/viewtopic.php?f=180&t=23445#p198883

            Oh, that was the perfect hint. You are right, I'm realy new to WebDialogs. So I read a lot the last few days and now, I know, my question was stupid πŸ˜„

            However, thanks for your endurance!

            1 Reply Last reply Reply Quote 0
            • thomthomT Offline
              thomthom
              last edited by

              No worries. Just keep asking.

              Btw, what are you creating?

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

              1 Reply Last reply Reply Quote 0
              • N Offline
                niccah
                last edited by

                @thomthom said:

                Btw, what are you creating?

                Oh, I started a big big project...

                On the one hand I love to play with my milling machine, on the other hand, I'm very interested to learn to write some Sketchup plugins.

                So my project:

                You can select some faces of your model, enter some dimensions of your milling tool and you get the right GCode. Now, I'm coding the userinterface of this plugin.

                I hope, I can publish first beta versions in the next fex month...

                1 Reply Last reply Reply Quote 0
                • thomthomT Offline
                  thomthom
                  last edited by

                  hm... I wonder is there was someone else also working on generating GCodes....

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

                  1 Reply Last reply Reply Quote 0
                  • Chris FullmerC Offline
                    Chris Fullmer
                    last edited by

                    gcode site:sketchucation.com/forums/

                    There have been people talking about it in the past. I did not read any of those threads to see if anyone has some good code or a plugin for it. But there might be something there.

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

                    1 Reply Last reply Reply Quote 0
                    • thomthomT Offline
                      thomthom
                      last edited by

                      I think Noel was doing something. I've given him a nudge.

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

                      1 Reply Last reply Reply Quote 0
                      • N Offline
                        niccah
                        last edited by

                        Thanks guys for the hints! I got a message from Noel!

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

                        Advertisement