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
^ 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...
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.
is there any photo gallery available for Pier? I mean a widget where I
could upload pictures and they are rendered in a nice way. I started
one 4 years ago but I abandoned it.
I have just uploaded a new config, and called it version 3.5.2.
Split out Trait extensions FileSystem/Directory detection and load only when supported.
- Traits are supporten in Pharo and Squek (but only when loaded).
- FileSystem is in all newer Pharo but could be loaded in Pharo 1.0 and Squeak, GemStone and Squeak have FileDriectory by default'
This makes it possible to properly load in Squeak and neatly have the dependencies more "capability"-based.
This is because Squeak can live with and without Traits or FileSystem.
Another goal was to Un-break GemStone a bit more, but not too much progress here.
The effect is that the tests for the external file model are now centralized, and the implementation in
Magritte-FileDirectory (for Squeak/GemStone), Magritte-FileSystem (for squeak, pharo-1 and pharo-2), and (traditional way) Magritte-Pharo3-Model).
If this is not to your liking, please tell and I'll reverse this.
Also, I found a problem with using DateAndTime as timestamp 'backend' in Pharo.
The problem is, that we loose information, should ever a DateAndTime be used that uses a local offset, and, sadly, that is almost every one.
Here's a snipped to illustrate:
|d t tz text |
tz := DateAndTime localTimeZone.
[d := MATimeStampDescription new
accessor: MANullAccessor new;
t := GRPlatform current magritteTimeStampClass current.
text := d toString: t.
DateAndTime localTimeZone: (TimeZone offset: -8 hours name: 'Pacific Standard Time' abbreviation: 'PST').
(d fromString: text) = t
] ensure: [ DateAndTime localTimeZone: tz ].
You will get false, but we want true.
Sadly, this also holds for Squeak.
We could force a timeszone designator at the end of the to-string-converted version (like this
self stream print: self object asDate; space.
self stream print: self object asTime; space.
(self object offset ~= Duration zero)
ifTrue: [self stream
nextPut: (self object offset positive ifTrue: [$+] ifFalse: [$-]);
nextPutAll: (self object offset hours abs asString padLeftTo: 2 with: $0);
nextPutAll: (self object offset minutes abs asString padLeftTo: 2 with: $0)]
ifFalse: [self stream nextPut: $Z]
) which would fix it for pharo.
But i really think that it would be better to force an ISO format, which should have explicit timezone (or 'Z' for that matter).