Reputation: 4984
This is the line of code for my NSLog:
NSLog(@"\n\noCLientFirstName: %@\nlastName: %@\nconcatenatedName: %@",oClientFirstName, lastName, concatenatedName);
Why am I getting output that looks like this?
oCLientFirstName: <UITextField: 0xefe0330; frame = (394 293; 160 30); text = 'Bob'; clipsToBounds = YES; opaque = NO; autoresize = TM+BM; gestureRecognizers = <NSArray: 0xefe12d0>; layer = <CALayer: 0xefe0120>>
lastName: <UITextField: 0xef05bd0; frame = (20 40; 260 40); text = 'Jones'; clipsToBounds = YES; opaque = NO; gestureRecognizers = <NSArray: 0xef057c0>; layer = <CALayer: 0xef05ba0>>
concatenatedName: Bob<UITextField: 0xef05bd0; frame = (20 40; 260 40); text = 'Jones'; clipsToBounds = YES; opaque = NO; gestureRecognizers = <NSArray: 0xef057c0>; layer = <CALayer: 0xef05ba0>>
I have NEVER had this issue before; the output should look like this:
oClientFirstName: Bob
lastName: Jones
concatenatedName: BobJones
What's going on?
Upvotes: 0
Views: 54
Reputation: 2430
NSLog(@"\n\noCLientFirstName: %@\nlastName: %@\nconcatenatedName: %@",oClientFirstName.text, lastName.text, concatenatedName.text);
this is the solution of your question :)
Upvotes: 0
Reputation: 18363
This looks like you are passing UITextField
objects to your log function rather than NSStrings. Double check the types and adjust your code accordingly.
Upvotes: 1
Reputation: 12782
%@ format specifier in NSLog will call the following methods in order on the object parameter for the position. debugDescription description
You're getting the result of that for the objects.
Upvotes: 3