My plugin work on Windows not on Mac
-
@tig said:
The API's
weddialog.set_file()
is known to fail...?
Never had any issues with it - on any platform. Example?
-
Typo - I meant
set_html()
Doh!
Hence my reference to it in my next sentence
Still confused about how that happened... too much Rioja with my Sunday dinner -
Ahhhh ..... I know only too well that one Tinto can lead to many
-
Hi,
I replaced set_file by set_url and i have the same issue (on Mac "empty white" content in webdialog).
-
Revert to as it was - didn't you read the posts about my typo?
Without seeing exactly how you rb interacts with the html/js etc we are stuck... -
Ok I put it back like it was before.
I put the full archive of my plugin a few posts above.
-
OK.
You are typically using:
@wnd_params.execute_script("$('#longueur').val('#{s_longueur}')")
to set the 'value' ofid=longueur
to bes_longueur
Try constructing it a different way: perhaps the MAC doesn't like it: perhaps something more like:
@wnd_params.execute_script("document.getElementById('longueur').setAttribute('value','#{s_longueur}');")
???
If it's not a 'value' then try something like 'innerHTML' OR 'innerTEXT': e.g.:
@wnd_params.execute_script("document.getElementById('longueur').innerHTML='#{s_longueur}');")
etc...
-
Not near a Mac to test at the moment. But have you tried with adding ; at the end of each command you execute?
(Sidenote, if you use that script in a model with untis settings set to display feet you'll get ' characters that will break your javascript because you're no escaping your string.)
(Sitenote 2:
120.cm.to_l
the.to_l
is redundant as.cm
will return aLength
object.) -
TT, well spotted that he has missed a '
**;**
' terminating his script string - I missed that - however, it doesn't why it's PC friendly / MAC unfriendly - I recall something about MAC's changing the way 'innerHTML' / 'innerTEXT' worked a few Safari updates ago - perhaps that's the rub? -
Nah - he's using jQuery. It takes care of all compatibility issues like that. I've used jQuery for several years now and none of them has broken. Certainly not the ones he's using there.
-
First, thank you both try to help me on these issues.
Well done for small errors in my code.
I added the ";" at the end of javascript strings and i changed the code as :
@wnd_params.execute_script("$('#longueur').val(#{s_longueur.inspect});") to escape ' and " charactersI don't have a Mac at hand either. I have to wait for a Mac user have the time to try my corrections and then give me the result.
-
if I change the rubies encoding to uft8 and I zapp the gremlins I get this which shows the css for font size is not good. use ems
Advertisement