• 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
[Q] Cocoa newbie question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Q] Cocoa newbie question


  • Subject: [Q] Cocoa newbie question
  • From: Steve Christensen <email@hidden>
  • Date: Wed, 10 Dec 2003 17:50:35 -0800

First off, excuse me if I've missed something basic, but I've finally got 'round to reading up on Cocoa and am trying to get my head around some of the concepts...

I've been playing around writing some small apps to try stuff out. I did a custom about box (i.e., call my own code instead of calling -orderFrontStandardAboutPanel) and noticed that the Print item was enabled. I fixed it easily enough by writing my own -respondsToSelector and returning NO for that case, but it got me to wondering about something. If I was writing a C++ based app, I'd subclass the window class with a "non-document" class that didn't allow printing, and then subclass that class to handle the specifics for different types of windows. Is that the best way to do it for Cocoa/Obj-C, i.e.,

NSWindow -> NonDocumentWindow -> AboutBoxWindow
NSWindow -> NonDocumentWindow -> PreferencesWindow

etc.? Or is there a "better practices" way of doing it that I haven't yet figured out?

Thanks,

steve
_______________________________________________
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: [Q] Cocoa newbie question
      • From: Sherm Pendley <email@hidden>
  • Prev by Date: Re: Freelance apple developers
  • Next by Date: Re: reading XML in Cocoa ?
  • Previous by thread: Addendum: Problem with NSOutlineView::shouldSelectItem: and NSRunCriticalAlertPanel
  • Next by thread: Re: [Q] Cocoa newbie question
  • Index(es):
    • Date
    • Thread