Experimental webdialog prototype
-
Since more people are seeing the wider potential of webdialogs, I offer this set of files to help those just starting.
Prototype.zip - to be superceded by cheat-sheet
Modules could be added by others in this thread but that would require some organisation. And first I would like to see if this is found to be useful.
-
there is any tutorial, how asignar a function of ruby to html?
As passing a dialog box plugins with Ruby, a dialog box html?another question, sketchup supports a dialogue box in flash?
-
Please see this post about keeping plugin support folders in the ../plugin folder.
-
@chrisglasier said:
Modules could be added by others in this thread ...
For example:
Insert at end of Machine.js
function holderDown(evt){ //evt is available if need to find attributes or properties of element txt = "Changed by mousedown event" document.getElementById ("Holder").innerHTML = txt }
Note: the module description is individual post caption.
-
@unknownuser said:
there is any tutorial, how asignar a function of ruby to html?
As passing a dialog box plugins with Ruby, a dialog box html?Have a look at Sharing data between Sketchup Ruby and HTML. I think you will find the answer there and if so, either ask a more specific question or try out possible solutions in the prototype and offer a successful one as an example as in the post above. The caption might be "@dlg.execute_script"?
@unknownuser said:
another question, sketchup supports a dialogue box in flash?
What I understand is you can embed flash in an html file and such a file can be in a webdialog.
-
This idea will now be incorporated into the API machine/ruby web console combo being developed by Jim and I from Alex's Cheat sheet topic. Thanks to Alex for supplying the list. Any comments and suggestions will be welcomed there.
Thanks
Chris
-
Chris,
I receive an error when clicking the text.I guess that "holderDown(event)" is simply missing in JS.
Could you add a method to Ruby to alter the text on the click?
def change_text
@dlg.set_value("Holder","Altered text: #{1 + rand(6)}"
endThanks
Tomasz
-
@unknownuser said:
Chris,
I receive an error when clicking the text.Tomasz
I see you are now based in Poland. I hope all goes well for you there.
As I said that idea really got overtaken by the cheat-sheet biz, for which we have infinitely better code checking! We hope to have a device to insert snippets to help build web dialogs and test them in Jim's WebConsole plugin (adapted). I just thought you might be interested in something similar for html and javascript.
So if you don't mind I'll delete the files in this topic to save face!
Best regards
Chris
-
@chrisglasier said:
So if you don't mind I'll delete the files in this topic to save face!
I don't mind and I am looking forward to the new device.
Advertisement