• 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: Webobjects design: multiple editing contexts
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Webobjects design: multiple editing contexts


  • Subject: Re: Webobjects design: multiple editing contexts
  • From: Ken Anderson <email@hidden>
  • Date: Tue, 24 Mar 2009 09:41:57 -0400

Mark,

I pass editing contexts through components all the time - it's a nice clean way of having a set of components work in a context mode, and it's really the only clean way I can think of. Of course, you could just ask the EO that you pass down (presumably to edit the same object or children) for the context, but I find passing it down explicitly to be cleaner.

You could always use children if you have sub-editing to do where you don't want it to affect the parent until you're done - but I find that I seldom have that type of situation (usually, the user wants to cancel the whole thing, not just a part of an edit).

Ken

On Mar 24, 2009, at 8:44 AM, Mark Wardle wrote:

Hi all.

I'm pretty happy with the mechanics of WO now... but I sometimes feel
I'm "doing the wrong thing" in some aspect of design/architecture.

I am making the leap to using multiple editing contexts (using PW).
I'm using component actions exclusively at present.

When is the appropriate time to create an editingcontext - within a
component's constructor? If so, is it appropriate to pass a handle to
the editingcontext between components? For example, I have a UserEdit
component, that takes a User as a binding, and allows a user to edit
that user's details (subject to permissions). At present, I have a
constructor that creates a new editingcontext, and any setters that
use EOs are careful to get a copy of the EO in the correct
editingcontext.

What if I then have subcomponents that need to use the parent editing
context? Is it appropriate to get the parent's editingcontext from the
EO itself?

Once I start thinking about that, it looks like I'm writing lots of
code which is fairly repetitive and thought that there must be a
better way? Am I missing something obvious? I don't want to make
things highly modal, and I usually don't wish to preserve state
between components unless the user specifically requests it.

Any design tips gratefully received!

--
Dr. Mark Wardle
Specialist registrar, Neurology
Cardiff, UK
_______________________________________________
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

_______________________________________________ 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
References: 
 >Webobjects design: multiple editing contexts (From: Mark Wardle <email@hidden>)

  • Prev by Date: Re: Webobjects design: multiple editing contexts
  • Next by Date: Re: Webobjects design: multiple editing contexts
  • Previous by thread: Re: Webobjects design: multiple editing contexts
  • Next by thread: Re: Webobjects design: multiple editing contexts
  • Index(es):
    • Date
    • Thread