Boom! That worked!
Thank you sir!
--J
When I create a component via .add_group and then .to_component, the component axes are set to the lower left extremities. Meanwhile, making a component via the Edit menu, I can specify the Component Axes in the dialog.
How can I set or move the component axes when I create the definition via Ruby?
Many thanks for any assistance!
--J
Okay, so it is just a permissions issue, browsers don't allow loading a local image from a remote page.
So in terms of feeding the image to the dialog, I'm not having success. Here is what I have, which is not working:
require "base64"
jpg = "/path_to_image/fancy_image.jpg"
s = File.binread(jpg)
b = Base64.encode64(s)
@dialog.execute_script("document.getElementById('preview').src='data;image/jpg;base64, #{b}'")
I'm sure I screwed up something simple, thanks helping me to find out what!
--J
To recap, moved an HTML page from living in its plugin folder, to living on our web server.
Everything with it is working fine, except for setting the image source to a local jpg.
It does need to be dynamically set.
When I inspect it, the image SRC is set, the image is just not displaying.
Thanks for the tip on base64, it's looking like I'll need to go that route.
--J
I have a web dialog that is being migrated from local html to being remotely hosted.
The only part that is not working, is the setting of the image source. It must be some sort of permissions issue I figure.
I am firing something like:
d.execute_script("document.getElementById('#{myimg}').src='file:///path/image.jpg'")
Which works fine if the html is local!
If this is some security built into the Safari web dialog engine.... Do I have to feed the image as a binary string?
Many thanks for any help!
--J
It looks like the version on Sketchucation is not the latest.
Please download the latest one here:
http://www.landfx.com/index.php/kb/installation/item/646-how-to-install-the-sketchup-plugin.html
We just shot an hour long webinar showing off what the plugin can do. It will be posted here, no later than Monday, January 27:
http://www.landfx.com/index.php/videos/webinars.html
Lastly, we are also in the process of updating the documentation for, available here:
http://www.landfx.com/index.php/land-f-x/sketchup-connection.html
You're also always welcome to contact us directly, at http://www.landfx.com/support
--J
Actually, it does just seem to be exactly that, allow_actions_from_host.
I had noticed with V6 that it was ignored, so I never implemented it.
But in my remote WebDialog, which is failing, I simply add an allow_actions_from_host, and suddenly now it's working again.
--J
I can give you a quick example to one that isn't working if you need.
--J
Here's a little more info from testing if this helps.
I have two dialogs which are identical, both just a Select listbox, with an OnChange event that fires a window.location callback. Using Transitional doctype.
The one that is a local htm file stored in the Plugins folder, that works.
The one that is remote PHP, that one fails.
--J
Everything totally broken here.
Tried changing the Doctype around, from Transitional to Strict to Html 5, all no change.
Tried href= vs window.location= vs document.location=, all broken, broken, broken.
If TIG or anyone has sample code that does work within Mavericks, I'd love to see it.
Most of our skp: callbacks are within Javascript for ease of maintenance. Usually fired by onclicks, but it can vary.
--J