Andy,

I inserted code to check for nil images and image position, here is what I got:
// set the original and alternate images...names are ā€œopposite"
NSImage *image = [NSImage imageNamed:@"StopButtonAlternateIconā€];
if(image)
{
    NSLog(@"Setting 1st image for stop button");
    [_button setImage:image];
}
else
{
    NSLog(@"Image is null for StopButtonAlternateIcon");
}



image = [NSImage imageNamed:@"StopButtonIcon"];
if(image)
{
    NSLog(@"Setting 2nd image for stop button");
    [_button setAlternateImage:image];
}
else
{
    NSLog(@"Image is null for StopButtonIcon");
}



// image position

[_button setImagePosition:NSImageOnly];
NSLog(@"Image position: %lu", [_button imagePosition]);


From the console:
2014-04-23 20:41:18.394 3D Rolling Ball Simulator[6321:303] Setting 1st image 
for stop button
2014-04-23 20:41:18.395 3D Rolling Ball Simulator[6321:303] Setting 2nd image 
for stop button
2014-04-23 20:41:18.395 3D Rolling Ball Simulator[6321:303] Image position: 1

On Apr 23, 2014, at 7:59 PM, Andy Lee <ag...@mac.com<mailto:ag...@mac.com>> 
wrote:


On Apr 23, 2014, at 6:36 PM, Jerry Krinock 
<je...@ieee.org<mailto:je...@ieee.org>> wrote:


On 2014 Apr 23, at 15:13, Peters, Brandon 
<bap...@my.fsu.edu<mailto:bap...@my.fsu.edu>> wrote:

call [toolbaritem setView:view] and pass in the NSButton.

Try some bonehead debugging with NSLog().  Verify that toolbaritem is your 
target item at that point, in particular, that it is not nil.

Two more things you can easily check:

* [NSImage imageNamed:imageName] is not returning nil.
* What is your button's imagePosition?  If it's NSNoImage that might explain it.

--Andy

_______________________________________________

Cocoa-dev mailing list 
(Cocoa-dev@lists.apple.com<mailto: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<http://lists.apple.com>

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/bap04e%40my.fsu.edu

This email sent to bap...@my.fsu.edu

_______________________________________________

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to