• 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: Subclass EO class to conditionally return values
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Subclass EO class to conditionally return values


  • Subject: Re: Subclass EO class to conditionally return values
  • From: Art Isbell <email@hidden>
  • Date: Tue, 7 Feb 2006 09:44:34 -1000

On Feb 7, 2006, at 9:09 AM, John Huss wrote:

Yeah, I'm just subclassing in code. I don't need to add any data, just override one method (hopefully).

In your Application constructor, add:

NSNotificationCenter.defaultCenter().addObserver(this, new NSSelector("entityDidLoad", new Class[] {NSNotification.class}), EOModel.EntityLoadedNotification, null);

	In your Application class, add:

	public void entityDidLoad(NSNotification aNotification) {
		super.entityDidLoad(aNotification);
		EOEntity entityL = (EOEntity)aNotification.object();
		String entityNameL = entityL.name();

		if (entityNameL.equals(yourEOModelClassName)) {
			entityL.setClassName(yourEOSubclassName);
		}
	}

Aloha,
Art

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Frontbase Synchronize Schema in EOModeler
      • From: "John Huss" <email@hidden>
References: 
 >Re: multi user increment (From: Mohapatra Ashish <email@hidden>)
 >Subclass EO class to conditionally return values (From: "John Huss" <email@hidden>)
 >Re: Subclass EO class to conditionally return values (From: Kieran Kelleher <email@hidden>)
 >Re: Subclass EO class to conditionally return values (From: "John Huss" <email@hidden>)

  • Prev by Date: Re: Subclass EO class to conditionally return values
  • Next by Date: WebObjects webmail client
  • Previous by thread: Re: Subclass EO class to conditionally return values
  • Next by thread: Frontbase Synchronize Schema in EOModeler
  • Index(es):
    • Date
    • Thread