• 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: duplicate help menu
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: duplicate help menu


  • Subject: Re: duplicate help menu
  • From: Ron Fleckner <email@hidden>
  • Date: Tue, 31 Jul 2007 08:44:15 +1000


On 31/07/2007, at 1:02 AM, Oscar Bascara wrote:

On 7/30/07, Ron Fleckner wrote:
Date: Sun, 29 Jul 2007 19:45:12 -0700
From: "Oscar Bascara"
Subject: duplicate help menu
To: email@hidden


In awakeFromNib for a controller object, I'm displaying a modal alert
dialog using NSRunAlertPanel(). During the dialog, there are two menu
in the menu bar, the Application menu and the Help menu, which seems
to get automatically generated. The problem is, the rest of the menus
are populated when the dialog closes, and I end up with two Help
menus. It would be nice to suppress the automatically generated Help
menu at the beginning. Any idea?


Thanks,
Oscar

Hi Oscar.

I'm not sure, but I think that running a modal alert from -
awakeFromNib isn't such a good idea.  I think the best place to do
this (if you actually think it's a good thing to start your app with
a modal alert) is in the app delegate method -
applicationDidFinishLaunching:.  You'd have to make your controller
object the delegate of NSApplication, which you can do in Interface
Builder.

Hope that helps

Ron


I'm using the modal alert during the first run of the application to show a license agreement. If the license agreement is accepted, the application finishes launching. Otherwise, the application exits. Also, I'm using the modal alert for a trial version message (e.g., "There are 10 days left in the trial version.").

After moving the modal alert from awakeFromNib to
applicationDidFinishLaunching:, I see the application window and menu
bar fully launched.  But I was hoping to show the modal alert before
all that.

What do people use to show the license agreement or other modal alerts
at the very beginning of an application (before it's done launching)?

Thanks,
Oscar


OK, of course, that's logical.  Sorry about the misunderstanding.

I did try running NSRunAlertPanel in -awakeFromNib and noted that the Help menu _didn't_ appear, only the application menu. That was in a small sand-pit type of project I keep around for trying out things like that. After dismissing the alert, the rest of the menu and app window appeared as normal. So maybe there's something else going on?

I'm on 10.4.10 PPC G4

Good luck,

Ron
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: duplicate help menu
      • From: "Oscar Bascara" <email@hidden>
References: 
 >Re: duplicate help menu (From: Ron Fleckner <email@hidden>)
 >Re: duplicate help menu (From: "Oscar Bascara" <email@hidden>)

  • Prev by Date: Re: NSColorWell, bindings, and multiple selection
  • Next by Date: Re: duplicate help menu
  • Previous by thread: Re: duplicate help menu
  • Next by thread: Re: duplicate help menu
  • Index(es):
    • Date
    • Thread