Re: triggering error messages after data edits
Re: triggering error messages after data edits
- Subject: Re: triggering error messages after data edits
- From: Art Isbell <email@hidden>
- Date: Wed, 7 Jan 2004 09:01:14 -1000
On Jan 7, 2004, at 12:12 AM, Alexander Spohr wrote:
> put all your messages into one NSDictionary with keys like
> "isFirstNameCorrect".
> then it should be enough to hook up a WOConditional to that dict.key.
>
> you can pump out those messages then by connecting a WOString to that
> same dict.
I've done something similar by defining a mutable dictionary of
mutable dictionaries, validationFlags:
validationFlags =
{
propertyName0 =
{
Failed = <Boolean>;
Message = <String>;
};
...
Other =
{
Failed = <Boolean>;
Message = <String>;
};
}
Using key value coding, this data structure can easily be associated
with various dynamic element keys:
value = validationFlags.fooProperty.Message;
Maintaining this data structure is not trivial, however.
Aloha,
Art
[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
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.