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
Post a Comment