• 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
Multiple Nibs help?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Multiple Nibs help?


  • Subject: Multiple Nibs help?
  • From: Hasan Diwan <email@hidden>
  • Date: Wed, 8 Oct 2003 17:40:47 -0400

I have a window with a webview as my Document, it displays fine. I've put a small window with an NSTextField in a second nib. I'd like this window to drop down as a sheet. When I load the Nib, the code is loaded and everything is initialised properly. I have included a code snippet below; problems are illustrated in the comments:
// MyDocument.m
- (id) init {
self = [super init];
if (self) {
[NSBundle loadNibNamed:@"NewURL" owner:self]; // NewURL.nib contains the window with the textfield
}
return self;
}
- (void)windowControllerDidLoadNibName:(NSString *)s {
[super windowControllerDidLoadNibName:s];
[[[[NSApp mainMenu] itemWithTitle:@"File"] submenu] addItemWithTitle:@"Open URL" action:@selector(newURL:) keyEquivalent:@"l"]; // keyEquivalent doesn't seem to have any effect either
- (IBAction) newURL {
[NSApp beginSheet:newURLWindow forModal:window modalDelegate:self didEndSelector:NULL contextInfo:nil];
[NSApp runModalForWindow:newURLWindow];
[NSApp endSheet:newURLWindow];
}

- (IBAction)urlFieldAction:(id)s {
[web takeStringURLFrom:s];
}
Help!
Hasan Diwan {http://ibn.com/~hdiwan}
OpenPGP Fingerprint: 275D 0E84 550C D92A 4A56 732C 8528 2579 E6E9 4842
_______________________________________________
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: Multiple Nibs help?
      • From: Ambroise Confetti <email@hidden>
    • Re: Multiple Nibs help?
      • From: Amul Goswamy <email@hidden>
  • Prev by Date: Your 15 Seconds of Translation Fame
  • Next by Date: Re: Multiple Nibs help?
  • Previous by thread: Re: Loading a TTF font
  • Next by thread: Re: Multiple Nibs help?
  • Index(es):
    • Date
    • Thread