• 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: Object Oriented Subclassing Question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Object Oriented Subclassing Question


  • Subject: Re: Object Oriented Subclassing Question
  • From: Chuck Hill <email@hidden>
  • Date: Sat, 06 Mar 2004 11:32:17 -0800

Two thoughts, without seeing the rest of the class:

1. Perhaps those ought to be bindings?

2. Public ivars are sort of OK with WOComponents *provided that* you only
reference them in the WOD file and never in code.  Otherwise, for
sub-classing and code referenced abstract the concept:

private PortfolioRole newItem;

public PortfolioRole newItem() {return newItem; }
public void setNewItem(PortfolioRole newRole) { newItem = newRole; }

The sub-classes can override the implemention of these methods without
affecting the abstract concept of the newItem of the component.  Likely you
will also want to use a less specific class than PortfolioRole such as Role
or just plain old Object.


Chuck

At 01:18 PM 06/03/2004 -0600, James Cicenia wrote:
>>>>
Hello -

I have a component called EditLists and I want to subclass it
for each of my lists.  i.e. EditRoles, EditSystems, etc.

at the top of my EditLists class I have:

	/** @TypeInfo eo.PortfolioRole */
	public PortfolioRole newItem;
	public PortfolioRole theItem;
	public String QUERY_DELETE_VALUE = "rosterMembers.role.value";
	public String QUERY_OBJECT = "PortfolioRole";


Can I override those public variables? It seems I can't. My component
thinks the subclass is actually the superclass. Newbie OO question I
am sure, but would like to understand this pattern a bit more.
I just need to change those and everything should work great.

-James Cicenia



_______________________________________________
WebObjects-dev mailing list
email@hidden
http://www.omnigroup.com/mailman/listinfo/webobjects-dev
<<<<


--

Chuck Hill                                 email@hidden
Global Village Consulting Inc.             http://www.global-village.net
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: Object Oriented Subclassing Question
      • From: James Cicenia <email@hidden>
References: 
 >Object Oriented Subclassing Question (From: James Cicenia <email@hidden>)

  • Prev by Date: Object Oriented Subclassing Question
  • Next by Date: Re: Object Oriented Subclassing Question
  • Previous by thread: Object Oriented Subclassing Question
  • Next by thread: Re: Object Oriented Subclassing Question
  • Index(es):
    • Date
    • Thread