data validation and data format
Pablo,
Quote:
> 1) I have a numeric data , how can I validate that the user input have
a
> certain format : (by example ->>>,>>9.99).
> 2) In a String data how can i define a mask : 'XXX-XXXXX-XXX' .Or if I
> have a mask : 'AAAAA-AAAAAA' how can i validate that the
> input characters are all alfabetic ones?.
I can't really help much but a few pointers.
Have a look on the WIKI for "DolphinGoodiesValidation" from Kai Bollert and
Juergen Albertson. It's a bit old now but it might help.
To receive a notification from a text entry field set the #updatePerChar
aspect to true and check the field after every keypress. You'll have to do
your own pattern matching though.
For numeric fields you can set the #isNumeric aspect to true to only allow
digits.
For Dialogs overriding #ok and not allowing the Dialog to close (just return
rather than doing "super ok") is probably the easiest way to validate whole
dialogs.
Quote:
> 3) If I have a Object by example a Item for Sell and this item have a
> Supplier. I need to define in the Item an attribute idSupplier the same as
> in Relational DataBase applications or , like I prefer , can I define
> supplier as an attribute and have the supplier (the object) referenced in
> item ? . In that case, how can i do
> the data input for this attribute ( supplier )? I need to define a combo
or
> a list with all the suppliers ? . If the item exists , how can I show the
> supplier for the item?
> i think a Combo where the selection is open over the correct supplier is
the
> solution.
It's very difficult to say much without knowing the what you are trying to
do and how the rest of the application works. It does sound like you should
investigate ChoicePresenters though which enable you to display and choose
from a list.
Ian