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 DTR-DTR.2.mcz (4K) Download Attachment |
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, [hidden email] <[hidden email]> wrote: Hi, -- http://jmck.seasidehosting.st _______________________________________________ Magritte, Pier and Related Tools ... https://www.iam.unibe.ch/mailman/listinfo/smallwiki |
In reply to this post by dtrussardi@tiscali.it
> 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 ? This looks like a bug in the Seaside 3 port of Magritte. Can you check if the following fix solves the problem? Name: Magritte-Seaside-lr.334 Author: lr Time: 9 March 2010, 7:24:18 pm UUID: 8a2ed7db-421a-4bdf-9235-73fcf29f50f4 Ancestors: Magritte-Seaside-lr.333 - fixed various Seaside 3 realted bugs to #isMultipart in MAFileUploadComponent - renamed #isMultipart to #requiresMultipartForm to be more intention revealing Lukas -- Lukas Renggli http://www.lukas-renggli.ch _______________________________________________ Magritte, Pier and Related Tools ... https://www.iam.unibe.ch/mailman/listinfo/smallwiki |
In reply to this post by John McKeon
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 ? Thanks, Dario Hello Dario, _______________________________________________ Magritte, Pier and Related Tools ... https://www.iam.unibe.ch/mailman/listinfo/smallwiki |
On Wed, Mar 10, 2010 at 4:17 AM, [hidden email] <[hidden email]> wrote:
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
-- http://jmck.seasidehosting.st _______________________________________________ Magritte, Pier and Related Tools ... https://www.iam.unibe.ch/mailman/listinfo/smallwiki |
Hi, i have another problem about MAInternalEditorComponent. I add condition to test right input data: descriptionIndirizzoMemo ^ (MAToOneRelationDescription new) componentClass: MAInternalEditorComponent ; classes: (Array with: MAIndirizzoModel); autoAccessor: 'indirizzoMemo'; label: 'Indirizzo'; comment: 'Indirizzo di riferimento'; priority: 220; beReadonly; addCondition: [:value | | path | path := value getPathIndirizzo. ((GMStaticMapGeocoding getGMapGeocodingFor: path) findTokens: #($,)) first asNumber = 200] labelled: 'Indirizzo non completo - valido'; yourself But the value is set to nil , too when the MAInternalEditorComponent subdata i set right. If the MAInternalEditorComponent subdata is right, i think the conditional value is set to the new value. Or i wrong? In alternative, how i can read, at this level, the MAInternalEditorComponent subdata ? Thanks, Dario
_______________________________________________ Magritte, Pier and Related Tools ... https://www.iam.unibe.ch/mailman/listinfo/smallwiki |
Free forum by Nabble | Edit this page |