Thank you, I had overlooked that. I fixed that, however that doesn't
fix the app crashing when trying to set the textfield contents as a
string, or why I get the path in the sheet function but not in this
one...
On Sep 6, 2008, at 11:24 PM, Nathan Kinsinger wrote:
On Sep 6, 2008, at 7:10 PM, Aron Spesard wrote:
So after reading the various image viewer tutorials on the web and
getting through the StretchView chapter in Cocoa Programming for
MAC OS X, I decided to try and write one that takes a couple of
arrays of images and composites two images together. Click a button
and the view updates to the next composite image.
I was able to get the items in the arrays from open sheets and that
all made sense. Before I even tried to start drawing things in Rect
I tried to just put the path in a text box with the click of a
button. I thought the below was the way to go:
- (IBAction)viewClientFiles:(id)sender
{
NSString *imagePath = (clientFileName);
[textField setStringValue:imagePath];
NSLog(@"current client file name:%a",imageName);
}
which compiles but hangs the app
The thing I don't really understand is that when I log
clientFileName in openPanelDidEnd action
the log is the path to the file, but in the above action it's
"0x1.838000f085p-1029"
Why is that and how can I get that item's path?
thanks,
Aaron
The problem is the %a in the NSLog string. %a is a floating point
number in hex format. In this case it's converting the address of
the pointer imageName to a hex floating point number.
The correct conversion character for NSStrings (or most any
Objective-C object) is [EMAIL PROTECTED]
--Nathan
_______________________________________________
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/fuzzy.spaz
%40gmail.com
This email sent to [EMAIL PROTECTED]
_______________________________________________
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to [EMAIL PROTECTED]