I'm trying to create a value link that can display a single command inside a document. But I struggled to create a proper link for the command. This seems only possible if you have a pier context and renderer at the same time which is not really the case as long as you are staying inside PRValueLink.
The only solution I could come up with is the following:
PRValueLink>>commandIn: aContext
<value: 'command' comment: 'Display command as link'>
(PRCommand withAllConcreteClasses
detect: [ :each | each label = (self parameterAt: 'label' ) ]
ifNone: [ ^ nil ])
ifNotNilDo: [ :commandClass |
^ [ :html |
html anchor
goto: (aContext command: commandClass new);
with: commandClass label]].
^ nil
I have the impression there might be a solution without using a block. Any ideas? Or is it ok the way it is?
thanks,
Norbert
Hello,
I’m working on the Magritte-XMLBinding package. With this package you can
export Magritte objects as XML and read Magritte described objects from XML.
I would like to have a nice simple API that is easy to understand. I’m
looking for some feedback.
Assume we have the following description:
MXPerson>>descriptionName
^MAStringDescription new
accessor: #name;
label: 'Name';
If we want to export the name property as a xml element we add the
beXmlElement message. By default it will add an extra element with the
accessor name as the element name and the value as the element contents:
<MXPerson>
<name>Pete</name>
</MXPerson>
Optionally we can specify an alternative xml element name:
description
beXmlElement;
xmlElementName: 'person-name'.
Or do you like this API better?
description
beXmlElement: 'person-name'.
The output:
<MXPerson>
<person-name>Pete</person-name>
</MXPerson>
It is also possible to store a property as an xml attribute of the parent
element:
description
beXmlAttribute.
<MXPerson name='Pete'>
</MXPerson>
Or in a property of a separate element:
description
beXmlElementWithAttribute
<MXPerson>
<name value='Pete' />
</MXPerson>
The element and attribute names can be customized:
description
beXmlElementWithAttribute;
xmlElementName: 'xname';
xmlAttributeName: 'yvalue'.
OR:
description
beXmlElement: 'xname' withAttribute: 'yvalue'.
Is the "be" message with arguments better or should a "be" message always
have zero arguments?
Jan.
@Nick: I committed Pier-JQuery-lr.1.mcz to pier2addons, but I didn't
notice until after the commit that you essentially did the same
already a long time ago. The widget in the package essentially removes
the AJAX search widget from Pier-Seaside, ports it is JQueryUI and
moves it into the new package. Now the question is what implementation
to keep? The code in Pier-JQuery-lr.1.mcz only depends on JQueryUI,
while your changes seem to require more. Also Pier-JQuery-lr.1.mcz
uses some simpler mechanism I introduced into JQueryUI just now.
@Damien: The same package also contains two value links we talked
about yesterday. With the following links it is possible to present
the children (or any other set of structures) within a tab-panel or
within an accordion.
+value:jq-tabs+
+value:jq-accordion+
Of course both require the JQuery library, the JQueryUI library and a
JQueryUI theme.
Lukas
--
Lukas Renggli
www.lukas-renggli.ch
Has anyone ever used Pier for collaborative documentation?
I realize a wiki is sorta that already, but I'm part of an IETF group
that is exploring options at the moment and I wonder if there were any
existing examples of Pier being used that way?
Thanks..
Lawson
Yeah, presumably this should go into the Squeak specific packages of Grease.
On Oct 3, 2010, at 20:12 , John McKeon wrote:
> I see.
> I have been using Squeak 4.1 =)
> What are my options in that case? A squeak compatibility layer?
>
>
> On Sun, Oct 3, 2010 at 1:48 PM, Lukas Renggli <renggli(a)me.com> wrote:
> Hi John,
>
> You need to revert the Pharo 1.1 collection packages, because Magritte accidentally overrode the implementation in Pharo.
>
> Lukas
>
> On Oct 3, 2010, at 18:26 , John McKeon wrote:
>
> > Hello Lukas,
> > I updated to the latest Magritte-Model last night and found things fairly broken with the removal of these extension methods. Pier still uses reduce: in several places and MAOptionDescription uses lines in MAOptionDescription >>optionsTextual:
> >
> > Regards
> > John
> >
> > --
> > http://john-mckeon.us
>
> --
> Lukas Renggli, Software Composition Group (SCG)
> Schützenmattstrasse 14, 3012 Bern, Switzerland
> Room: 203, Phone: +41 31 631 8643
> www.lukas-renggli.ch
>
>
>
>
>
>
>
>
>
>
> --
> http://john-mckeon.us
--
Lukas Renggli
www.lukas-renggli.ch
Hi John,
You need to revert the Pharo 1.1 collection packages, because Magritte accidentally overrode the implementation in Pharo.
Lukas
On Oct 3, 2010, at 18:26 , John McKeon wrote:
> Hello Lukas,
> I updated to the latest Magritte-Model last night and found things fairly broken with the removal of these extension methods. Pier still uses reduce: in several places and MAOptionDescription uses lines in MAOptionDescription >>optionsTextual:
>
> Regards
> John
>
> --
> http://john-mckeon.us
--
Lukas Renggli, Software Composition Group (SCG)
Schützenmattstrasse 14, 3012 Bern, Switzerland
Room: 203, Phone: +41 31 631 8643
www.lukas-renggli.ch
How do I format text output from my custom link?
I can embed raw HTML by doing:
^PRVerbatim content: '<p>',myString1,'</p>', '<p>',myString2,'</p>'.
and so on. How can I use the renderContentOn: syntax so I can take
advantage of seaside's internal formatting methods... Or can I, or is
there something more pier-oriented I should do instead?
e.g. +values:awgvalues|factorialval=300+ goes right of the edge of the
webpage currently.
Thanks,
Lawson
Hi people, I am triying Pier 2, but I found this issue:
If I try to put :
"<div style="clear: both"></div>"
under an image, I not work as in Pier 1.2.
Can some body help me.
Thanks
Hi,
does any of you know about Philippe's work to map SOAP to described
objects and vice versa? I would like to have a look at it.
Thank you
--
Damien Cassou
http://damiencassou.seasidehosting.st
"Lambdas are relegated to relative obscurity until Java makes them
popular by not having them." James Iry
I'm subclassing PRValueLink in order to add new +value:xxx+ markup
capabilities.
However, when I subclass it, it seems to disable all +value:xxx+ markups
period.
All I did was create a new MyValueLink>>awgValuesIn: aContext
" example "
| |
<value: 'awgValues' comment: 'Sample Markup valueLInk for AWG.'>
^'oops'
"oops" never shows and all the existing +value:xxx+ now show "xxx"
What am I doing wrong?
Lawson