Apple Event in Cocoa
Apple Event in Cocoa
- Subject: Apple Event in Cocoa
- From: Ivan C Myrvold <email@hidden>
- Date: Tue, 16 Oct 2007 20:07:21 +0200
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:
This email sent to email@hidden