• 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
Distributed postNotificationName
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Distributed postNotificationName


  • Subject: Distributed postNotificationName
  • From: Trygve Inda <email@hidden>
  • Date: Fri, 17 Nov 2006 08:58:59 +0000
  • Thread-topic: Distributed postNotificationName

NSDictionary*  userInfo = [NSDictionary dictionaryWithObjectsAndKeys:
@"someID", [NSNumber numberWithInt:7], @"someName", name, nil];

[[NSDistributedNotificationCenter defaultCenter]
postNotificationName:@"myNotification" object:nil userInfo:userInfo
deliverImmediately:YES];


This fails. If I remove the @"someID", [NSNumber numberWithInt:7] it works.

How can I send a number in the dict?

The docs say:

The notificationInfo dictionary is serialized as a property list, so it can
be passed to another task. In the receiving task, it is deserialized back
into a dictionary. This serialization imposes some restrictions on the
objects that can be placed in the notificationInfo dictionary. See XML
Property Lists for details.

NSNumber is on the approved list, so when doesn't it work?

If I only send NSStrings in the dict, all is well.

Thanks,

Trygve


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Distributed postNotificationName
      • From: Rob Ross <email@hidden>
  • Prev by Date: Re: More NSDictionary to CFDictionary
  • Next by Date: Re: Distributed postNotificationName
  • Previous by thread: [ANN] ODBCKit 0.2.0
  • Next by thread: Re: Distributed postNotificationName
  • Index(es):
    • Date
    • Thread