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

    Dialog - Simple WebDialog Communication Underware

    Scheduled Pinned Locked Moved Developers' Forum
    17 Posts 6 Posters 3.6k Views 6 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.
    • T Offline
      tomasz
      last edited by

      I would love to see some form of improvement to the Webdialogs. I have tried them with my SU2KT exporter, when I wanted to have a multiple selection from a list. It is hard for me to learn HTML and JS and CSS and ... I have given up for a while.

      'We' could crate a 'community' extension to the webdialogs, that would add: sliders, multiple selection, radio and check boxes. Even if there wouldn't be much control over a layout, we would have one solution tested on both platforms and 'community' driven.

      Thanks for your efforts Martin

      Tomasz

      Author of [Thea Render for SketchUp](http://www.thearender.com/sketchup)

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

        I would be forever indebted to whoever created such a project. I often feel like there are things I can not implement because I struggle so much with web dialogs....

        Chris

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

        1 Reply Last reply Reply Quote 0
        • M Offline
          MartinRinehart
          last edited by

          First, the bad news: simplifying the dialog part of WebDialog programming will not make the "I don't know JavaScript" blues go away. WebDialogs are programmed in two languages, and you have to speak both. The fact that there are two entirely different OO models doesn't help.

          Now, good news: you don't have to know much of a language to muddle through. I know almost no Ruby, for example. (I think, "there should be one, obvious way to do it.")

          Which leads to the proposal: I assume the lack of comment to the contrary implies some acceptance of my design. I'll do the JavaScript if someone will volunteer to do the Ruby.

          Author, Edges to Rubies - The Complete SketchUp Tutorial at http://www.MartinRinehart.com/models/tutorial.

          1 Reply Last reply Reply Quote 0
          • M Offline
            MartinRinehart
            last edited by

            @chris fullmer said:

            I often feel like there are things I can not implement because I struggle so much with web dialogs....

            An example or two would be very timely! What sort of dialogs are dancing at the edges of your imagination?

            Author, Edges to Rubies - The Complete SketchUp Tutorial at http://www.MartinRinehart.com/models/tutorial.

            1 Reply Last reply Reply Quote 0
            • chrisglasierC Offline
              chrisglasier
              last edited by

              @chris fullmer said:

              I would be forever indebted to whoever created such a project. I often feel like there are things I can not implement because I struggle so much with web dialogs....

              Chris

              Don't you think it is about time to consider setting up a separate forum for webdialogs to help consolidate all the efforts and queries that are clearly on the rise?

              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
              • thomthomT Offline
                thomthom
                last edited by

                Yea, the webdialog info is very scattered.

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

                1 Reply Last reply Reply Quote 0
                • chrisglasierC Offline
                  chrisglasier
                  last edited by

                  @thomthom said:

                  Yea, the webdialog info is very scattered.

                  I have always preferred support to underwear.

                  BTW Martin maybe you missed this "Jim'll fix it" post amid the scattering.

                  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
                  • thomthomT Offline
                    thomthom
                    last edited by

                    @dan rathbun said:

                    <!-- (also known as XP style themed controls.) .HTA files always NEED this. -->

                    That's very interesting!
                    Have you done much with with HTA apps?

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

                    1 Reply Last reply Reply Quote 0
                    • Dan RathbunD Offline
                      Dan Rathbun
                      last edited by

                      Some.. they are great. You have all the power of any application. Read and write direct to files (don't have to go thru SU.)

                      Really, I believe HTAs are the answer to much of what ppl have been agonizing over.
                      (For those who don't know, an HTA stands for HyperText Application. It's really an HTML file, that has been renamed .hta; and on Windows it gets loaded by a MSIE stub called mshta.exe, which opens it in a similar way that SU does, but mshta.exe makes it a secure webdialog.)
                      In ruby you would open your HTA with the UI.openURL("mydlg.hta") command.

                      My thots are:

                      1. upgrade to Daniel J. Berger's newer better Win32::Api
                        ...(req's swaping some parameters, he put the dll last, instead of 1st.)
                      2. also install his module for Win named pipes.
                      3. then ruby would open a named pipe (same name as dlg) as the server
                      4. then call the openURL "dlg.hta"
                      5. the JS in dlg.hta would after body load open a connection to the waiting pipe as client
                      6. two way comms from then on
                      7. the dlg would need to put a I'm closed message in the pipe before it closes
                      8. and the ruby script would dispose of the pipe when no longer needed

                      no more messin' with ghost protocol args
                      I've been workin' on a simple JSON module to pass things back and forth.
                      ..but other things interrupt...
                      probs updating all my .NETs
                      probs with rubygems... so I uninstalled ruby 1.8.6
                      need to get 1.9.x installed with a newer rubygems

                      I'm not here much anymore.

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

                        hmm... you're using HTAs with Su and Ruby? Interesting, but what about Macs? A wee bit problem there.

                        @dan rathbun said:

                        Read and write direct to files (don't have to go thru SU.)

                        ? You mean by the JS? Since SU's Ruby have no problem with file read/write. ...except that it only calls ASCII versions of the System File APIs...

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

                        1 Reply Last reply Reply Quote 0
                        • chrisglasierC Offline
                          chrisglasier
                          last edited by

                          @thomthom said:

                          hmm... you're using HTAs with Su and Ruby? Interesting, but what about Macs? A wee bit problem there.

                          @dan rathbun said:

                          Read and write direct to files (don't have to go thru SU.)

                          ? You mean by the JS? Since SU's Ruby have no problem with file read/write. ...except that it only calls ASCII versions of the System File APIs...

                          Yes I think the Mac business restricts hta's not just for SU but for connecting SU to the rest of the world via its web dialog "portal" (can I call it that? ... sorry not a techie). But if there could be another way to read/write files the cosmetics of hta s becomes trivial - of little interest.

                          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
                          • Dan RathbunD Offline
                            Dan Rathbun
                            last edited by

                            Got another 'jewel' for the WebDialog list of treasure's:

                            If you want to have the nice XP styled 'themed' controls (buttons, scrollbars, tabs, etc.), instead of the old ugly Win 3.x style, there's a META tag to put in the HEAD section.
                            This 'formally' is known as MS Common Controls ver 6 (where the old ver was 5.) These controls are housed in comctl32.dll, which shipped with XP. (Look at properties to see product ver, not file version.)

                            here's the tag:

                            
                            <!-- This tells the HTML frame to use MS Common Controls ver 6+ if available -->
                            <!--  (also known as XP style themed controls.) .HTA files always NEED this. -->
                            <META HTTP-EQUIV="MSThemeCompatible" CONTENT="Yes">
                            
                            

                            For more info, see Using Visual Styles with HTML Content on page: http://msdn.microsoft.com/en-us/library/ms997646.aspx#xptheming_topic11

                            ..and BTW if ya' wonderin' why SU doesn't use ver 6 controls in their dialogs, it's because they didn't turn them 'on' (as a dependant assembly,) in the Sketchup.exe manifest. A holdover from preXP days I imagine. I'm running SU with them ON, but there are some display issues with the brown buttons on the left of the status bar (no images,) as well as few other things. [See post in Google groups, Technical Issues if interested. Have forwarded a 'bug' report to Google as well. Perhaps the next version, they'll have all the controls updated seeing as how they only support XP and higher.]
                            .

                            I'm not here much anymore.

                            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