• 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: Validating in a subcomponent (reusable component)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Validating in a subcomponent (reusable component)


  • Subject: Re: Validating in a subcomponent (reusable component)
  • From: Arturo Pérez <email@hidden>
  • Date: Fri, 10 Oct 2003 14:08:02 -0400

On Friday, October 10, 2003, at 01:57  PM, Chuck Hill wrote:

Hi Arutro,

Arturo Pirez wrote:

I'm seeing strange behavior if I throw a NSValidation.ValidationException from a subcomponent/reusable component.
>
What sort of strange behavior?  Which phase is it being throw from?

Essentially the exception seems to go nowhere. I see the exception logged to the console but the parent
never seems to get it. That log statement thats output is not in my code; i.e. seems to be in the
bowels of the framework(s) somewhere. The parent's validationFailedWithException never gets called. On
the other hand the request/response loop does seem to stop when the exception is thrown. So, for example,
the subcomponent can display an error message and changes to objects don't seem to be recorded.


Does anyone know if subcomponents can use that mechanism to report errors? Or is that an unsupported paradigm?
I'd think that they are only handled during the takeValues phase.

Is the subcomponent's takeValues() (for lack of better terminology) a nested loop within the parent's takeValues()?
Shouldn't that be where the validation logic happens? I guess I'm not really understanding what you're saying
above.



You could do something like call parent().validationFailedWithException directly. I've used that and also added a more extensive validation reporting mechanism when the situation called for it.

I wish I had thought of that! Thanks.

FWIW

Chuck
-------
WebObjects in Philadelphia.  You want a cheesesteak with that?
Visit http://webobjects.meetup.com
_______________________________________________
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: Validating in a subcomponent (reusable component)
      • From: Chuck Hill <email@hidden>
References: 
 >Re: Validating in a subcomponent (reusable component) (From: Chuck Hill <email@hidden>)

  • Prev by Date: Re: Validating in a subcomponent (reusable component)
  • Next by Date: Re: Rép : WebObjects and Panther
  • Previous by thread: Re: Validating in a subcomponent (reusable component)
  • Next by thread: Re: Validating in a subcomponent (reusable component)
  • Index(es):
    • Date
    • Thread