[Cuis-dev] Dialog molding tool

Juan Vuletich juan at cuis.st
Wed May 3 11:39:15 PDT 2023


Hi Hilaire,

I'm sure this will be useful for many projects. Thanks for doing it!

Cheers,

On 4/29/2023 4:43 AM, Hilaire Fernandes via Cuis-dev wrote:
>
> Hi,
>
> I have finished the first round of the package for GUI dialog molding 
> tool. It is a helper to build field Morph dialog and to validate user 
> input data.
>
> In top of the UI-Mold package there a the test package UI-Mold-Test.
>
> Checkout at https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-UI
>
> Example of field descriptions and inter-field validations:
>
> ...
>
> Smalltalk code to describe it:
>
>   |  mold fullname email confirmEmail|
>      mold  :=  Mold  new.
>      fullname  :=  mold  stringField
>          on:  #propertyValue  of:  ValueHolder  new;
>          label:  'Your Name';
>          beRequired;
>          addCondition:  [:input  |  input  includesSubString:  '']
>              labeled:
>                  [:wrong  |
>                  'Please enter your first and last name. I couldn''t find a space in {1}'  format:   {wrong} ].
>      email  :=  mold  emailField
>          on:  #propertyValue  of:  ValueHolder  new;
>          label:  'Email Address:'.
>      confirmEmail  :=  mold  emailField
>          on:  #propertyValue  of:  ValueHolder  new;
>          label:  'Confirm Email:'.
>      email
>          addCondition:  [:input  |  input  =  confirmEmail  input  ]
>          labeled:  'Email addresses did not match.'.
>      confirmEmail
>          addCondition:  [:input  |  input  =  email  input  ]
>          labeled:  'Email addresses did not match.'.
>      mold  textField
>          on:  #propertyValue  of:  ValueHolder  new;
>          label:  'About yourself.';
>          beRequired.
>      mold  checkboxField
>          on:  #propertyValue  of:  (ValueHolder  with:  true);
>          label:  'Sign for the newsletter';
>          addCondition:  [:input  |  fullname  isValid  not  or:  [input  or:  [fullname  value  first  =  $K  ] ] ]
>              labeled:  'Sorry, you may not opt out of our spam unless your name starts with K.'.
>      mold  openDialog:  'Example Eight'
>
> -- 
> GNU Dr. Geo
> http://drgeo.eu
> http://blog.drgeo.eu


-- 
Juan Vuletich
cuis.st
github.com/jvuletich
researchgate.net/profile/Juan-Vuletich
independent.academia.edu/JuanVuletich
patents.justia.com/inventor/juan-manuel-vuletich
linkedin.com/in/juan-vuletich-75611b3
twitter.com/JuanVuletich

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20230503/51e16612/attachment.htm>


More information about the Cuis-dev mailing list