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
--
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.
Hi,
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.
Bye
--
Damien Cassou
http://damiencassou.seasidehosting.st
Hi All,
I noticed that in Pillar-Model-DamienCassou.88 there was a refactor that introduces traits into the project...
Refactor parameter management
- Move parameter-related methods from PRLink/PRScript to PRTParametrizable
- Extract parameter-related parsin to PRParameterParser
As nice as traits are, this makes Pillar and things that depend on it, like Pier, less cross platform.
Given the ideal would of maintaining as much cross-platform-abiltty as possible, would you prefer we create multiple code bases for Pillar/Pier, or refactor this refactor in preference to making the project available in other dialects of Smalltalk, notably GemStone?
I seem to remember there was a rumour that GemStone will support traits in the future, so it’s likely we’ll have the option to shift to traits in the future.
I have an old project using Pier in GemStone that I’m starting to upgrade, so my motivation here is to know what direction the Pillar/Pier team would prefer to take, then jump on board with whichever direction you choose.
Please chime in with any thoughts. What are your preferences for moving forward?
Cheers,
J
I have a default Magritte edit form for a model that maintains a relation
to a single instance of GeoLocation, a model object with two instance
variables: longitude and latitude. The relation is defined as a
MAToOneRelationDescription.
On the form, the instance of GeoLocation is displayed as the integer of the
longitude attribute, however I want a representation like:
lon: 12.67, lat: 34.09
I looked at MAToOneRelationDescription and its superclass
MAElementDescription implements a #display: method which either accepts a
symbol or a block to customize the display. I've implemented a #printString
method with GeoLocation and passed that to the relation description as:
display: #printString
and
display: [ :anObject | ^ anObject printString ]
But as far as I can tell both the symbol and the block get ignored when
displaying the GeoLocation instance in the Magritte form.
What should I change to get the required display?
Thanks,
Roger
I'd like to make the above change - any objections?
For simplicity's sake, I was considering simply modifying the 330 baseline
to add it to the default group, even though modifying released config
methods is frowned upon in general...
-----
Cheers,
Sean
--
View this message in context: http://forum.world.st/Load-Morphic-By-Default-for-SqueakCommon-tp4829633.ht…
Sent from the Magritte, Pier and Related Tools mailing list archive at Nabble.com.
Hi,
How do I process a click on a Save button with a Magrite built form? Using
a manually created Seaside form I would register a callback, like:
html anchor
cssClass: 'btn btn-success';
callback: [ self save ];
with: 'Save'
I understand that Magritte doesn't work directly on my model objects but
rather with Mementos to process changes. I browsed the class hierarchy of
MAMemento however it's not obvious how to make this work with my model.
I use Voyage to persist my model objects in a Mongo database, so my model
objects respond to the #save message. Ultimately I need to execute that
method to persist changes.
I suspect I need to implement a custom Memento subclass and somehow tie
that to my model object but I'm not sure that is the right way. Maybe
someone can shed some light on this? I've tried reading up on this but the
various bits of documentation I found were lacking code samples.
Thanks.
Roger
Hi,
I'm trying to get an HTML form working for a model object using Pharo 4 and
Seaside 3.
The model is a simple Address class with 3 instance variables: street,
postCode and town. I have added the Magritte description methods like so:
magritteDescriptionPostCode
<magritteDescription>
^ MAStringDescription new
accessor: #postCode;
label: 'Postcode';
priority: 250;
yourself
The form is a subclass of WAComponent. It has the following method:
renderContentOn: html
( Address new asComponent
addValidatedForm: { #save -> 'Save'. #cancel -> 'Cancel' };
yourself ) renderContentOn: html
The form displays in the browser but has no Save / Cancel buttons and the
form tags are missing as well.
What am I missing?
Thanks for your help.
No problem! Think like this happen easily.
Yeah that's right. I think I know where is the error. I'll correct
that tomorrow if I have time.
Thank you for your feedback!
On 25 May 2015 at 04:03, Johan Fabry <jfabry(a)dcc.uchile.cl> wrote:
>
> Aah silly me, I still had the old version of Pillar. Many apologies!
>
> Now it works, but I found a bug: do a find for ‘shown in Section 5.3.3’ in the same html file. The section title there is V.3.C. So it should say ‘shown in Section V.3.C.’, right?
>
>> On May 24, 2015, at 22:17, Cyril Ferlicot <cyril.ferlicot(a)gmail.com> wrote:
>>
>> Hi,
>> 2 possibility:
>> - You have an old version of Pillar
>> - You check the wrong file.
>>
>> With the version 0.47 of Pillar we changed the way files was generated.
>> Before if you had a file foo.pillar exported foo.pillar.html
>> but since the version 0.47 you get foo.html only.
>>
>> So check if you have a file "Fuel.html" and if you don't have it just
>> execute ./download.sh before the ./compile.sh
>>
>> You should get that :
>> https://ci.inria.fr/pharo-contribution/view/Books/job/EnterprisePharoBook/l…
>>
>> :)
>
>
>
> ---> Save our in-boxes! http://emailcharter.org <---
>
> Johan Fabry - http://pleiad.cl/~jfabry
> PLEIAD lab - Computer Science Department (DCC) - University of Chile
>
>
--
Cheers
Cyril Ferlicot
Hi,
2 possibility:
- You have an old version of Pillar
- You check the wrong file.
With the version 0.47 of Pillar we changed the way files was generated.
Before if you had a file foo.pillar exported foo.pillar.html
but since the version 0.47 you get foo.html only.
So check if you have a file "Fuel.html" and if you don't have it just
execute ./download.sh before the ./compile.sh
You should get that :
https://ci.inria.fr/pharo-contribution/view/Books/job/EnterprisePharoBook/l…
:)
On 25 May 2015 at 03:10, Johan Fabry <jfabry(a)dcc.uchile.cl> wrote:
>
> Cyril, thanks for doing all of this, but now the links seem to be broken, at least for the html export on my machine. :-( I am working on the Fuel chapter, and I see that inter-file links are broken in the first paragraph, and intra-file links are broken e.g. figure 6.1. Example of changes to a class.
>
> Could you have a look? The pillar file is in github, the Fuel.pillar.html result of ./compile.sh is here:
> https://dl.dropboxusercontent.com/u/31426460/Fuel.pillar.html
>
> Thanks in advance!
>
>> On May 22, 2015, at 18:12, Cyril Ferlicot <cyril.ferlicot(a)gmail.com> wrote:
>>
>> I already changed the links on Enterprise Pharo (you can find a table
>> with the list of the inter-files links on the README.md)
>>
>> On last thing for the people who write book for SquareBracketAssociates:
>> It would be good to have some conventions, so if you create anchors
>> use this form :
>> @sec:nameOfSection for a section
>> @cha:nameOfTheChapter for a title of chapter
>> @fig:nameOfFigure for a figure
>> @spt:nameOfTheScript for a script
>
>
>
> ---> Save our in-boxes! http://emailcharter.org <---
>
> Johan Fabry - http://pleiad.cl/~jfabry
> PLEIAD lab - Computer Science Department (DCC) - University of Chile
>
>
--
Cheers
Cyril Ferlicot
Hello,
today I created the version 0.56 of Pillar and with this version we'll
need to do some changes, sorry.
The first change is the numerator. The old numerator was too limited,
so i changed it. Now if you put different files into the pillar.conf
the numerator will not be reset at each files.
The parameters 'startNumberingAtHeaderLevel:' and
'stopNumberingAtHeaderLevel:' are replace by 'level1:', 'level2:',
'level3:', 'level4:', 'level5:'.
For now they can take 3 sub-parameters: 'numbering', 'size' and 'renderAs'.
numbering: a boolean that say if this header level need to be take in
account by the numerator.
size: the number of level we want to render. You can put numbering at
true and size at 0 if you want your numerator to be reset at a level
without rendering the number of this level.
renderAs: can be number, roman, letter or upperLetter.
Example:
pillar.conf:
{
'level1': {
'numbering': true,
'size': 1,
'renderAs': 'roman'
},
'level2': {
'numbering': true,
'size': 2,
'renderAs': 'number'
},
'level3': {
'numbering': true,
'size': 1,
'renderAs': 'upperLetter'
},
'level4': {
'numbering': true,
'size': 2,
'renderAs': letter
},
'level5': {
'numbering': false
},
}
document.pillar:
! Example
!! Introduction
!!! Beginning
!!! Example - Intro
!!!! Example 1
!!!! Example 2
!!!!! With X
!!!!! With Y
!! Explanation
Result:
I. Example
I.1. Introduction
A. Beginning
B. Example - Intro
B.a. Example 1
B.b. Example 2
With X
With Y
I.2. Explanation
In the future we could also add feature like 'delimiter'.
The second main change is the Internal Links.
Now when you want to reefer to an anchor, a figure or a script you'll
need to use *@anchor* instead of *anchor*.
I'm sorry for that but that's the easiest way to implement the
inter-files links.
And so the last main change is the Inter-files links !
Imagine you're writing a book.
You have a directory 'Chapter1' which contains the file
'chapter1.pillar' and a directory 'Chapter2' with a file
'chapter2.pillar'.
If you want to make a reference to the chapter 1 in the chapter 2 you
can create an interfile link you can now use the syntax:
*../Chapter1/chapter1.pillar*
But be careful ! Remember that pillar can export in different format.
And you can export a group of file as separate output files or as one
file.
So if you don't use an Alias your link will not be render if you
export as one output file in LaTeX. And if you export in LaTeX or HTML
or Markdown as one output file and you don't have an anchor on your
link, the link will be vanish.
So I recommend to use inter file links like this:
*Chapter 1>../Chapter1/chapter1.pillar@cha:chapter1*
when cha:chapter1 is an anchor you need to create at the beginning of
the chapter 1.
I already changed the links on Enterprise Pharo (you can find a table
with the list of the inter-files links on the README.md)
On last thing for the people who write book for SquareBracketAssociates:
It would be good to have some conventions, so if you create anchors
use this form :
@sec:nameOfSection for a section
@cha:nameOfTheChapter for a title of chapter
@fig:nameOfFigure for a figure
@spt:nameOfTheScript for a script
--
Cheers
Cyril Ferlicot