[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

RubyAEOsa return values changed?

tom

7/6/2006 10:09:00 PM

Hi Guys

I have noticed that releases of the rubyaeosa project has stopped some
time ago, and was wondering if anybody has a happily-working-copy of
rubyaeosa as mine will not convert the return values into ruby objects
(via to_rbobj).

I had a look through the constants and the Type for Unicode Text is
'utxt' however any Unicode text being returned from OSA seems to end up
a 'txtu' meaning the conversion cannot take place.

I attempted to switch the 'utxt' to 'txtu' in the constants file but
this throws nasty errors, so I walked away briskly! (Im a coward I
know!!)

This is what I got, if I do a debug on @result it displays it as:
#<AEDesc:0x12859f2 type='txtu'>



require 'osx/aeosa'

class MainController < ApplicationController

def check_mail
script = <<END_OF_STRING
tell application "Mail"
set my_message to message 1 in inbox
return subject of my_message as Unicode Text
end tell
END_OF_STRING

@result = OSX.do_osascript(script)
end
end


Any ideas?
Many Thanks

Tom Medhurst