My guess is that JS automatically converts the object in its string representation while in Ruby, you get the real object and you have to call a method on it. I agree that this isn't great and I'm not a BridgeSupport/ScriptingBridge expert so I can't tell you if that's something wrong on SB side or Adobe's.<div>
<br></div><div>Good luck,</div><div><br></div><div>- Matt<br><br><div class="gmail_quote">On Fri, Nov 11, 2011 at 4:13 PM, Spencer Rose <span dir="ltr"><<a href="mailto:dspencerr@gmail.com">dspencerr@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><br>
<br>
Thanks for doing this Matt. I have not fallen off the earth on this one. :)<br>
Trying to do a lot of research and figure this thing out. InDesign's scripting<br>
API is complicated enough, but the way ScriptingBridge works with it is<br>
making me work hard. Annoying that running these two commands in the<br>
following languages gives me the following discrepant results;<br>
<br>
Javascript In Extend Script Editor:<br>
app.selection[0].contents -> results in the text of whatever is selected<br>
(eg.. line or word or paragraph)<br>
<br>
Ruby run at Terminal<br>
puts app.selection[0].contents -> <SBObject:0x209373520><br>
Once again, that SBObject is not incredibly helpful.<br>
<br>
I appreciate the parser and will definitely start posting a lot of what I find<br>
as I have some success dissecting the Scripting calls.<br>
<br>
Spence<br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
MacRuby-devel mailing list<br>
<a href="mailto:MacRuby-devel@lists.macosforge.org">MacRuby-devel@lists.macosforge.org</a><br>
<a href="http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel" target="_blank">http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel</a><br>
</blockquote></div><br></div>