I've spent a great deal of time with the WebDialog class. I planned to write such a pump, but I found that I could do it differently with more reliable results.
I've spent a great deal of time with the WebDialog class. I planned to write such a pump, but I found that I could do it differently with more reliable results. ( My WebDialog findings: forums.sketchucation.com/viewtopic.php?f... ) Alternative Method SketchUp > JavaScript My alternative method was that I didn't try to push data from the WebDialog to Ruby.
But instead had Ruby pump the WebDialog because Webdialog. Execute_script is synchronous. I send a command to the WebDialog with a query.
The Javascript then processes this and put the result into a hidden INPUT element which I then use ´WebDialog. Get_element_value` to fetch the content of. All of this I wrapped up into a wrapper method the will process the return value and convert it into appropriate Ruby objects.
http://www.thomthom.net/software/sketchup/tt_lib2/doc/TT/GUI/Window.html#call_script-instance_method The outline is: Make a call ( . Execute_script ) to clear the hidden INPUT element Make the actual call which JS will process and put the return value into the hidden INPUT Use . Get_element_value to fetch the hidden INPUT value All this is synchronous.
Javascript Pump Javascript > SketchUp If you really need to pump information from JS, then I think you need to do something like this: JS: push messages into a message queue JS: Send a message to SU that there is messages SU: When the callback notifies about new messages, query JS for the next message and continue until there are no more messages. This should work as it'd be similar method as described earlier. The concept would be to store up your messages and then hand over control to the SketchUp side which can pump it synchronously.(Untested theory.).
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.