user1120133
user1120133

Reputation: 3234

NSLog statement for debugging

How to write NSLog statement for

pageCache.dataSource = value;

to debug it.

In debugging found that

dataSource = (objc_object*) 0x000000
 isa(objc_class*)

Thanks

Upvotes: 2

Views: 149

Answers (2)

jawad waheed
jawad waheed

Reputation: 308

NSLog statement to print an object to console is like this

NSLog(@"%@", pageCache.dataSource);

Upvotes: 2

Garrett
Garrett

Reputation: 5630

This means that you dataSource is nil (i.e. there is nothing there, the pointer doesn't point to anything). This is probably the cause of whatever you are trying to debug. Make sure you are properly allocating and initializing your dataSource, or properly setting its pointer value before trying to use it.

Upvotes: 4

Related Questions