From renggli at iam.unibe.ch Tue Jul 8 08:30:45 2008 From: renggli at iam.unibe.ch (Lukas Renggli) Date: Tue, 8 Jul 2008 08:30:45 +0200 Subject: Bug in Magritte? In-Reply-To: <5CEB28C8-CB7A-432A-9B1B-A32633D36452@hochmeister.ca> References: <5CEB28C8-CB7A-432A-9B1B-A32633D36452@hochmeister.ca> Message-ID: 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 From estebanlm at gmail.com Tue Jul 8 14:21:47 2008 From: estebanlm at gmail.com (Esteban Lorenzano) Date: Tue, 8 Jul 2008 09:21:47 -0300 Subject: "chaining" single select? Message-ID: 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 From renggli at iam.unibe.ch Tue Jul 8 18:54:49 2008 From: renggli at iam.unibe.ch (Lukas Renggli) Date: Tue, 8 Jul 2008 18:54:49 +0200 Subject: "chaining" single select? In-Reply-To: References: Message-ID: Hi Esteban, > 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? Magritte-Seaside does not automatically support this scenario. There are several possibilities to get the desired behavior though: - Keith's work on Magritte-Scriptaculous provides this functionality out of the box, as far as I know. - If you don't want to use AJAX you could write your own view. This means you write a Seaside component that renders the two combo boxes and knows about their interaction. Then you assign this component as a Seaside view of the description #componentClass:. - A long time ago (when there was no AJAX) I wrote a NestedOptionsDescription and an associated view. I don't remember if that was part of Magritte or a commercial project. I don't know why it is gone. If this is what you need, I can try to dig it out for you ... Cheers, Lukas -- Lukas Renggli http://www.lukas-renggli.ch From estebanlm at gmail.com Tue Jul 8 19:27:34 2008 From: estebanlm at gmail.com (Esteban Lorenzano) Date: Tue, 8 Jul 2008 14:27:34 -0300 Subject: "chaining" single select? References: Message-ID: Thanks, Lukas I will check Keith's magrite-scriptaculous Cheers, Esteban On 2008-07-08 13:54:49 -0300, Lukas Renggli said: > Hi Esteban, > >> 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? > > Magritte-Seaside does not automatically support this scenario. There > are several possibilities to get the desired behavior though: > > - Keith's work on Magritte-Scriptaculous provides this functionality > out of the box, as far as I know. > > - If you don't want to use AJAX you could write your own view. This > means you write a Seaside component that renders the two combo boxes > and knows about their interaction. Then you assign this component as a > Seaside view of the description #componentClass:. > > - A long time ago (when there was no AJAX) I wrote a > NestedOptionsDescription and an associated view. I don't remember if > that was part of Magritte or a commercial project. I don't know why it > is gone. If this is what you need, I can try to dig it out for you ... > > Cheers, > Lukas From estebanlm at gmail.com Thu Jul 10 16:44:33 2008 From: estebanlm at gmail.com (Esteban Lorenzano) Date: Thu, 10 Jul 2008 11:44:33 -0300 Subject: Magritte-Scriptaculous question Message-ID: 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 From estebanlm at gmail.com Thu Jul 10 17:12:10 2008 From: estebanlm at gmail.com (Esteban Lorenzano) Date: Thu, 10 Jul 2008 12:12:10 -0300 Subject: Magritte-Scriptaculous question References: Message-ID: "Addendum" The DNU happens with using an MAIdentityAccessor, 'cause #selector lives in MASelectorAccesor... MAIdentityAccessor is used in MAContainer so, everything fails :( Thanks, Esteban On 2008-07-10 11:44:33 -0300, Esteban Lorenzano said: > 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 > > > > _______________________________________________ > SmallWiki, Magritte, Pier and Related Tools ... > https://www.iam.unibe.ch/mailman/listinfo/smallwiki From keith_hodges at yahoo.co.uk Thu Jul 10 17:14:15 2008 From: keith_hodges at yahoo.co.uk (Keith Hodges) Date: Thu, 10 Jul 2008 16:14:15 +0100 Subject: Magritte-Scriptaculous question In-Reply-To: References: Message-ID: <48762747.3070100@yahoo.co.uk> Esteban Lorenzano wrote: > 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 > #selector is defined on MASelectorAccessor, and #key is redefined on different accessors. Perhaps the accessor class you are using doesnt have it defined. Keith From estebanlm at gmail.com Thu Jul 10 17:25:21 2008 From: estebanlm at gmail.com (Esteban Lorenzano) Date: Thu, 10 Jul 2008 12:25:21 -0300 Subject: Magritte-Scriptaculous question References: <48762747.3070100@yahoo.co.uk> Message-ID: Thanks Keith, this is what I did: 1) rewrite #key MAAccessor, to return nil 2) rewrite #key in MASelectorAccessor, to return #selector Now is working ok... but, ?Is that correction right? Cheers, Esteban On 2008-07-10 12:14:15 -0300, Keith Hodges said: > Esteban Lorenzano wrote: >> 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 >> > > #selector is defined on MASelectorAccessor, and #key is redefined on > different accessors. Perhaps the accessor class you are using doesnt > have it defined. > > Keith > > > > _______________________________________________ > SmallWiki, Magritte, Pier and Related Tools ... > https://www.iam.unibe.ch/mailman/listinfo/smallwiki From keith_hodges at yahoo.co.uk Thu Jul 10 17:44:59 2008 From: keith_hodges at yahoo.co.uk (Keith Hodges) Date: Thu, 10 Jul 2008 16:44:59 +0100 Subject: Magritte-Scriptaculous question In-Reply-To: References: <48762747.3070100@yahoo.co.uk> Message-ID: <48762E7B.40906@yahoo.co.uk> Esteban Lorenzano wrote: > Thanks Keith, this is what I did: > > 1) rewrite #key MAAccessor, to return nil > 2) rewrite #key in MASelectorAccessor, to return #selector > > Now is working ok... but, ?Is that correction right? > > Cheers, > Esteban > The key is used to supply a unique identifier for the accessor, where one would normally use #selector but many accessor types dont use #selector. Your correction should be ok, feel free to post the updated package into magritteaddons. In case you had not already realised you will need Magritte-RealMemento so that memento's use real objects rather than a behaviorless dictionary of values. Keith From estebanlm at gmail.com Thu Jul 10 21:52:54 2008 From: estebanlm at gmail.com (Esteban Lorenzano) Date: Thu, 10 Jul 2008 16:52:54 -0300 Subject: Magritte-Scriptaculous question References: <48762747.3070100@yahoo.co.uk> <48762E7B.40906@yahoo.co.uk> Message-ID: He, I was not aware of that, thanks... Esteban On 2008-07-10 12:44:59 -0300, Keith Hodges said: > Esteban Lorenzano wrote: >> Thanks Keith, this is what I did: >> >> 1) rewrite #key MAAccessor, to return nil >> 2) rewrite #key in MASelectorAccessor, to return #selector >> >> Now is working ok... but, ?Is that correction right? >> >> Cheers, >> Esteban >> > > The key is used to supply a unique identifier for the accessor, where > > one would normally use #selector but many accessor types dont use > > #selector. > > Your correction should be ok, feel free to post the updated package into > > magritteaddons. > > In case you had not already realised you will need Magritte-RealMemento > > so that memento's use real objects rather than a behaviorless dictionary > > of values. > > Keith > > > > _______________________________________________ > SmallWiki, Magritte, Pier and Related Tools ... > https://www.iam.unibe.ch/mailman/listinfo/smallwiki From estebanlm at gmail.com Tue Jul 15 16:14:50 2008 From: estebanlm at gmail.com (Esteban Lorenzano) Date: Tue, 15 Jul 2008 11:14:50 -0300 Subject: Another Magritte-Scriptaculous question Message-ID: Hi, I'm trying to use MAOneToManyComponentEditInPlace, and can't realize how it is supposed to work... what I want to do is add rows and edit them "InPlace"... now I can add new rows, but empty ones. Is possible to edit them? how? Thanks in advance, Esteban From keith_hodges at yahoo.co.uk Tue Jul 15 16:34:29 2008 From: keith_hodges at yahoo.co.uk (Keith Hodges) Date: Tue, 15 Jul 2008 15:34:29 +0100 Subject: Another Magritte-Scriptaculous question In-Reply-To: References: Message-ID: <487CB575.4080900@yahoo.co.uk> Esteban Lorenzano wrote: > Hi, > I'm trying to use MAOneToManyComponentEditInPlace, and can't realize > how it is supposed to work... what I want to do is add rows and edit > them "InPlace"... now I can add new rows, but empty ones. Is possible > to edit them? how? > > Thanks in advance, > Esteban > > You need to specify #reportColumnClass Keith e.g. description0060DriverName ^ MAStringDescription new accessor: ((#driverName asAccessor) options: #driverNamesAvailable); label: 'Driver'; fieldSize: 3; "just in case" componentClass: MAAutoCompletingTextInputComponent; beEditable; reportColumnClass: MAEditableColumnAutoCompleting; beSearchable; bePersisted; yourself From estebanlm at gmail.com Wed Jul 16 17:40:41 2008 From: estebanlm at gmail.com (Esteban Lorenzano) Date: Wed, 16 Jul 2008 12:40:41 -0300 Subject: MAInternalEditorComponent and validation Message-ID: 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 From renggli at iam.unibe.ch Wed Jul 16 21:37:28 2008 From: renggli at iam.unibe.ch (Lukas Renggli) Date: Wed, 16 Jul 2008 21:37:28 +0200 Subject: MAInternalEditorComponent and validation In-Reply-To: References: Message-ID: On Jul 16, 2008, at 17:40 , Esteban Lorenzano wrote: > 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? The problem is that when using an MAInternalEditorComponent you want the validation you added. When using an MAExternalEditorComponent you don't want it though, as the model already validated in the external editor. Otherwise you run into strange bugs. Frankly I never use (or used) these internal and external editors in productive applications. This seems simply to complicated to make it work in properly in all situations. When it comes to relationships I usually do write some glue code by hand. Often this turns out more user-friendly than an generated form too. Cheers, Lukas -- Lukas Renggli http://www.lukas-renggli.ch From estebanlm at gmail.com Thu Jul 17 17:07:24 2008 From: estebanlm at gmail.com (Esteban Lorenzano) Date: Thu, 17 Jul 2008 12:07:24 -0300 Subject: MAInternalEditorComponent and validation References: Message-ID: What about adding a "validateChildren" property in MAToOneRelationDescription, to perform that validation just when I want? Cheers, Esteban On 2008-07-16 16:37:28 -0300, Lukas Renggli said: > > On Jul 16, 2008, at 17:40 , Esteban Lorenzano wrote: > >> 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? > > The problem is that when using an MAInternalEditorComponent you want > the validation you added. When using an MAExternalEditorComponent you > don't want it though, as the model already validated in the external > editor. Otherwise you run into strange bugs. > > Frankly I never use (or used) these internal and external editors in > productive applications. This seems simply to complicated to make it > work in properly in all situations. When it comes to relationships I > usually do write some glue code by hand. Often this turns out more > user-friendly than an generated form too. > > Cheers, > Lukas From lists+pier at danieroux.com Tue Jul 22 16:38:25 2008 From: lists+pier at danieroux.com (Danie Roux) Date: Tue, 22 Jul 2008 16:38:25 +0200 Subject: What is the correct way to add actions to my asComponent form? Message-ID: 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 From renggli at iam.unibe.ch Tue Jul 22 17:37:56 2008 From: renggli at iam.unibe.ch (Lukas Renggli) Date: Tue, 22 Jul 2008 17:37:56 +0200 Subject: What is the correct way to add actions to my asComponent form? In-Reply-To: References: Message-ID: <563DDB48-18CC-4FD2-9CA8-FB24C423C3A7@iam.unibe.ch> > 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! Sure, this is ment to be used like this. If you don't like this, you can create your own form decoration that has a different behavior. I would not override #asComponent thought. #asComponent is ment to just return the component, without any decorations added. Like this the user can choose itself what he wants to add. If you have a lot of code like the one you posted, you might want to create your own custom converter: asMyFormComponent ^ self asComponent addValidatedForm: (Array with: #save -> 'Save' with: #cancel -> 'Cancel' with: #someMore -> 'Some More Stuff') Cheers, Lukas -- Lukas Renggli http://www.lukas-renggli.ch From cdrick65 at gmail.com Wed Jul 23 10:23:10 2008 From: cdrick65 at gmail.com (cdrick) Date: Wed, 23 Jul 2008 10:23:10 +0200 Subject: Blog - clicking on heading of posts to show post+comments Message-ID: 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 From renggli at iam.unibe.ch Wed Jul 23 11:12:22 2008 From: renggli at iam.unibe.ch (Lukas Renggli) Date: Wed, 23 Jul 2008 11:12:22 +0200 Subject: Blog - clicking on heading of posts to show post+comments In-Reply-To: References: Message-ID: <26CEC71A-2F17-4D05-9B50-8BE08ECB0DCB@iam.unibe.ch> > Does it worth commiting ? (not sur this is a good practise to > encapsulate an heading in an anchor) Yes, please commit this change. I want that feature as well. > 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 ] Better put the anchor inside the heading, otherwise the XHTML is invalid (heading is a block element, anchor is an inline element). Cheers, Lukas On Jul 23, 2008, at 10:23 , cdrick wrote: > I couldn't find a built-in option... except by clicking on comment(s) > which is not obvious to me, so I did that... > > > > C?drick > > > _______________________________________________ > SmallWiki, Magritte, Pier and Related Tools ... > https://www.iam.unibe.ch/mailman/listinfo/smallwiki -- Lukas Renggli http://www.lukas-renggli.ch From damien.pollet at gmail.com Wed Jul 23 11:50:58 2008 From: damien.pollet at gmail.com (Damien Pollet) Date: Wed, 23 Jul 2008 11:50:58 +0200 Subject: Blog - clicking on heading of posts to show post+comments In-Reply-To: <26CEC71A-2F17-4D05-9B50-8BE08ECB0DCB@iam.unibe.ch> References: <26CEC71A-2F17-4D05-9B50-8BE08ECB0DCB@iam.unibe.ch> Message-ID: <34b4844b0807230250q1b23d2e5if88ba1e60cb1644f@mail.gmail.com> Thanks C?drick, I wanted that too :) On Wed, Jul 23, 2008 at 11:12 AM, Lukas Renggli wrote: >> Does it worth commiting ? (not sur this is a good practise to >> encapsulate an heading in an anchor) > > Yes, please commit this change. I want that feature as well. > >> 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 ] > > Better put the anchor inside the heading, otherwise the XHTML is > invalid (heading is a block element, anchor is an inline element). > > Cheers, > Lukas > > On Jul 23, 2008, at 10:23 , cdrick wrote: > >> I couldn't find a built-in option... except by clicking on comment(s) >> which is not obvious to me, so I did that... >> >> >> >> C?drick >> >> >> _______________________________________________ >> SmallWiki, Magritte, Pier and Related Tools ... >> https://www.iam.unibe.ch/mailman/listinfo/smallwiki > > -- > Lukas Renggli > http://www.lukas-renggli.ch > > > > _______________________________________________ > SmallWiki, Magritte, Pier and Related Tools ... > https://www.iam.unibe.ch/mailman/listinfo/smallwiki > -- Damien Pollet type less, do more [ | ] http://people.untyped.org/damien.pollet From cdrick65 at gmail.com Wed Jul 23 12:02:08 2008 From: cdrick65 at gmail.com (cdrick) Date: Wed, 23 Jul 2008 12:02:08 +0200 Subject: Blog - clicking on heading of posts to show post+comments In-Reply-To: <26CEC71A-2F17-4D05-9B50-8BE08ECB0DCB@iam.unibe.ch> References: <26CEC71A-2F17-4D05-9B50-8BE08ECB0DCB@iam.unibe.ch> Message-ID: > Better put the anchor inside the heading, otherwise the XHTML is > invalid (heading is a block element, anchor is an inline element). > ok, I knew there was something like that.(Small) problem now is that the anchor is displayed (underlined) but I guess this is a CSS matter. Name: Pier-Blog-cb.74 Author: cb Time: 23 July 2008, 12:14:32 pm UUID: 5da7f7c1-da4a-1e49-87b8-9c9243cc677f Ancestors: Pier-Blog-lr.73 -clicking on heading of posts global view bring the post+commment view -a css should be used to hide the anchor decoration From lists+pier at danieroux.com Fri Jul 25 14:30:44 2008 From: lists+pier at danieroux.com (Danie Roux) Date: Fri, 25 Jul 2008 14:30:44 +0200 Subject: rangeErrorMessage seems to be incorrect Message-ID: Lukas, Shouldn't MAMagnitudeDescription>>rangeErrorMessage include: stream nextPutAll: 'equal or above '; nextPutAll: (self toString: self min) rather than stream nextPutAll: 'above '; nextPutAll: (self toString: self min) ? -- Danie Roux *shuffle* Adore Unix - http://danieroux.com From lists+pier at danieroux.com Fri Jul 25 14:39:22 2008 From: lists+pier at danieroux.com (Danie Roux) Date: Fri, 25 Jul 2008 14:39:22 +0200 Subject: isGrouped needed by MASelectListComponent Message-ID: 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 From renggli at iam.unibe.ch Fri Jul 25 17:51:26 2008 From: renggli at iam.unibe.ch (Lukas Renggli) Date: Fri, 25 Jul 2008 17:51:26 +0200 Subject: isGrouped needed by MASelectListComponent In-Reply-To: References: Message-ID: <83B63017-36DD-48CB-8166-FCD788C9F313@iam.unibe.ch> I added what you suggested in: Name: Magritte-Model-lr.320 Author: lr Time: 25 July 2008, 5:34:39 pm UUID: 677e0832-fe7e-45b7-8501-adfa734938cc Ancestors: Magritte-Model-lr.319 - added MADescription>>#isGrouped as suggested by Danie Roux Thanks for reporting. Cheers, Lukas On Jul 25, 2008, at 14:39 , Danie Roux wrote: > 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 > > _______________________________________________ > SmallWiki, Magritte, Pier and Related Tools ... > https://www.iam.unibe.ch/mailman/listinfo/smallwiki -- Lukas Renggli http://www.lukas-renggli.ch From renggli at iam.unibe.ch Fri Jul 25 17:51:28 2008 From: renggli at iam.unibe.ch (Lukas Renggli) Date: Fri, 25 Jul 2008 17:51:28 +0200 Subject: rangeErrorMessage seems to be incorrect In-Reply-To: References: Message-ID: <1D135903-98B1-4B01-A00C-4730C1D3BA1A@iam.unibe.ch> Thanks for reporting. That seems to be a highly bugged method ;-) Name: Magritte-All-lr.269 Author: lr Time: 25 July 2008, 5:49:56 pm UUID: e0178c7d-ad61-4cab-84f8-3907b4e85662 Ancestors: Magritte-All-lr.268 Dependencies: Magritte-Model-lr.321, Magritte-Tests-lr.143, Magritte-Seaside-lr.267, Magritte-Morph-lr.42 - fixes the range error message - thanks to Danie Roux for reporting I fixed the error you reported and added a test. Depending on the description, the language is still not fully correct in all cases, but that can be fixed later on. In any case there is also the possibility to define your own wording on a per-description bases using #rangeErrorMessage:. Cheers, Lukas On Jul 25, 2008, at 14:30 , Danie Roux wrote: > Lukas, > > Shouldn't MAMagnitudeDescription>>rangeErrorMessage include: > > stream nextPutAll: 'equal or above '; nextPutAll: (self toString: > self min) > > rather than > > stream nextPutAll: 'above '; nextPutAll: (self toString: self min) ? > > -- > Danie Roux *shuffle* Adore Unix - http://danieroux.com > > _______________________________________________ > SmallWiki, Magritte, Pier and Related Tools ... > https://www.iam.unibe.ch/mailman/listinfo/smallwiki -- Lukas Renggli http://www.lukas-renggli.ch From dtrussardi at tiscali.it Sat Jul 26 13:08:53 2008 From: dtrussardi at tiscali.it (Dario Trussardi) Date: Sat, 26 Jul 2008 13:08:53 +0200 Subject: MAFileDescription error Message-ID: <005e01c8ef10$01cbfc80$0301a8c0@istcamuno> 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.iam.unibe.ch/pipermail/smallwiki/attachments/20080726/d77dcc2f/attachment.html From renggli at iam.unibe.ch Sat Jul 26 18:29:42 2008 From: renggli at iam.unibe.ch (Lukas Renggli) Date: Sat, 26 Jul 2008 18:29:42 +0200 Subject: MAFileDescription error In-Reply-To: <005e01c8ef10$01cbfc80$0301a8c0@istcamuno> References: <005e01c8ef10$01cbfc80$0301a8c0@istcamuno> Message-ID: <82568422-601C-422C-9EA9-DC4102F669E5@iam.unibe.ch> I've never tried Magritte or Pier with the latest development vesions of Seaside 2.9. I guess this is the problem in your case. Please stick with Seaside 2.8 until Seaside 2.9 gets more stable. Cheers, Lukas On Jul 26, 2008, at 13:08 , Dario Trussardi wrote: > 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 > > > _______________________________________________ > SmallWiki, Magritte, Pier and Related Tools ... > https://www.iam.unibe.ch/mailman/listinfo/smallwiki -- Lukas Renggli http://www.lukas-renggli.ch From cdrick65 at gmail.com Sat Jul 26 22:49:36 2008 From: cdrick65 at gmail.com (cdrick) Date: Sat, 26 Jul 2008 22:49:36 +0200 Subject: Showing last updated structures Message-ID: 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.iam.unibe.ch/pipermail/smallwiki/attachments/20080726/5b6397d8/attachment.html From cdrick65 at gmail.com Sat Jul 26 23:49:40 2008 From: cdrick65 at gmail.com (cdrick) Date: Sat, 26 Jul 2008 23:49:40 +0200 Subject: Showing last updated structures In-Reply-To: References: Message-ID: 2008/7/26 cdrick > 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. > ok I must be wrong as there is the change command oops... What I'd like is a small change component that can be embeded and also display (or not depending on a setting) the last update information. I'd like also to have a checkbox so as it's possible to record this information (in case of correcting a typo for instance)... I'll investigate on changes and I'll come back later on that... ;) C?drick -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.iam.unibe.ch/pipermail/smallwiki/attachments/20080726/08d13202/attachment-0001.html From cdrick65 at gmail.com Sat Jul 26 23:52:06 2008 From: cdrick65 at gmail.com (cdrick) Date: Sat, 26 Jul 2008 23:52:06 +0200 Subject: Showing last updated structures In-Reply-To: References: Message-ID: 2008/7/26 cdrick > > > 2008/7/26 cdrick > >> 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. >> > > ok I must be wrong as there is the change command oops... > I'm tired I mean't: What I'd like is a small change component that can be embeded. Then also to display (or not depending on a setting) the last update information at the start (or end) of a page. I'd like also to have a checkbox so as it's possible to record ***or not*** this information (in case of correcting a typo for instance)... I'll investigate on changes and I'll come back later on that... ;) C?drick -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.iam.unibe.ch/pipermail/smallwiki/attachments/20080726/97bade97/attachment.html From cdrick65 at gmail.com Sun Jul 27 00:05:44 2008 From: cdrick65 at gmail.com (cdrick) Date: Sun, 27 Jul 2008 00:05:44 +0200 Subject: Showing last updated structures In-Reply-To: References: Message-ID: > > > > I'll investigate on changes and I'll come back later on that... ;) > there is a checked inst var in PRCommand. I think I could use similarly an inst var, or a wrapper for timestamp to associated it with a boolean... What would you do ? Thanks C?drick ---- checked seems to be use only in PBComment... PRCommand>>isChecked "Answer ==true== if the command should be checked before execution, e.g. the method ==#doValidate== should be executed at all." -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.iam.unibe.ch/pipermail/smallwiki/attachments/20080727/c7e8ecae/attachment.html From cdrick65 at gmail.com Sun Jul 27 03:10:32 2008 From: cdrick65 at gmail.com (cdrick) Date: Sun, 27 Jul 2008 03:10:32 +0200 Subject: too many PRContext instances ? Message-ID: I have too manyPRContext instances. PRContext allInstances size " 55408" Can I get rid of them and how ;) ? Thanks C?drick -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.iam.unibe.ch/pipermail/smallwiki/attachments/20080727/8d3b0748/attachment.html From renggli at iam.unibe.ch Sun Jul 27 10:30:13 2008 From: renggli at iam.unibe.ch (Lukas Renggli) Date: Sun, 27 Jul 2008 10:30:13 +0200 Subject: Showing last updated structures In-Reply-To: References: Message-ID: If you use PRHistoryPersistency or any of its subclasses as the persistency mechanism you get this information: aKernel persistency historyFor: aStructure This answer a collection of commands that have been executed on aStructure. You can for example filter it for edit commands to get all the edit operations (this is what the subclasses of PRHistoryView are doing). On Jul 26, 2008, at 22:49 , cdrick wrote: > 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 > > > _______________________________________________ > SmallWiki, Magritte, Pier and Related Tools ... > https://www.iam.unibe.ch/mailman/listinfo/smallwiki -- Lukas Renggli http://www.lukas-renggli.ch From renggli at iam.unibe.ch Sun Jul 27 10:31:59 2008 From: renggli at iam.unibe.ch (Lukas Renggli) Date: Sun, 27 Jul 2008 10:31:59 +0200 Subject: Showing last updated structures In-Reply-To: References: Message-ID: > What I'd like is a small change component that can be embeded and > also display (or not depending on a setting) the last update > information. > I'd like also to have a checkbox so as it's possible to record this > information (in case of correcting a typo for instance)... > I'll investigate on changes and I'll come back later on that... ;) You can add such a field to PRCommand by adding a new description. And then you display the data using the technique I showed in the previous mail. Lukas -- Lukas Renggli http://www.lukas-renggli.ch From renggli at iam.unibe.ch Sun Jul 27 10:37:52 2008 From: renggli at iam.unibe.ch (Lukas Renggli) Date: Sun, 27 Jul 2008 10:37:52 +0200 Subject: Showing last updated structures In-Reply-To: References: Message-ID: <6F9DB940-61E8-46CE-B34B-1403D5D4AF41@iam.unibe.ch> > I'll investigate on changes and I'll come back later on that... ;) > > there is a checked inst var in PRCommand. I think I could use > similarly an inst var, or a wrapper for timestamp to associated it > with a boolean... > What would you do ? I don't understand. There is already a time-stamp recorded within all the commands (see inst-var refs to 'timestamp' in PRCommand). checked is something else (see inst-var refs to 'checked' in PRCommand). As any Magritte or Pier object you can just use #propertyAt: and #propertyAt:put: and a Magritte description for clean extension without having to override or change something in the existing code. > checked seems to be use only in PBComment... > > PRCommand>>isChecked > "Answer ==true== if the command should be checked before > execution, e.g. the method ==#doValidate== should be executed at all." This is used in PRPersistency. This is an important part of the persistency mechanism and allows to replay commands at a later point in time without checking the validation conditions. I agree, that the implementation should be improved for readability. Cheers, Lukas -- Lukas Renggli http://www.lukas-renggli.ch From renggli at iam.unibe.ch Sun Jul 27 10:46:13 2008 From: renggli at iam.unibe.ch (Lukas Renggli) Date: Sun, 27 Jul 2008 10:46:13 +0200 Subject: too many PRContext instances ? In-Reply-To: References: Message-ID: <69277F17-1A08-46A2-9F26-8F89C7569DD7@iam.unibe.ch> > I have too manyPRContext instances. > > PRContext allInstances size " 55408" I don't know if that's a lot. This depends on your setup. In my development image I have 3403 instances, on www.lukas-renggli.ch I have 13021 instances. Whenever a page is rendered a context is created for every possible navigation path (every link). That could be optimized of course, but never was a problem so far. These contexts should quickly go away, if they are not needed anymore. Furthermore, then are a couple of contexts (default is 1024) stored in PRHistoryPersistency (if you are using this strategy). > Can I get rid of them and how ;) ? So if you reset the history and clean the session cache, you should not have any PRContext instances anymore. Lukas -- Lukas Renggli http://www.lukas-renggli.ch From cdrick65 at gmail.com Sun Jul 27 16:01:03 2008 From: cdrick65 at gmail.com (cdrick) Date: Sun, 27 Jul 2008 16:01:03 +0200 Subject: Showing last updated structures In-Reply-To: <6F9DB940-61E8-46CE-B34B-1403D5D4AF41@iam.unibe.ch> References: <6F9DB940-61E8-46CE-B34B-1403D5D4AF41@iam.unibe.ch> Message-ID: Hi, >> >> there is a checked inst var in PRCommand. I think I could use >> similarly an inst var, or a wrapper for timestamp to associated it >> with a boolean... >> What would you do ? > > I don't understand. There is already a time-stamp recorded within all > the commands (see inst-var refs to 'timestamp' in PRCommand). checked > is something else (see inst-var refs to 'checked' in PRCommand). This is icing on the cake :) I want some edit not being displayed in the "pages last updated" component. I guess I need to add a property because checked is use for persistency reason. When unchecked (trough the description) the property record will be set to false so this change won't be considered... I'll give a try soon. Thanks a lot C?drick > > As any Magritte or Pier object you can just use #propertyAt: and > #propertyAt:put: and a Magritte description for clean extension > without having to override or change something in the existing code. > >> checked seems to be use only in PBComment... >> >> PRCommand>>isChecked >> "Answer ==true== if the command should be checked before >> execution, e.g. the method ==#doValidate== should be executed at all." > > This is used in PRPersistency. This is an important part of the > persistency mechanism and allows to replay commands at a later point > in time without checking the validation conditions. I agree, that the > implementation should be improved for readability. > > Cheers, > Lukas > > -- > Lukas Renggli > http://www.lukas-renggli.ch > > > _______________________________________________ > SmallWiki, Magritte, Pier and Related Tools ... > https://www.iam.unibe.ch/mailman/listinfo/smallwiki > From rickf at ca-flower.com Sun Jul 27 17:31:44 2008 From: rickf at ca-flower.com (Richard E. Flower) Date: Sun, 27 Jul 2008 08:31:44 -0700 Subject: whats the best way to access the object data when doing custom rendering..? Message-ID: <00BC5C20-4D1F-43E0-BC71-A4003F75023E@ca-flower.com> 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 From rickf at ca-flower.com Sun Jul 27 18:13:06 2008 From: rickf at ca-flower.com (Richard E. Flower) Date: Sun, 27 Jul 2008 09:13:06 -0700 Subject: whats the best way to access the object data when doing custom rendering..? In-Reply-To: <00BC5C20-4D1F-43E0-BC71-A4003F75023E@ca-flower.com> References: <00BC5C20-4D1F-43E0-BC71-A4003F75023E@ca-flower.com> Message-ID: <553BC924-87EE-4D2C-AF2D-39B97C00B270@ca-flower.com> I should have mentioned that I'm asking about accessing the memento (proxied) data specifically.. Thx! -- Rick On Jul 27, 2008, at 8:31 AM, Richard E. Flower wrote: > 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 > > > _______________________________________________ > SmallWiki, Magritte, Pier and Related Tools ... > https://www.iam.unibe.ch/mailman/listinfo/smallwiki > From rickf at ca-flower.com Sun Jul 27 21:10:46 2008 From: rickf at ca-flower.com (Richard E. Flower) Date: Sun, 27 Jul 2008 12:10:46 -0700 Subject: whats the best way to access the object data when doing custom rendering..? In-Reply-To: <553BC924-87EE-4D2C-AF2D-39B97C00B270@ca-flower.com> References: <00BC5C20-4D1F-43E0-BC71-A4003F75023E@ca-flower.com> <553BC924-87EE-4D2C-AF2D-39B97C00B270@ca-flower.com> Message-ID: Ok.. In thinking about it further, I believe I may not need direct access to all elements of a description but I would like to be able to wrap divs around certain object descriptions for formatting purposes.. Is this the best way to achieve that goal? TIA! -- Rick On Jul 27, 2008, at 9:13 AM, Richard E. Flower wrote: > I should have mentioned that I'm asking about accessing the memento > (proxied) data specifically.. Thx! > > -- Rick > > On Jul 27, 2008, at 8:31 AM, Richard E. Flower wrote: > >> 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 >> >> >> _______________________________________________ >> SmallWiki, Magritte, Pier and Related Tools ... >> https://www.iam.unibe.ch/mailman/listinfo/smallwiki >> > > > _______________________________________________ > SmallWiki, Magritte, Pier and Related Tools ... > https://www.iam.unibe.ch/mailman/listinfo/smallwiki > From renggli at iam.unibe.ch Sun Jul 27 21:45:22 2008 From: renggli at iam.unibe.ch (Lukas Renggli) Date: Sun, 27 Jul 2008 21:45:22 +0200 Subject: whats the best way to access the object data when doing custom rendering..? In-Reply-To: <00BC5C20-4D1F-43E0-BC71-A4003F75023E@ca-flower.com> References: <00BC5C20-4D1F-43E0-BC71-A4003F75023E@ca-flower.com> Message-ID: <008C50CF-FD0E-4701-B44E-519387775595@iam.unibe.ch> On Jul 27, 2008, at 17:31 , Richard E. Flower wrote: > 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.. Have a look at the implementation of MAContainerComponent, it already does what you want. anObject readUsing: aDescription "reading" anObject write: aValue using: aDescription "writing" Essentially you always use the above two constructs, no matter if anObject is a memento or a real object. You just need to know the description. > 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! There are several open-source examples on squeaksource.com (Conrad, ical, ...) and source.lukas-rengli.ch (Pier, Audioscrobbler, MSE File Format, Magritte Add-Ons, Magritte Tutorial, More Magritte Add Ons, ...) that use Magritte, but I guess that doesn't help you much if you are on VW. You might still want to have a look at the code though (through the web interface). Cheers, Lukas -- Lukas Renggli http://www.lukas-renggli.ch From renggli at iam.unibe.ch Sun Jul 27 21:48:48 2008 From: renggli at iam.unibe.ch (Lukas Renggli) Date: Sun, 27 Jul 2008 21:48:48 +0200 Subject: whats the best way to access the object data when doing custom rendering..? In-Reply-To: References: <00BC5C20-4D1F-43E0-BC71-A4003F75023E@ca-flower.com> <553BC924-87EE-4D2C-AF2D-39B97C00B270@ca-flower.com> Message-ID: <1A2212C2-9F10-418C-8A7D-01A17D68AA2F@iam.unibe.ch> > Ok.. In thinking about it further, I believe I may not need direct > access to all elements of a description but > I would like to be able to wrap divs around certain object > descriptions for formatting purposes.. Is this the > best way to achieve that goal? TIA! What goal? If this is just about styling specific descriptions when using the default Seaside renderer you might want to use aDescription cssClass: 'foo' This adds the CSS CLASS .foo to the description aDescription. Cheers, Lukas > > > -- Rick > > On Jul 27, 2008, at 9:13 AM, Richard E. Flower wrote: > >> I should have mentioned that I'm asking about accessing the memento >> (proxied) data specifically.. Thx! >> >> -- Rick >> >> On Jul 27, 2008, at 8:31 AM, Richard E. Flower wrote: >> >>> 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 >>> >>> >>> _______________________________________________ >>> SmallWiki, Magritte, Pier and Related Tools ... >>> https://www.iam.unibe.ch/mailman/listinfo/smallwiki >>> >> >> >> _______________________________________________ >> SmallWiki, Magritte, Pier and Related Tools ... >> https://www.iam.unibe.ch/mailman/listinfo/smallwiki >> > > > _______________________________________________ > SmallWiki, Magritte, Pier and Related Tools ... > https://www.iam.unibe.ch/mailman/listinfo/smallwiki -- Lukas Renggli http://www.lukas-renggli.ch From rickf at ca-flower.com Sun Jul 27 22:37:29 2008 From: rickf at ca-flower.com (Richard E. Flower) Date: Sun, 27 Jul 2008 13:37:29 -0700 Subject: whats the best way to access the object data when doing custom rendering..? In-Reply-To: <008C50CF-FD0E-4701-B44E-519387775595@iam.unibe.ch> References: <00BC5C20-4D1F-43E0-BC71-A4003F75023E@ca-flower.com> <008C50CF-FD0E-4701-B44E-519387775595@iam.unibe.ch> Message-ID: <603CF8FF-ADD1-4291-91C2-B9A4C150E1EC@ca-flower.com> Thanks Lukas.. I looked in the class you mentioned but didn't see any of the code you show below.. Perhaps my version is older or whatever.. I did poke around on your site at a handful of projects but didn't see anything doing the same sort of thing I'm trying to do (I was specifically looking for code that subclasses MAContainerComponent and goes from there.. Perhaps I'm going about it wrong.. I've got a glorified user record that has the typical address info but also has other fields such as security questions and other stuff.. What I've got in my old (non-Magritte) code was to wrap divs around certain areas of the layout (address info is wrapped in a div and then other areas are wrapped in another div) to get the formatting I want via css.. Is there some other way? Sorry for being a pain in the rear, but I feel a bit lost on how to proceed.. Thx! On Jul 27, 2008, at 12:45 PM, Lukas Renggli wrote: > > On Jul 27, 2008, at 17:31 , Richard E. Flower wrote: > >> 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.. > > Have a look at the implementation of MAContainerComponent, it already > does what you want. > > anObject readUsing: aDescription "reading" > anObject write: aValue using: aDescription "writing" > > Essentially you always use the above two constructs, no matter if > anObject is a memento or a real object. You just need to know the > description. > >> 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! > > There are several open-source examples on squeaksource.com (Conrad, > ical, ...) and source.lukas-rengli.ch (Pier, Audioscrobbler, MSE File > Format, Magritte Add-Ons, Magritte Tutorial, More Magritte Add > Ons, ...) that use Magritte, but I guess that doesn't help you much if > you are on VW. You might still want to have a look at the code though > (through the web interface). > > Cheers, > Lukas > > -- > Lukas Renggli > http://www.lukas-renggli.ch > > > _______________________________________________ > SmallWiki, Magritte, Pier and Related Tools ... > https://www.iam.unibe.ch/mailman/listinfo/smallwiki > From keith_hodges at yahoo.co.uk Mon Jul 28 00:49:31 2008 From: keith_hodges at yahoo.co.uk (Keith Hodges) Date: Sun, 27 Jul 2008 23:49:31 +0100 Subject: Styling Magritte In-Reply-To: <849FE18D-2E4F-4D48-8C09-82CC740C0303@ca-flower.com> References: <48078F1B.9080309@yahoo.co.uk> <849FE18D-2E4F-4D48-8C09-82CC740C0303@ca-flower.com> Message-ID: <488CFB7B.1000305@yahoo.co.uk> 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 From renggli at iam.unibe.ch Mon Jul 28 09:31:51 2008 From: renggli at iam.unibe.ch (Lukas Renggli) Date: Mon, 28 Jul 2008 09:31:51 +0200 Subject: whats the best way to access the object data when doing custom rendering..? In-Reply-To: <603CF8FF-ADD1-4291-91C2-B9A4C150E1EC@ca-flower.com> References: <00BC5C20-4D1F-43E0-BC71-A4003F75023E@ca-flower.com> <008C50CF-FD0E-4701-B44E-519387775595@iam.unibe.ch> <603CF8FF-ADD1-4291-91C2-B9A4C150E1EC@ca-flower.com> Message-ID: <9A160322-8256-4BA0-8AAA-3EC44282170A@iam.unibe.ch> > Thanks Lukas.. I looked in the class you mentioned but didn't see any > of the code you > show below.. Perhaps my version is older or whatever.. I did poke > around on your > site at a handful of projects but didn't see anything doing the same > sort of thing I'm > trying to do (I was specifically looking for code that subclasses > MAContainerComponent > and goes from there.. Perhaps I'm going about it wrong.. MAContainerComponent only triggers (see renderContentOn:) the component renderer (MAComponentRenderer). The component renderer knows how to layout the components of the individual descriptions (subclasses of MAElementComponent). This is the actual place where the data is read and written, according to the displayed editor. > I've got a glorified user record that has the typical address info but > also has other > fields such as security questions and other stuff.. What I've got in > my old (non-Magritte) > code was to wrap divs around certain areas of the layout (address info > is wrapped > in a div and then other areas are wrapped in another div) to get the > formatting I want via > css.. Is there some other way? Sorry for being a pain in the rear, > but I feel a bit lost on > how to proceed.. Thx! Yes, I understand. That's what #cssClass: is used for. It is not an extra DIV that is wrapped around the description, but it is enough to do anything to the layout. Cheers, Lukas -- Lukas Renggli http://www.lukas-renggli.ch From rickf at ca-flower.com Tue Jul 29 07:48:18 2008 From: rickf at ca-flower.com (Richard E. Flower) Date: Mon, 28 Jul 2008 22:48:18 -0700 Subject: Question regarding Magritte-Addons package.. Message-ID: <894CC344-32CE-4DBF-A661-4160ADA0630F@ca-flower.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 From renggli at me.com Tue Jul 29 08:30:54 2008 From: renggli at me.com (Lukas Renggli) Date: Tue, 29 Jul 2008 08:30:54 +0200 Subject: Question regarding Magritte-Addons package.. In-Reply-To: <894CC344-32CE-4DBF-A661-4160ADA0630F@ca-flower.com> References: <894CC344-32CE-4DBF-A661-4160ADA0630F@ca-flower.com> Message-ID: <27E281D2-5CCD-47C0-8764-70FC4FFBAFA5@me.com> Magritte didn't change that much over the past few years. These were mostly backwardcompatible bug fixes and small enhancements. If possible, I would contact the original author and try with the latest Magritte on Squeak first. Cheers, Lukas -- Lukas Renggli http://www.lukas-renggli.ch On 29 Jul 2008, at 07:48, "Richard E. Flower" wrote: > 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 > > > _______________________________________________ > SmallWiki, Magritte, Pier and Related Tools ... > https://www.iam.unibe.ch/mailman/listinfo/smallwiki From lists+pier at danieroux.com Tue Jul 29 14:29:49 2008 From: lists+pier at danieroux.com (Danie Roux) Date: Tue, 29 Jul 2008 14:29:49 +0200 Subject: Adding conditions for more than the current description Message-ID: 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 From matthias.berth at googlemail.com Tue Jul 29 15:18:33 2008 From: matthias.berth at googlemail.com (Matthias Berth) Date: Tue, 29 Jul 2008 15:18:33 +0200 Subject: Adding conditions for more than the current description In-Reply-To: References: Message-ID: <9aa6ae270807290618p3e68f49cg8912dc0e33c39cb5@mail.gmail.com> Danie, try this: http://onsmalltalk.com/programming/smalltalk/multiple-field-validation-rules-in-magritte/ :-) Matthias On Tue, Jul 29, 2008 at 2:29 PM, Danie Roux wrote: > 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 > > _______________________________________________ > SmallWiki, Magritte, Pier and Related Tools ... > https://www.iam.unibe.ch/mailman/listinfo/smallwiki > From rickf at ca-flower.com Wed Jul 30 18:52:19 2008 From: rickf at ca-flower.com (Rick Flower) Date: Wed, 30 Jul 2008 09:52:19 -0700 (PDT) Subject: Thanks Lukas! Message-ID: <44890.157.127.124.14.1217436739.squirrel@www.ca-flower.com> 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