iphone - Unable to set member variable -


very strange issue.

i have following code:

nsdictionary* notificationuserinfo = [pnotification userinfo]; nsmanagedobject* newshoppingfilter = [notificationuserinfo valueforkey:@"shoppinglistfilter"]; self.shoppinglistfilter = newshoppingfilter; nslog(@"%@ tapped", [newshoppingfilter valueforkey:@"name"]); 

for reason self.shoppinglistfilter = newshoppingfilter not setting variable.

i assume issue not initializing self.shoppinglistfilter variable in way cannot figure out. nslog shows right output, newshoppingfilter not null self.shoppinglistfilter is.

any appreciated.

i bet newshoppingfilter nil. likely, there no key "shoppinglistfilter" in notification user info dictionary.

set breakpoint @ line assigns value self.shoppinglistfilter , check value of newshoppingfilter. display entire contents of notificationuserinfo.

post code creates user info dictionary , passes notification posting. track down problem.


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -