Converting domain objects to and from Strings seems deeply embedded in
Magritte. But sometimes, e.g. if the underlying object is text, it seems to
be more appropriate to just pass the text to the view/editor. I played a bit
with this idea but quickly got lost. Has anyone ever experimented with this
idea? Would it make sense / be possible to refactor and abstract so that
Text or another class could be plugged in instead of String? Or maybe there
are already hooks for this?
-----
Cheers,
Sean
--
View this message in context: http://forum.world.st/Why-Strings-tp4840047.html
Sent from the Magritte, Pier and Related Tools mailing list archive at Nabble.com.
Hi Christophe,
On 18-06-15 11:27, Christophe Demarey wrote:
> A small thing I just noticed: You have an extension method on Collection>>copyWithAll: in the Magritte-Model package.
> Its implementation is the same as Collection>>,
> Maybe you could just use Collection>>, instead.
Hmm, old stuff, interesting. No idea why that was added. Let's see if
someone on the mailing list knows.
Are there smalltalks without , on Collection?
Stephan
Hi,
We've been using Margritte-Seaside for about 6 years now. And we've
been hacking around and monkey patching magritte to force it into
submission.
I'm trying to improve on this approach, as you may agree. I would in
general like to understand Margritte better, but perhaps start with:
how do you suggest we customise the rendering of a described
component? We know of a few hooks, but is there some documentation I
can read on this subject?
I know my question is vague, but I have so many, and would like to
just start somewhere and then dive into more specifics. Please let me
know if I should dive into specifics.
Further, is this the best mailing list to post on?
Thanks
Otto
I'm working on an experiment to work with Magritte descriptions via a GUI
generated by Magritte itself. For example, bring up a Magritte form on
description, edit it, and then save as a description method on an object.
As an initial spike, MADescription>>#constructorSource:, which for e.g.:
```
MANumberDescription new
default: 5;
constructorSource.
```
returns:
```
^ MANumberDescription new
default: 5;
yourself
```
One thing I noticed is that descriptions do not have meta-descriptions of
their accessors. Does anyone know why?
Is anyone using the meta-features of the descriptions themselves as
described in the Magritte white papers (or any other way for that matter!)?
Has anything like this been done? It seems strange to me if not...
-----
Cheers,
Sean
--
View this message in context: http://forum.world.st/Meta-Magritte-tp4832184.html
Sent from the Magritte, Pier and Related Tools mailing list archive at Nabble.com.
Hi,
I have a QCBMagritteReport (a subclass of MAReport) with a command column
with options to perform on each row:
addColumn:
(MACommandColumn new
addCommandOn: self selector: #edit: text: 'Edit';
addCommandOn: self selector: #delete: text: 'Delete';
addCommandOn: self selector: #validate: text: 'Check';
yourself)
This works well, however I would like to see a Bootstrap drop down button
as opposed to individual links being shown. I've experimented with
QCCommandColumn but without success (it needs something in its component
instance variable but I'm clueless as to what).
Is there a specialised renderer for this I can use or should I implement my
own?
Thanks for reading.
Roger
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.