• 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: cocoa-dev digest, Vol 2 #1476 - 12 msgs
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: cocoa-dev digest, Vol 2 #1476 - 12 msgs


  • Subject: RE: cocoa-dev digest, Vol 2 #1476 - 12 msgs
  • From: email@hidden
  • Date: Mon, 4 Nov 2002 12:03:52 +0100

>Message: 4
>Date: Sun, 3 Nov 2002 21:47:55 +0100
>Subject: end of sheet and re-activationg window
>From: Yann Bizeul <email@hidden>
>To: email@hidden
>
>Hi there,
>
>I have a little problem using alert sheet : All works fine but when I
>clic "OK" to close the sheet, the window does not seem to come back in
>front, their buttons are gray, and the textField I just hilighted is
>gray.
>It seems makeKeyAndOrderFront does not activate the window ? Or this
>action occures before the sheet is closed, but it should not...
>
>Thanks !
>
> if ([ tunnelNames itemWithTitle: [ tunnelName stringValue ]] !=
>nil )
> {
> NSBeginAlertSheet(
> NSLocalizedString(@"This tunnel name already
>exists",@"Errors"),
> // sheet message
> @"OK", // default button label
> nil, // alternate button label
> nil, // no third button
> prefWindow, // window sheet is attached
>to
> self, // we'll be our own delegate
> @selector(sheetDidEnd:returnCode:contextInfo:),
> // did-end selector
> NULL, // no need for did-dismiss
>selector
> nil, // context info
> @"",
> // additional text
> nil);
> return;
> }
>
>- (void)sheetDidEnd: (NSWindow*)sheet returnCode: (int)returnCode
>contextInfo: (void*)contextInfo
>{
> [ prefWindow makeKeyAndOrderFront: self ];
> [ tunnelName selectText:self ];
>}
>--
>Yann BIZEUL
>LINAGORA
>30, rue Saint-Augustin
>75002 Paris
>
>Til. 01 58 18 68 35
>Std. 01 58 18 68 28
>Mob. 06 60 43 00 88
>
>--__--__--

You simply close the sheet with [sheet close] in the delegate method.
_______________________________________________
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.

  • Prev by Date: Re: NSOutlineView and tool tips
  • Next by Date: Re: don't understand -[MyDocument init]
  • Previous by thread: Re: NSOutlineView and tool tips
  • Next by thread: Re: don't understand -[MyDocument init]
  • Index(es):
    • Date
    • Thread