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
Lukas,
MASelectListComponent>>renderEditorOn: would seem to suggest that we need
isGrouped
^ false
on MADescription.
We needed to that, anyway :-)
--
Danie Roux *shuffle* Adore Unix - http://danieroux.com
I couldn't find a built-in option... except by clicking on comment(s)
which is not obvious to me, so I did that...
PBHtmlView>>renderPost: aPost on: html
html div
class: 'post';
with: [
html anchor name: aPost uuid.
html anchor
goto: (self context structure: aPost);
with: [ html heading
level: 1;
with: aPost title].
self render: aPost on: html.
self renderMeta: aPost on: html ]
Does it worth commiting ? (not sur this is a good practise to
encapsulate an heading in an anchor)
Cédrick
Dear list,
I am trying out Magritte on an existing app. I have this scenario
working, but I had to follow the same hack as
PRChangeCommand>>applyButton.
One of the screens have three buttons: Save, Cancel and SomeMoreStuffToAdd
If I click on "SomeMoreStuffToAdd", I want to some more stuff to
happen. For this, I override #asComponent on my model and add the
button and the selector myself:
asComponent
^ super asComponent
addValidatedForm: (Array
with: #save -> 'Save'
with: #cancel -> 'Cancel'
with: #someMore -> 'Some More Stuff')
The very hackish part, I now need to add this to MAContainerComponent
for it to work:
someMore
self call: (AnotherComponent new)
Is there a cleaner way? A bunch of Monticello extensions
on MAContainerComponent hardly seems like the best way to extend
MAContainerComponent's to have more actions!
--
Danie Roux *shuffle* Adore Unix - http://danieroux.com
Hi,
I'm using MAInternalEditorComponent for editing some complex structures
and for now is working ok, but I found a little issue. Take this
example:
I have a Person, who has an Address. I edit Person for create a new
instance, then I run validation for the component... and validation
does not validate Address, just it's existence, which obviously exist,
because I created it with a #default:, but required values for #street
and #number are not chequed.
I solved this problem by oberriding #validateSpecific: of
MAToOneRelationDescription this way:
validateSpecific: anObject
super validateSpecific: anObject.
anObject description validate: anObject.
My question is: is this solution correct? this is maybe a bug of magritte?
Thanks,
Esteban
Hi,
I'm trying to use magritte-scriptaculous package, but I'm getting a DNU
on MAAccessor>>key, who is tryint to senf an unexistent #selector
message.
Any idea where that message is hidding? :)
I'm using latest versions of Magritte-All and Magritte-Scriptaculous.
Thanks in advance,
Esteban
Hi all,
I need to "chain" two select options. I mean: when user choose some
option in combo A, it allows some options in combo B.
Somebody has already done this in magritte?
If not, any clue of where to start?
Thanks,
Esteban
Hi Eric,
> I think there's a bug in Magritte in MASelectionColumn the
> renderCellLinkContent:on: method has, html callback:[], but i
> believe it should be html anchor callback:[]
you are right of course. I fixed that in the latest version of Magritte.
> As well, it seems to render MACheckboxColumn as a square outline
> with a square in the middle when selected, rather than as a
> checkbox. I'm completely baffled by this... googling only got me to
> a suggestion about it was using the old renderer, but I tried
> overriding rendererClass to return WAHtmlCanvas, but no luck.
> Completely baffled on this. Any ideas?
By default MAReport tries to use links (and a picture) instead of real
form elements. This has the advantage that you don't need to worry
about putting the report into a form and submitting if after changes.
You can tell the MACheckboxColumn to use a checkbox instead by setting
"aColumn useLinks: false".
> Also, when you created MAReport, did you ever think of the
> possibility of needing to reorganize columns which were appended to
> the description? Or was this something which was left as an
> exercise to the end-user?
Yeah, MAReport is far from ideal. It was originally made for some
commercial projects and later-on extended several times to meet new
requirements. It is not that easily useable as other parts of Magritte.
It is possible to reorganize columns though. Have a look at the ESUG
registration application, as far as I remember it is done in the admin
interface:
http://www.squeaksource.com/Conrad.html
> I'm just trying to grok this all, as I was about to implement my own
> stuff from scratch when I found Magritte, which is really cool!
> What I was going to implement, was basically an equivalent to
> NSTableView, etc. in Cocoa, alongside, NSArrayController and
> Bindings. (mainly just because I've been developing on the Mac for
> so long now it seems my brain is wired that way) But I'm hoping
> Magritte can help me avoid that.
If you have any other improvements to the code of Magritte and believe
that this is of general interest, please just commit your changes to
the repository.
Cheers,
Lukas
--
Lukas Renggli
http://www.lukas-renggli.ch