> It is definitely not a conversion method, the resulting
> description is completely independent from the receiver of
> the message: it can be recomposed, reused with or without any
> other model instance. What is more, have you ever seen an
> #asClass conversion method to ask your instance for its
> meta-representation (#class)?
>
> Lukas
>
> --
> Lukas Renggli
> http://www.lukas-renggli.ch
Hmm.. that's a good point. My inclination is to toss the word meta in
there somewhere, it is after all metadata, but you already said you were
avoiding that. It's not that big a deal I guess, I just wanted to raise
the issue since it was a problem for me. I still think description is
far to useful an accessor in "any" problem domain to use it as an
extension on Object, I'd at least call it descriptor, but I'm not
complaining. I love the framework man, keep up the great work, I check
for updates daily and have learned quite a bit about Smalltalk style
from reading your code.
> >Honestly, maybe it's a culture difference, but damned if I
> don't have a
> >description accessor on tons of my domain objects, summary
> doesn't feel
> >right to me. I was just thinking something that's less common than
> >description, that's just so generic a term and so common for an
> >accessor. Even something similar that is more behavioral
> sounding like
> >descriptor, or, really, a conversion method like asDescrition or
> >asDescriptor rather than just description. It's not really
> an accessor
> >anyhow, it's building a description of the object and
> returning it as a
> >container, so a conversion method seems reasonable. Thoughts?
> >
> >
> How about #descriptions which is a common naming for
> collections of anything ?
I would even prefer that, since I don't see myself as having collisions
with it, but I really do feel it should be a conversion method. When
you want a component, you say anObject asComponent, when you want a
description, why not anObject asDescription? The description isn't a
property of the object, it's a different representation of it, a meta
representation.
>
> Do you have a better suggestion on how to name it?
>
> I was looking for a word that does not include 'meta' as a
> substring (I think it is already used too often in different
> contexts) and that reads well and tells what it is used for.
> #description was the best thing I could find.
>
> In real live I only observed once having an accessor that was
> called #description and then I could change that together
> with the author to be something like #summary. I think every
> method extension sooner or later conflicts with existing software.
>
> Another thing, probably out-of-topic in this thread, is how
> you should call accessors, if you have an object referencing
> an external description, such as MAValidationError. I simply
> called it #description, even-tough this description does not
> describe the receiver. I probably should have called it
> #actualDescription or #targetDescription or
> #externalDescription or ... I was too lazy at the moment.
> However this problem stays the same, even if I replace the
> #description-prefix with any other.
Honestly, maybe it's a culture difference, but damned if I don't have a
description accessor on tons of my domain objects, summary doesn't feel
right to me. I was just thinking something that's less common than
description, that's just so generic a term and so common for an
accessor. Even something similar that is more behavioral sounding like
descriptor, or, really, a conversion method like asDescrition or
asDescriptor rather than just description. It's not really an accessor
anyhow, it's building a description of the object and returning it as a
container, so a conversion method seems reasonable. Thoughts?
> Yep, that's true. MAClassDescription expects a class. I have
> never put a single description into a
> MASingleOptionDescription yet, so I didn't encouter this problem yet.
>
> I don't know, but I would try
>
> descriptionProject
> ^(MASingleOptionDescription selector: #project label: 'Project'
> priority: 10)
> reference: TMProject description;
> options: (MADynamicObject on: [ TMProject repository
> asArray]);
> beRequired; beSorted ;
> yourself
>
> Else a possibility might be to create a new description, say
> a null- object pattern MAUnknownDescription that wouldn't
> validate the referenced object.
>
That solution works well, thanks much. Though, I do want to mention,
it's always bothered me that you chose description as an accessor for
getting at the metaModel, since description is probably one of the most
used accessors to put onto a domain object, along with name. I think
description is too generic and useful a term to use it as an extension
to the instance side of Object, what do you think?
Hi
After checking several times I think theres a problem in WAAnchorTag
>> #goto and not my code:
Setps to reproduce
- go on a page like /Information/Syntax
- look at the urls of liks to structures (or commands), for a link to
/Information/License it should look about like this:
http://127.0.0.1:9090/seaside/pier/Information/Syntax/Information/License....
- note that both the current and target structure are encoded in the url
- wait for a session timeout and click the link (or remove all
parameters from the url and go there), you will get an exception that
there is no
/Information/Syntax/Information/License structure
the problem is that
canvas context actionUrl
already contains the "url" to the current structure
eg '/seaside/pier/Information/Syntax' and to that the path of the
target structure gets appended.
Cheers
Philippe
Oops, ignore my last, I read your response too fast and didn't notice
you were correcting yourself.
> -----Original Message-----
> From: owner-smallwiki(a)iam.unibe.ch
> [mailto:owner-smallwiki@iam.unibe.ch] On Behalf Of Lukas Renggli
> Sent: Monday, November 28, 2005 9:46 AM
> To: smallwiki(a)iam.unibe.ch
> Subject: Re: Magritte Validation Error
>
> > Yep, that's true. MAClassDescription expects a class. I
> have never put
> > a single description into a MASingleOptionDescription yet,
> so I didn't
> > encouter this problem yet.
>
> Err, never put a *domain-object* into a single-description ;-)
>
> --
> Lukas Renggli
> http://www.lukas-renggli.ch
>
>
>
> Err, never put a *domain-object* into a single-description ;-)
>
Why not? It's a common need, can't just hardcode lists of strings and
symbols, is there some other descriptor for creating dropdown lists that
works with domain objects?
Hi,
here is a simple code to add a 'remove' button on MAOneToManycomponent.
Bye
'From Squeak3.8 of ''5 May 2005'' [latest update: #6665] on 24 November 2005 at 4:41:36 pm'!
!MAOneToManyComponent methodsFor: 'private' stamp: 'dc 11/24/2005 16:10'!
buildReport
^ (MAReport rows: self value description: self reference)
addColumn: (MACommandColumn new
addCommandOn: self selector: #remove: text: 'Remove';
yourself);
yourself! !
'From Squeak3.8 of ''5 May 2005'' [latest update: #6665] on 24 November 2005 at 4:42:43 pm'!
!MAOneToManyComponent methodsFor: 'actions' stamp: 'dc 11/24/2005 16:34'!
remove: anElement
self report rows
remove: anElement! !
Hi
I have an object (a command) that references some other object (a
model object). Instead of copying all descriptions on the class side I
use a MAOneToOneRelationDescription (I guess I'll have to make a copy
for editing so it works with the persistence). This works so far but
I'd like to flatten the editor component to that the fields of the
referenced object are mixed with those of the referencing object.
The description looks something like this:
descriptionItem
^ (MAOneToOneRelationDescription selector: #item label: 'Rule' priority: 100)
componentClass: MAInternalEditorComponent;
classes: (Array with: SVACLItem);
yourself.
And the output like this
http://img121.imageshack.us/my.php?image=nesteddescription3jp.png
What I'd like is the 'Rule' label to disappear and the 'Principal'
'Allow' and 'Command' fields instead appear on its level.
Did I express myself in an understanable way? Do I even use the
correct approach?
Cheers
Philippe
Hi
Because of some problems, I just wanted to ask if
self error: aMessage
is still the way to signal invalid input in a pier command in the
#doValidate method.
Cheers
Philippe