Re: Setting image one pulldown popup button

Christiaan Hofman <[email protected]>
Newsgroups gmane.comp.macosx.devel
Message-ID <[email protected]>
On Dec 7, 2009, at 2:50, Matt Neuburg wrote:

> 
> On Dec 6, 2009, at 5:28 PM, Christiaan Hofman wrote:
> 
>> 
>> On Dec 7, 2009, at 2:07, Matt Neuburg wrote:
>> 
>>> On or about 12/6/09 4:12 PM, thus spake "Christiaan Hofman"
>>> <[email protected]>:
>>> 
>>>> NSImage imageNamed:@"Overflow"
>>> 
>>> Can you expand upon that to prove to yourself (and us) that it's not a nil
>>> image, as I previously suggested? m.
>> 
>> I am 100% sure the image is there.
> 
> That's how you program? By being "100% sure" of stuff? You're not willing even to put in a simple nil test into the code? Wow, remind me not to use any software you've written! :)
> 

No, I've also done things like that, many times. Really, I've tried many things and tests over time, I'm not going to list every little detail I tests because it would be too long. I just say this to say that it really does draw something, i.e. not even an empty (non-nil) image.

> Sure, the image might "be there", but "Overflow" might not be its name. (For example, the file name probably has an extension, which you have not given; also, capitalization matters.) If you like, I'll send you a project where the code is almost *exactly* what you posted, but the image *does* appear (because I made the popup button big enough, and because I say the image's name correctly). m.

The fact that I use the same code just with a NSPopUpButton subclass also means that it is the exact same image, with the exact same spelling. And really, I find it offensive that you think I would not double-check such a thing like spelling of the image name. So you're wrong here.

Christiaan
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.