Dialog - Simple WebDialog Communication Underware
-
@chrisglasier said:
@martinrinehart said:
Suggest you stick to your previous goal.
That project is well underway, thank you. Problem is, if you try to write 12 hours a day, your stuff has all the sparkle of week-old soda.
Why has no one commented on the substance? Are you all much happier with the existing situation than I am, or much less sanguine about working a serious improvement?
-
I have the last couple of weeks implemented a webdialog for my selection toys. And yesterday I fired up my old mac to do some testing.
Needless to day, it was a frustrating day.I ran into syncing problems due to the async nature of the Mac WD. But fortunately for me I could merge all the .execute_script commands into one. (I was sending multiple JSON objects - I just merged them into one big one.) And the dialog never send any commands back except for when it's ready, and for the OK and Cancel buttons. So I've managed to avoid the big pains with this.
But now that I've had a chance to experience WebDialogs on Mac I'm also looking for a solution to the async problem.
-
@unknownuser said:
'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.
Tomasz
Your idea could fit well with Jim and I's current development that started life here and picked up speed with Alex's cheat-sheet (link below)
Chris
-
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
-
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
-
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.
-
@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?
-
@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?
-
Yea, the webdialog info is very scattered.
-
@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.
-
@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? -
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:
- upgrade to Daniel J. Berger's newer better Win32::Api
...(req's swaping some parameters, he put the dll last, instead of 1st.) - also install his module for Win named pipes.
- then ruby would open a named pipe (same name as dlg) as the server
- then call the openURL "dlg.hta"
- the JS in dlg.hta would after body load open a connection to the waiting pipe as client
- two way comms from then on
- the dlg would need to put a I'm closed message in the pipe before it closes
- 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 - upgrade to Daniel J. Berger's newer better Win32::Api
-
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...
-
@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.
-
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.]
.
Advertisement