Re: Apple Event in Cocoa
Re: Apple Event in Cocoa
- Subject: Re: Apple Event in Cocoa
- From: John Stiles <email@hidden>
- Date: Tue, 16 Oct 2007 11:12:51 -0700
I'd say getting Unicode text sounds like a bonus to me ;) Why do you
need MacRoman?
On Oct 16, 2007, at 11:07 AM, Ivan C Myrvold wrote:
I am converting code done in Carbon to Coca, and it mostly goes
well, but I am a bit confused about the difference in text.
The AppleEvent looks like this in the old arbon code:
{ 1 } 'aevt': TANS/trbm (i386){
return id: 751960066 (0x2cd20002)
...
....
....
key '----' -
{ 1 } 'list': - 26 elements {
{ 1 } 'TEXT': 28 bytes {
"bla bla bla bla"
}
{ 1 } 'TEXT': 34 bytes {
"bla bla bla bla"
}
{ 1 } 'TEXT': 28 bytes {
"bla bla bla bla"
....
But when I send from Cocoa, it looks like this:
key 'list' -
{ 1 } 'list': - 26 elements {
{ 1 } 'utxt': 56 bytes {
"............................"
}
{ 1 } 'utxt': 68 bytes {
".................................."
}
{ 1 } 'utxt': 56 bytes {
I am using this code in Cocoa:
NSAppleEventDescriptor *menulist = [NSAppleEventDescriptor
listDescriptor];
[menulist insertDescriptor:[NSAppleEventDescriptor
descriptorWithString:@"bla bla bla"] atIndex:1];
[menulist insertDescriptor:[NSAppleEventDescriptor
descriptorWithString:@"bla bla bla"] atIndex:2];
[menulist insertDescriptor:[NSAppleEventDescriptor
descriptorWithString:@"bla bla bla"] atIndex:3];
It looks like I get the strings as unicode in Cocoa. What can I do
to get the same result as in the old Carbon code?
Ivan
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
40blizzard.com
This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden