Default labels

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Default labels

Sean P. DeNigris
Administrator
In cases where there is an MASelectorAccessor, I'd like to make the default label = `the accessor capitalized unCamelCased`. It seems the overwhelmingly common use case is `... #accessor: #dateCreated; #label: 'Date Created'`.

The current behavior is
    MADescription>>#label
        ^ self propertyAt: #label ifAbsent: [ self class defaultLabel ]
Is anyone using (or can state a plausible use case for) this subclass-customizable class-side #defaultLabel?

If no one is relying on the existing behavior, I'll make the change...
Cheers,
Sean
Reply | Threaded
Open this post in threaded view
|

Re: Default labels

otto
Great idea, thanks, will use it.

> In cases where there is an MASelectorAccessor, I'd like to make the default
> label = `the accessor capitalized unCamelCased`. It seems the overwhelmingly
> common use case is `... #accessor: #dateCreated; #label: 'Date Created'`.

We commonly do "Date created" though. Would be great if the
splitIntoWords / unCamelCase can be customisable...

> Is anyone using (or can state a plausible use case for) this
> subclass-customizable class-side #defaultLabel?

No, don't need it.

> If no one is relying on the existing behavior, I'll make the change...

Thanks

>
>
>
> -----
> Cheers,
> Sean
> --
> View this message in context: http://forum.world.st/Default-labels-tp4827879.html
> Sent from the Magritte, Pier and Related Tools mailing list archive at Nabble.com.
> _______________________________________________
> 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
Reply | Threaded
Open this post in threaded view
|

Re: Default labels

Sean P. DeNigris
Administrator
otto wrote
Great idea, thanks, will use it.
Okay, let me think about how to fit it into the design...
Cheers,
Sean
Reply | Threaded
Open this post in threaded view
|

Re: Default labels

Sean P. DeNigris
Administrator
In reply to this post by Sean P. DeNigris
Sean P. DeNigris wrote
> In cases where there is an MASelectorAccessor, I'd like to make the
> default label = `the accessor capitalized unCamelCased`. It seems the
> overwhelmingly common use case is `... #accessor: #dateCreated; #label:
> 'Date Created'`.
>
> The current behavior is
>     MADescription>>#label
> ^ self propertyAt: #label ifAbsent: [ self class defaultLabel ]

I finally implemented this in my GH fork. Feel free to poach (e.g. Stephan
for QCMagritte)!



-----
Cheers,
Sean
--
Sent from: http://forum.world.st/Magritte-Pier-and-Related-Tools-f115649.html
_______________________________________________
Magritte, Pier and Related Tools ...
https://www.list.inf.unibe.ch/listinfo/smallwiki
Cheers,
Sean