• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Weird bug in my code [long]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Weird bug in my code [long]


  • Subject: Re: Weird bug in my code [long]
  • From: p3consulting <email@hidden>
  • Date: Sun, 22 Feb 2004 17:03:15 +0100

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:

Engine is a pointer to FMEngine object, which is a datasource for outline view.

FMDelegate.m
- (void)awakeFromNib
{
[self showFontList:nil];
}

- (IBAction)showFontList:(id)sender
{
if (!fontListController)
{
[NSBundle loadNibNamed:@"FontList" owner:self];
}
[fontListController showWindow:[fontListController window]];
}

FMFontListController.m
- (id)init
{
if (self == [super init])


if (self = [super init])

or

if ((self = [super init]) != nil)

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.

  • Follow-Ups:
    • Re: Weird bug in my code [long]
      • From: Robert Cerny <email@hidden>
References: 
 >Weird bug in my code [long] (From: Robert Cerny <email@hidden>)

  • Prev by Date: Re: Re-enabling Expose for certain windows
  • Next by Date: Re: [Slightly OT] Shareware donation collection
  • Previous by thread: Weird bug in my code [long]
  • Next by thread: Re: Weird bug in my code [long]
  • Index(es):
    • Date
    • Thread