On Wed, Mar 10, 2010 at 4:17 AM, dtrussardi@tiscali.it <dtrussardi@tiscali.it> wrote:
Hi John,

thanks, 

i have initialize the instance indirizzoMemo and this error is eliminated.

I have another question based on this model.

If descriptionIndirizzoMemo is set with beReadOnly,

 when display the MAAccountModel new  asComponent the descriptionIndirizzoMemo fields is readonly ( it's ok ) .

The problem is when submit the form because the container erase the errors relative to the  descriptionIndirizzoMemo fields condition.


But it's readOnly and d'ont do any control on it. 

Or not ?

I am unsure why you would want it to be read only AND be required. These conditions conflict. Unless the object in the instance var has all its details already filled in from somewhere  else and you only want the user to view them? Otherwise, maybe you want to programmatically change the description to be writable at some point.... you can do that by sending beWriteable to the description.

Good luck
John



Thanks, 

Dario


Hello Dario,
You have to initialize that instance variable indirizzoMemo (otherwise there is really nothing to edit, no?)
You can do this most easily by adding it as a default for the MAAccountModel>>descriptionIndirizzoMemo description:

default: MAIndirizzoModel new;


HTH
John

On Tue, Mar 9, 2010 at 11:56 AM, dtrussardi@tiscali.it <dtrussardi@tiscali.it> wrote:
Hi,

i work with Magritte-Model-lr.394 on pharo.

I have a MAAccountModel with descriptionCodice and descriptionIndirizzoMemo.

The last is defined as:

 descriptionIndirizzoMemo
 ^ (MAToOneRelationDescription new)
               componentClass:    MAInternalEditorComponent ;
               classes: (Array with: MAIndirizzoModel);
               selectorAccessor: 'indirizzoMemo';

               label: 'Indirizzo';
               comment: 'Indirizzo di riferimento';
               priority: 220;
               "beReadonly;"
               yourself

Now MAIndirizzoMemoModel is defined with some other description:

       descrptionCitta
       descriptionNumero

       and other description.

( You can load the file mcz. )


Now when open:           MAAccountModel new  asComponent

 i found the error:

       MessageNotUnderstood: receiver of "isMultipart" is nil


       isMultipart
       ^ self children anySatisfy: [ :each | each isMultipart ]


The error is erase only with componentClass set to :    MAInternalEditorComponent.

Any considerations ?

Thanks,
               Dario
_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki



--
http://jmck.seasidehosting.st
_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki


_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki



--
http://jmck.seasidehosting.st