Re: Weird bug in my code [long]
Re: Weird bug in my code [long]
- Subject: Re: Weird bug in my code [long]
- From: Robert Cerny <email@hidden>
- Date: Mon, 23 Feb 2004 09:23:18 +0100
Hi,
fontListController is set using IB. The fileOwner of the second nib is
FMDelegate, which points to FMFontListController instantiaed in IB.
Robert
On 22.2.2004, at 23:01, p3consulting wrote:
>
On 22 fivr. 2004, at 11:40, Robert Cerny wrote:
>
>
> Hi folks,
>
> I have got a pretty weird bug in my code, which I'm unable to find.
>
> The situation is as follows: I have a window, which is loaded from
>
> another nib than MainMenu.nib The Nib owner of my object is
>
> FMDelegate. The window contains a NSOutlineView, which should display
>
> all font families active in system.
>
> The bug is that sometimes the outline displays empty. I used a few
>
> dozens of NSAsserts to find the problematic place but didn't find
>
> anything. I added a button to window, which is used just for invoking
>
> debuger and using this technique I was able to stop in problematic
>
> case. (the problem doesn't show always) To my suprise, the pointers
>
> to window objects - created in IB - were empty!? It leads me to idea
>
> that I somehow harm the initialization process but I have no idea
>
> what's wrong. Let me show you some code:
>
>
>
>
>
>
A common problem that generates that kind of symptom is multiple
>
instance of an IB object:
>
log your init methods and check that you don't have two copies of
>
yours controller, delegate, etc.
>
>
- (IBAction)showFontList:(id)sender
>
{
>
if (!fontListController)
>
{
>
[NSBundle loadNibNamed:@"FontList" owner:self];
>
}
>
[fontListController showWindow:[fontListController window]];
>
}
>
>
where do you set fontListController to its value avec loading from the
>
nib ?
>
>
Pascal Pochet
>
email@hidden
>
_______________________________________________
>
cocoa-dev mailing list | email@hidden
>
Help/Unsubscribe/Archives:
>
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
>
Do not post admin requests to the list. They will be ignored.
[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.