• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Apple Event in Cocoa
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Apple Event in Cocoa
      • From: John Stiles <email@hidden>
  • Prev by Date: Re: Kludges when binding to 'value' of Menu Items
  • Next by Date: Re: Apple Event in Cocoa
  • Previous by thread: Re: inappropriate tool palette activation problem
  • Next by thread: Re: Apple Event in Cocoa
  • Index(es):
    • Date
    • Thread