Re: NIB doesn't link to objects
Re: NIB doesn't link to objects
- Subject: Re: NIB doesn't link to objects
- From: Charlie Dickman <email@hidden>
- Date: Sat, 13 Nov 2010 19:06:18 -0500
Let me try this again...
IN THE CODE I SPELLED IT "- (void) awakeFromNib". In fact, I copy/pasted it from another WORKING project.
I THEN SET A BREAKPOINT ON "- (void) awakeFromNib" and executed under the debugger (GDB). The debugger stopped on the breakpoint "- (void) awakeFromNib" and I inspected the object values. THEY WERE ALL nil (spelled correctly). I then had the debugger step over the assignment of the (nil) values to the array and then inspected the array in the debugger and it was empty as the first value in the arrayWithObjects: list was nil because the first object in the list had a value of nil because no value was assigned to the object when the NIB was loaded.
IS THAT CLEAR ENOUGH??????
AND, IF I LET THE PROGRAM CONTINUE TO EXECUTE AND I CLICK ON ONE OF THE BUTTONS I GET CONTROL (AGAIN WITH A BREAKPOINT SET IN THE DEBUGGER AND WATCHING THE EXECUTION STOP AT IT) at the IBAction (spelled correctly) assigned to it in the very same NIB.
I can't believe that this question has caused such a ridiculous interchange. Andy Lee has been the only one to say anything constructive (thank you Andy!).
By the way, Christiaan, instead of criticizing me non-constructively, if I can make things clearer so that you can understand what I'm asking all you have to do is ask and keep your opinions about me to yourself.
On Nov 13, 2010, at 6:44 PM, Christiaan Hofman wrote:
>
> On Nov 14, 2010, at 0:21, Charlie Dickman wrote:
>
>> Spelling in an email doesn't count. I watched it execute with the debugger and fail to assign any values.
>>
>
> It most definitely does count. It's code, not English, and in code exact spelling is crucial.
>
> What you try to do is very elementary. So when it does not work you're making a very elementary mistake. We cannot tell you what you did wrong, because you leave out the relevant facts, and your descriptions are vague. It does not help that you are also very sloppy (like with the spelling in various places), and say things that are impossible. By being so sloppy, and failing at such an elementary task, you give the impression that you CAN make such elementary mistakes as misspelling a method. From your description this in fact is the most obvious guess. If you want us to help you have to be much more precise and correct.
>
> Christiaan
>
>> On Nov 13, 2010, at 6:16 PM, Christiaan Hofman wrote:
>>
>>>
>>> On Nov 14, 2010, at 0:12, Charlie Dickman wrote:
>>>
>>>> Andy,
>>>>
>>>> I moved it to AwakeFromNIB but the result is the same.
>>>>
>>>
>>> awakeFromNib, not AwakeFromNIB.
>>>
>>> Christiaan
>>>
>>>
>>>> On Nov 13, 2010, at 5:53 PM, Andy Lee wrote:
>>>>
>>>>>
>>>>> On Nov 13, 2010, at 5:46 PM, Charlie Dickman wrote:
>>>>>
>>>>>> I'm sure I'm missing something really simple here...
>>>>>>
>>>>>> In my .h file I define some objects in the interface section as
>>>>>>
>>>>>> IBOutlet NSButton * tileButton1, *tileButton2...
>>>>>>
>>>>>> in the .m file (an implementation of a NSView) I initialize an array...
>>>>>>
>>>>>> NSArray *tileButtons = [[NSArray array WithObjects: tileButton1, tileButton2, ..., nil] retain];
>>>>>
>>>>> You're probably doing this too early (maybe in your init method?), before the outlets have been connected. Try moving it to awakeFromNib.
>>>>>
>>>>> --Andy
>>>>>
>>>>
>>>> Charlie Dickman
>>>> email@hidden
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Do not post admin requests to the list. They will be ignored.
>>>> Xcode-users mailing list (email@hidden)
>>>> Help/Unsubscribe/Update your Subscription:
>>>>
>>>> This email sent to email@hidden
>>>
>>
>> Charlie Dickman
>> email@hidden
>>
>>
>>
>
Charlie Dickman
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden