• 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
NSCreateCommand
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSCreateCommand


  • Subject: NSCreateCommand
  • From: "Jim O'Connor" <email@hidden>
  • Date: Sat, 23 Jul 2005 18:26:18 -0500

What do I need to do to subclass NSCreateCommand and get my subclass called?

Apparently it isn't as easy as changing sdef to:

<suite name="Standard Suite" code="????"
description="Common classes and commands for all applications.">


<!-- intervening lines deleted because they are uninteresting -->

<command name="make" code="corecrel" description="Make a new object.">
<cocoa class="MyCreateCommand"/>
<parameter name="new" code="kocl" type="type"
description="The class of the new object.">
<cocoa key="ObjectClass"/>
</parameter>
<parameter name="at" code="insh" type="location specifier" optional="yes"
description="The location at which to insert the object.">
<cocoa key="Location"/>
</parameter>
<parameter name="with data" code="data" type="any" optional="yes"
description="The initial contents of the object.">
<cocoa key="ObjectData"/>
</parameter>
<parameter name="with properties" code="prdt" type="record" optional="yes"
description="The initial values for properties of the object.">
<cocoa key="KeyDictionary"/>
</parameter>
<result type="specifier" description="to the new object"/>
</command>


With the relevant change being "MyCreateCommand" instead of "NSCreateCommand".

MyCreateCommand has its own init call, which is never called.

My reason for doing this is that I need to create documents in a way other than simply calling init on a document. I need to make the NSDocumentController create the standard untitled document.


Thanks,

Jim O'Connor


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: NSCreateCommand
      • From: Stephen McIntosh <email@hidden>
  • Prev by Date: Re: Security Framework - Save authentication
  • Next by Date: Simple noob question
  • Previous by thread: How to clean up the drag and drop in an outline view
  • Next by thread: Re: NSCreateCommand
  • Index(es):
    • Date
    • Thread