Hi all,
I've got a class inherited from PRPage with some additional
properties, and I want to hide those properties from all but the page
owner at edit time. The problem is that PREditCommand doesn't pass the
context to the page before requesting its description, so the page
instance doesn't have the necessary information to dynamically change
its description.
I can get the required functionality to work, by overriding
PREditCommand>>description to make decisions about how to render the
page, but that seems I wonder if there's a better way to approach
this? In other words, is there a sensible way to make PRPage aware of
the context in which its edit form is being rendered? I was
contemplating adding context as an instance variable on PRPage and
setting it from PREditCommand, but I suspect that if that was a
sensible approach, it would have been done already!
I've only just started using Pier in earnest, so if this question
exposes a lack of understanding of anything fundamental, please feel
free to point this out.
Cheers,
Michael
Hi
I recently read an article how KDevelop handles threading and that got
me thinking. As far as I understand Pier currently uses a global lock
for all write operations (where #isView returns false). All good an
fine so far. But shouldn't this be a a read-write lock? Imagine the
following scenario:
- a view command is executed, is starts to read some objects, iterates
over some objects
- the current process is unscheduled
- a new process is with a write command is scheduled, it executes to completion
- the original view command is scheduled a again but it has
inconsistent information, eg the parent of an already read structure
has changed
A read-write lock should not affect performance because it allows
multiple concurrent readers.
Cheers
Philippe
I'm finally getting around to using Magritte and while I'm only on the
edge of learning what its fully capable of doing, I'm finding that it
appears to work as advertised (which is great!) and that should really
help get rid of a bunch of clutter from my code where I had a bunch of
rendering code + validation handlers. I was trying to do my own
formatting but will back away from that now and focus on content instead
(I've got a short turn-around time).. Once the content and functionality
is working then I'll focus on doing the prettying-up of the forms,etc.
Anyway, I just wanted to write a quick 'Thanks' note to let you know that
your hard work is very appreciated!
-- Rick
Dear list,
This should be an easy answer, I'm just not finding it:
How would I rewrite something like this into descriptions?
(maxAnnualFee > 0) & (fixedAnnualFee > 0)
ifTrue: [InvalidFeeSelection signal].
--
Danie Roux *shuffle* Adore Unix - http://danieroux.com
Lukas et-al,
Is it safe to assume that if I want to port parts of Magritte-Addons
to the VW version of Magritte (which was taken from the LR251 version
of Magritte in Oct 2007), that I should stick with a version that is
dated in about the same period of time (up to perhaps December 2007?)
to avoid issues with the interfaces changing? Just curious.. Thx!
-- Rick
I'm trying to follow "Possibility 3" from the Magritte tutorial (page
54) where I subclass MAContainerComponent and create my own
#renderContentOn: and override #descriptionContainer to point to my
new subclass.. The tutorial didn't really indicate how to get the
component data or other general usage -- so I figured I'd ask..
Also -- for future reference.. Is there an example or two that might
be good to use as references for this sort of questioning that doesn't
require pier since I'm on the VW platform? I'm a Magritte newbie and
examples are very helpful.. Thx!
-- Rick
Richard E. Flower wrote:
> Keith,
>
> Do you mind me asking what sort of method(s) you used to do the
> styling of the form that you were
> showing in this older email thread? Some of what you show is pretty
> much what I'm looking to do
> but I'm totally lost on how to get it going.. Many thanks in advance
> for any pointers you can provide..!
>
> -- Rick
>
Basic packages which you may or may not want to use...
Installer lukas project: 'magritteaddons';
install: 'Magritte-RealMemento';
install: 'Magritte-CustomBuilder';
install: 'Magritte-Scriptaculous.
Magritte-RealMemento package uses a real copy of the object as a
memento, rather than a dictionary of key value pairs. The real object
has behaviour which may relate data items. To use the real memento you
have to override #mementoClass for your model.
"Magritte-CustomBuilder" sets the default builder to use a numeric in
the description selector to set the priority, like so. (I find this very
useful)
description0250Documents
^ MAToManyRelationDescription new
classes: (Array with: DTIExternalFileModel);
"Magritte-Scriptaculous extends the accessors so you can do
things like this...
Where the visibility of this item is determined by
#hasOrderNumber."
accessor: (#documents asAccessor visible: #hasOrderNumber);
componentClass: MAOneToManyDocumentsComponent;
label: 'Documents';
yourself
Accessors augmented in this manner can provide #readonly #visible
#cssClasses #tooltip and #options (for lists)
For rendering, lukas has his MACssRenderer, and I have my MADivsRenderer
(part of Magritte-Scriptaculous).
There is also Magritte-ComponentDecoration another add on that you might
find useful.
best regards
Keith
Hi,
I'd like to have a component that show last edited structure (at leat page).
I think it's not possible yet. Correct me if wrong.
Does adding an inst var timestamp in structure is the way to go ?
Thanks
Cédrick
Hi,
i work with squeak update to the last 2.9 seaside and Magritte-All-lr-269.
I have a class 'MAArticoloModel ' defined with some descriptions.
One description is based on MAFileDescription
descriptionPicture
^ ( MAFileDescription new)
autoAccessor: 'immagine';
beRequired;
label: 'Immagine';
priority: 60;
yourself
Now when update an item with :
self call: ( anMAArticoloModel asComponent) readonly: false;
addValidateForm;
addMessage: 'Update item;
yourself
all work fine.
But when display an item with:
self call: ( anMAArticoloModel asComponent) readonly:true;
addForm: #(cancel);
addMessage: 'Display item';
yourself
i found the error: MessageNotUnderstood: WAMimeType >> copyUpTo.
Any pointers would be greatly appreciated!
Thanks!
Dario