troubleshooting Question

BOOL from an Array

Avatar of Scott_Edge
Scott_Edge asked on
CSwift Programming
3 Comments1 Solution473 ViewsLast Modified:
I am trying to extract a boolean value from an array test if true or false. If I assign a NSNumber I can get the value but I am not able to test if true or false. I've tried as string as number and can't seem to get BOOL to work. right now I am getting an error that states

initialization makes integer from pointer without a cast. I'm new to coding and am lost. thanks.
else if([ident isEqual:@"speakerStateCell"])
		{
			NSNumber* n = (NSNumber*)anObject;
			NSMutableDictionary* dictEntry = [speakerListDataStorageForView objectAtIndex:rowIndex];
			[dictEntry setObject:n forKey:@"speakerStateCell"];
			NSString *dictSpeaker = [dictEntry objectForKey:@"speakerNameCell"];
			BOOL dictState = [dictEntry objectForKey:@"speakerStateCell"];
                       //initialization makes integer from pointer without a cast
 
			NSLog(@"speaker: %@  state:%@", dictSpeaker,dictState);
			if (dictState == NO)
			{
				NSLog(@"This Worked");
			[self connectToSpeaker:dictSpeaker];
			}
ASKER CERTIFIED SOLUTION
F. Dominicus
CEO/Programmer

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 3 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros