From stephane.ducasse at univ-savoie.fr Tue May 1 15:22:02 2007 From: stephane.ducasse at univ-savoie.fr (=?ISO-8859-1?Q?St=E9phane_Ducasse?=) Date: Tue, 1 May 2007 15:22:02 +0200 Subject: about slowdown between 38 and 39 Message-ID: hi lukas have you noticed a real slowdown between 3.8 and 3.9? For my small comix application when I load and run the same version In 3.8 full I reloaded from scratch everything from Pier 1.0.9 Magritte-Model 242 Magritte-Seaside 214 XML-Parser 3 Time millisecondsToRun: [ | bdb | BDBase initialize. BDBase resetBaseNamed: #BD. bdb := BDBase new name: #BD. bdb importMostRecentXML.] 1677 In 3.9 full reloaded from scratch everything from Pier 1.0.9 Magritte-Model 242 Magritte-Seaside 214 XML-Parser 3 Time millisecondsToRun: [ | bdb | BDBase initialize. BDBase resetBaseNamed: #BD. bdb := BDBase new name: #BD. bdb importMostRecentXML.] 21151 The import is basically using magritte and domparser. I will run messageTally to see if I get some idea. Stef From renggli at iam.unibe.ch Tue May 1 15:51:59 2007 From: renggli at iam.unibe.ch (Lukas Renggli) Date: Tue, 1 May 2007 15:51:59 +0200 Subject: about slowdown between 38 and 39 In-Reply-To: References: Message-ID: <82F184E0-39ED-49AF-A41C-C21A59B2B1DB@iam.unibe.ch> > have you noticed a real slowdown between 3.8 and 3.9? > For my small comix application when I load and run the same version That's odd. Usually I found Squeak 3.9 much faster. Magnitudes faster. > The import is basically using magritte and domparser. > > I will run messageTally to see if I get some idea. Yes, it would be interesting to compare the traces. Maybe the parser does something special in 3.9? Pier and Magritte use exactly the same code in both versions. Cheers, Lukas -- Lukas Renggli http://www.lukas-renggli.ch From ducasse at iam.unibe.ch Tue May 1 22:27:28 2007 From: ducasse at iam.unibe.ch (=?ISO-8859-1?Q?st=E9phane_ducasse?=) Date: Tue, 1 May 2007 22:27:28 +0200 Subject: about slowdown between 38 and 39 In-Reply-To: <82F184E0-39ED-49AF-A41C-C21A59B2B1DB@iam.unibe.ch> References: <82F184E0-39ED-49AF-A41C-C21A59B2B1DB@iam.unibe.ch> Message-ID: <04A7877E-C754-4D74-8892-AAA7BEE40EB2@iam.unibe.ch> I found the problem and posted on squeak-dev InputSensor.... is much much slower Stef On 1 mai 07, at 15:51, Lukas Renggli wrote: >> have you noticed a real slowdown between 3.8 and 3.9? >> For my small comix application when I load and run the same version > > That's odd. Usually I found Squeak 3.9 much faster. Magnitudes faster. > >> The import is basically using magritte and domparser. >> >> I will run messageTally to see if I get some idea. > > Yes, it would be interesting to compare the traces. Maybe the parser > does something special in 3.9? Pier and Magritte use exactly the same > code in both versions. > > Cheers, > Lukas > > -- > Lukas Renggli > http://www.lukas-renggli.ch > > > > _______________________________________________ > SmallWiki, Magritte, Pier and Related Tools ... > https://www.iam.unibe.ch/mailman/listinfo/smallwiki From philippe.marschall at gmail.com Sat May 5 09:39:01 2007 From: philippe.marschall at gmail.com (Philippe Marschall) Date: Sat, 5 May 2007 09:39:01 +0200 Subject: Semantic MediaWiki Message-ID: <66666f210705050039s76155929hff73b8aae6f0ab35@mail.gmail.com> Finally they found out that strings ain't gonna cut it: http://wiki.ontoworld.org/wiki/Semantic_MediaWiki Cheers Philippe From ramirodt at gmail.com Tue May 8 20:12:38 2007 From: ramirodt at gmail.com (Ramiro Diaz Trepat) Date: Tue, 8 May 2007 15:12:38 -0300 Subject: Magritte component customization Message-ID: <313dbe090705081112s7338403evee89a5fde75c98cc@mail.gmail.com> Hello again, I want to use a Magritte Seaside component with a different set of actions / buttons than the default ( save / cancel ) Looking through the list, I found that the required thing to do is to program the extensions to MAContainerComponent, and then build the component with a call like this: (self model descriptionRequiredFields asComponentOn: self model) addValidatedForm: #( register cancel ) What I am not sure about, is what is the proper way to do this extensions. Should I subclass MAContainer and override #componentClass to make it return a subclass of MAContainerComponent (of my application) that implements the actions I need (like register in the example above) ? Has anyone got an example of this sort of action overriding in Magritte forms? Thanks r. From norbert at hartl.name Tue May 8 21:11:26 2007 From: norbert at hartl.name (Norbert Hartl) Date: Tue, 08 May 2007 21:11:26 +0200 Subject: Magritte component customization In-Reply-To: <313dbe090705081112s7338403evee89a5fde75c98cc@mail.gmail.com> References: <313dbe090705081112s7338403evee89a5fde75c98cc@mail.gmail.com> Message-ID: <1178651486.23077.14.camel@localhost> On Tue, 2007-05-08 at 15:12 -0300, Ramiro Diaz Trepat wrote: > Hello again, > I want to use a Magritte Seaside component with a different set of > actions / buttons than the default ( save / cancel ) > Looking through the list, I found that the required thing to do is > to program the extensions to MAContainerComponent, and then build the > component with a call like this: > > (self model descriptionRequiredFields asComponentOn: self model) > addValidatedForm: #( register cancel ) > > What I am not sure about, is what is the proper way to do this extensions. > > Should I subclass MAContainer and override #componentClass to make > it return a subclass of MAContainerComponent (of my application) that > implements the actions I need (like register in the example above) ? > > Has anyone got an example of this sort of action overriding in > Magritte forms? You only have this problem if you are using Magrittes FormDecoration. You can easily create your own decoration class instead. Just have a look at MAFormDecoration and build your own with your special needs. Norbert From cnantais at gmail.com Wed May 9 07:27:35 2007 From: cnantais at gmail.com (Chad Nantais) Date: Tue, 8 May 2007 22:27:35 -0700 Subject: MAOneToManyComponent>>value not getting set In-Reply-To: <4FEC095F-9A08-46D7-9FA7-17CA970A9A02@iam.unibe.ch> References: <3de931600704271622s1e2553fes8260123b84fe341f@mail.gmail.com> <4FEC095F-9A08-46D7-9FA7-17CA970A9A02@iam.unibe.ch> Message-ID: <3de931600705082227v38199d18m725a0cbc968ea397@mail.gmail.com> Hey Lukas, It's actually the MAOneToManyComponent>>value that is nil, and not the model. This error occurs during the answer back from the model editor to the collection report. It has something to do with the MAOneToManyComponent's memento having a nil value for #cache. Any help is appreciated, as always. Cheers, Chad On 4/29/07, Lukas Renggli wrote: > > When trying to add a new item inside an MAToManyRelationDescription > > container, I get the error found in the attached file. It says that > > the MAOneToManyComponent>>value is an undefined object. > > > > I reproduced this error in the MADescriptionEditor example as well as > > in my code. > > > > I'm using the latest Magritte-all package. > > I cannot reproduce. Are you sure to have initialized the collection > or set the default value to be #()? > > Cheers, > Lukas > > -- > Lukas Renggli > http://www.lukas-renggli.ch > > > > _______________________________________________ > SmallWiki, Magritte, Pier and Related Tools ... > https://www.iam.unibe.ch/mailman/listinfo/smallwiki > -- Chad Nantais Buy my album Zero Ground on iTunes: http://tinyurl.com/2sojcn View my artist profile on MySpace Music: http://myspace.com/chadnantais Hear my music on-demand on Last.fm: http://www.last.fm/music/Chad+Nantais From norbert at hartl.name Wed May 9 12:14:41 2007 From: norbert at hartl.name (Norbert Hartl) Date: Wed, 09 May 2007 12:14:41 +0200 Subject: validation of referenced objects Message-ID: <1178705681.11421.22.camel@localhost> Hi, I have an image object which references a user. For the user there is a descriptionContainer which adds conditions for the user (checks equality of password). In a component dealing with the image there appears something strange. If I do a validate on that component it complains abaut value cache being unknown. And this is coming from the descriptionContainer of the user object. Is it normal for the referenced objects to be checked as well? Or do I misunderstand something? thanks, Norbert From rbb at techgame.net Thu May 10 07:33:46 2007 From: rbb at techgame.net (Brian Brown) Date: Wed, 9 May 2007 23:33:46 -0600 Subject: MASingleOptionDescription or MAOneToManyDescription? Message-ID: <83597B46-F579-4551-97CB-D2FB14C38834@techgame.net> Hello folks! I'm finally diving into Magritte and things are going quite well in general. I have one situation I can't quite figure out how to solve.... I have a Person class with in ivar that holds an Organization. I would like to present a drop down list of Organizations when editing the person. I have tried various permutations of MASingleOptionDescription and MAOneToManyDescription, but I am not groking how they should be used :) For example, I have tried an OrderedCollection of Organizations as the argument to MASingleOptionDescription>>options:, among a bunch of other things I tried, but no joy. Anyone have any suggestions for me? thanks! Brian From norbert at hartl.name Thu May 10 11:02:56 2007 From: norbert at hartl.name (Norbert Hartl) Date: Thu, 10 May 2007 11:02:56 +0200 Subject: validation of referenced objects In-Reply-To: <1178705681.11421.22.camel@localhost> References: <1178705681.11421.22.camel@localhost> Message-ID: <1178787776.11421.103.camel@localhost> On Wed, 2007-05-09 at 12:14 +0200, Norbert Hartl wrote: > Hi, > > I have an image object which references a user. For > the user there is a descriptionContainer which adds > conditions for the user (checks equality of password). > In a component dealing with the image there appears > something strange. If I do a validate on that component > it complains abaut value cache being unknown. And this > is coming from the descriptionContainer of the user > object. Is it normal for the referenced objects to be > checked as well? Or do I misunderstand something? > I narrowed the problem a bit. I have User class>>descriptionContainer | user | ^ super descriptionContainer addCondition: [ :value | ( (value cache at: self descriptionPassword ifAbsent: []) = (value original at: self descriptionPassword ifAbsent: [])) ifFalse: [ (value cache at: self descriptionPassword ifAbsent: []) = (value cache at: self descriptionPasswordMatch ifAbsent: []) ] ifTrue: [ true ] ] I have objects which reference an Image. The image itself references a user. If I edit the user object I get a MACheckedMemento for the value in the condition. If I edit an object which references the image there are two possibilities. If I upload a new image (which creates a new image and assigns it a user) everything is fine. If I leave the image upload field empty I get a "User DNU cache". Looking at the value in the condition it is of type User. Is Magritte always checking the complete tree of referenced objects. This is often undesirable, e.g. if I assign an object which is an existing one and therefor has been checked already. How can it happen that that condition gets the real object as a value instead of the memento? In the failure case I do not invoke self value: at all. So I'm sure not to store anything strange. Norbert From renggli at iam.unibe.ch Thu May 10 15:45:00 2007 From: renggli at iam.unibe.ch (Lukas Renggli) Date: Thu, 10 May 2007 15:45:00 +0200 Subject: MAOneToManyComponent>>value not getting set In-Reply-To: <3de931600705082227v38199d18m725a0cbc968ea397@mail.gmail.com> References: <3de931600704271622s1e2553fes8260123b84fe341f@mail.gmail.com> <4FEC095F-9A08-46D7-9FA7-17CA970A9A02@iam.unibe.ch> <3de931600705082227v38199d18m725a0cbc968ea397@mail.gmail.com> Message-ID: <0F1A6287-2739-4986-9E66-747F588102A6@iam.unibe.ch> > It's actually the MAOneToManyComponent>>value that is nil, and not > the model. > This error occurs during the answer back from the model editor to the > collection report. It has something to do with the > MAOneToManyComponent's memento having a nil value for #cache. And in your object the value is actually a collection? Usually the cache just reads the value from your object. I am confused. How can I reproduce? Cheers, Lukas -- Lukas Renggli http://www.lukas-renggli.ch From renggli at iam.unibe.ch Thu May 10 15:45:01 2007 From: renggli at iam.unibe.ch (Lukas Renggli) Date: Thu, 10 May 2007 15:45:01 +0200 Subject: MASingleOptionDescription or MAOneToManyDescription? In-Reply-To: <83597B46-F579-4551-97CB-D2FB14C38834@techgame.net> References: <83597B46-F579-4551-97CB-D2FB14C38834@techgame.net> Message-ID: <3492FAAD-868E-4DE5-805D-D4695C798D3A@iam.unibe.ch> > I have a Person class with in ivar that holds an Organization. I > would like to present a drop down list of Organizations when editing > the person. I have tried various permutations of > MASingleOptionDescription and MAOneToManyDescription, but I am not > groking how they should be used :) That sounds like a MASingleOptionDescription. Try something like (I just copied this example from Pier): descriptionAlign ^ MASingleOptionDescription new selectorAccessor: #align; label: 'Align'; options: #(nil #left #center #right ); yourself There is also #optionsAndLabels: if you need something special for the labels. So you could write: descriptionAlign ^ MASingleOptionDescription new selectorAccessor: #align; label: 'Align'; optionsAndLabels: { nil -> 'Undefined'. #left -> 'Left Align'. ... }; yourself Cheers, Lukas -- Lukas Renggli http://www.lukas-renggli.ch From renggli at iam.unibe.ch Thu May 10 15:45:03 2007 From: renggli at iam.unibe.ch (Lukas Renggli) Date: Thu, 10 May 2007 15:45:03 +0200 Subject: validation of referenced objects In-Reply-To: <1178787776.11421.103.camel@localhost> References: <1178705681.11421.22.camel@localhost> <1178787776.11421.103.camel@localhost> Message-ID: > Is Magritte always checking the complete tree of referenced objects. > This is often undesirable, e.g. if I assign an object which is an > existing one and therefor has been checked already. I don't remember, I think I changed something in there recently. You have to check in MAValidatorVisitor. > How can it happen that that condition gets the real object as a value > instead of the memento? In the failure case I do not invoke self > value: at all. So I'm sure not to store anything strange. I personally never used the MAToOneRelationDescription and MAToManyRelationDescription. The design of how Magritte handles those is simply wrong, therefor many people run into problems when using them. I suggest that somebody that really needs them gives a try and implements them cleanly. I have some ideas about that, but unfortunately I don't have the time to do it myself. Lukas -- Lukas Renggli http://www.lukas-renggli.ch From damien.cassou at gmail.com Thu May 10 16:08:57 2007 From: damien.cassou at gmail.com (Damien Cassou) Date: Thu, 10 May 2007 16:08:57 +0200 Subject: MAReport status Message-ID: <6ac749c10705100708o2ece0cdblf504816a58ca4f84@mail.gmail.com> Hi, what is the status of MAReport? A student uses MAReport to display a list of models. Each row has a #remove: command associated. The problem appears if the user click on a header to sort the table and then click on the #remove link. The table is not refreshed. Callin #refresh reset the MAReport and puts it on the first page :-( Can you help me? -- Damien Cassou From renggli at iam.unibe.ch Thu May 10 16:32:11 2007 From: renggli at iam.unibe.ch (Lukas Renggli) Date: Thu, 10 May 2007 16:32:11 +0200 Subject: MAReport status In-Reply-To: <6ac749c10705100708o2ece0cdblf504816a58ca4f84@mail.gmail.com> References: <6ac749c10705100708o2ece0cdblf504816a58ca4f84@mail.gmail.com> Message-ID: <4E98F4B1-1C41-406C-AA71-E722942D9336@iam.unibe.ch> > what is the status of MAReport? A student uses MAReport to display a > list of models. Each row has a #remove: command associated. The > problem appears if the user click on a header to sort the table and > then click on the #remove link. The table is not refreshed. Callin > #refresh reset the MAReport and puts it on the first page :-( > > Can you help me? Yes, that refresh is required, because a user could click on the last item of a page and then end up on an empty page. The refresh could be a bit smarter though and put the user somewhere near the removed object. As I said in my previous mail I never used MAToOneRelationDescription and MAToManyRelationDescription personally, and the MAReport is sort of related to that. Please commit a fix, if you need it. Cheers, Lukas -- Lukas Renggli http://www.lukas-renggli.ch From norbert at hartl.name Thu May 10 16:32:23 2007 From: norbert at hartl.name (Norbert Hartl) Date: Thu, 10 May 2007 16:32:23 +0200 Subject: validation of referenced objects In-Reply-To: References: <1178705681.11421.22.camel@localhost> <1178787776.11421.103.camel@localhost> Message-ID: <1178807543.11421.106.camel@localhost> On Thu, 2007-05-10 at 15:45 +0200, Lukas Renggli wrote: > > Is Magritte always checking the complete tree of referenced objects. > > This is often undesirable, e.g. if I assign an object which is an > > existing one and therefor has been checked already. > > I don't remember, I think I changed something in there recently. You > have to check in MAValidatorVisitor. > I'll have a look at it. > > How can it happen that that condition gets the real object as a value > > instead of the memento? In the failure case I do not invoke self > > value: at all. So I'm sure not to store anything strange. > > I personally never used the MAToOneRelationDescription and > MAToManyRelationDescription. The design of how Magritte handles those > is simply wrong, therefor many people run into problems when using them. > How do you model a reference between objects? I think it is quite common to interconnect objects ;) > I suggest that somebody that really needs them gives a try and > implements them cleanly. I have some ideas about that, but > unfortunately I don't have the time to do it myself. Me neither. Maybe I have to do it soon because I use references a lot and I don't think I can rip them out now. Norbert From cnantais at gmail.com Thu May 10 16:36:44 2007 From: cnantais at gmail.com (Chad Nantais) Date: Thu, 10 May 2007 07:36:44 -0700 Subject: MAOneToManyComponent>>value not getting set In-Reply-To: <0F1A6287-2739-4986-9E66-747F588102A6@iam.unibe.ch> References: <3de931600704271622s1e2553fes8260123b84fe341f@mail.gmail.com> <4FEC095F-9A08-46D7-9FA7-17CA970A9A02@iam.unibe.ch> <3de931600705082227v38199d18m725a0cbc968ea397@mail.gmail.com> <0F1A6287-2739-4986-9E66-747F588102A6@iam.unibe.ch> Message-ID: <3de931600705100736v7fd2da47nf8e194eb685bdb88@mail.gmail.com> Lukas, Sorry to be confusing. But here's more of an explanation. I have a class ImageFolderDescription, which is a subclass of MAToManyRelationDescription. This description is added to my PlantModel through a DescriptionEditor. So, when someone goes to the edit form for PlantModel, the form contains an MAOneToManyComponent for the Plant's ImageFolderDescription. When they click the add button to create a new image in the ImageFolder, it shows them the editor component for the image--no problem. But once they are done editing the image and click the Save button, they get the "UndefinedObject>>copyWith:" error. In fact it doesn't matter which class I add to the ImageFolder, whether its an image or and Object or a credit card, it still throws this error. Chad On 5/10/07, Lukas Renggli wrote: > > It's actually the MAOneToManyComponent>>value that is nil, and not > > the model. > > This error occurs during the answer back from the model editor to the > > collection report. It has something to do with the > > MAOneToManyComponent's memento having a nil value for #cache. > > And in your object the value is actually a collection? Usually the > cache just reads the value from your object. > > I am confused. How can I reproduce? > > Cheers, > Lukas > > -- > Lukas Renggli > http://www.lukas-renggli.ch > > > > _______________________________________________ > SmallWiki, Magritte, Pier and Related Tools ... > https://www.iam.unibe.ch/mailman/listinfo/smallwiki > -- Chad Nantais Buy my album Zero Ground on iTunes: http://tinyurl.com/2sojcn View my artist profile on MySpace Music: http://myspace.com/chadnantais Hear my music on-demand on Last.fm: http://www.last.fm/music/Chad+Nantais From renggli at iam.unibe.ch Thu May 10 16:42:45 2007 From: renggli at iam.unibe.ch (Lukas Renggli) Date: Thu, 10 May 2007 16:42:45 +0200 Subject: validation of referenced objects In-Reply-To: <1178807543.11421.106.camel@localhost> References: <1178705681.11421.22.camel@localhost> <1178787776.11421.103.camel@localhost> <1178807543.11421.106.camel@localhost> Message-ID: >>> How can it happen that that condition gets the real object as a >>> value >>> instead of the memento? In the failure case I do not invoke self >>> value: at all. So I'm sure not to store anything strange. >> >> I personally never used the MAToOneRelationDescription and >> MAToManyRelationDescription. The design of how Magritte handles those >> is simply wrong, therefor many people run into problems when using >> them. > > How do you model a reference between objects? I think it is quite > common to interconnect objects ;) Well, the MARelationDescriptions were ment for that. They work well for some cases I encountered in industrial applications and to describe Magritte in itself, however they fail to describe relations in general. One of the problems is that you have a description on every end of the relation. Sometimes they are the same, sometimes not. Mostly the framework assumes that this is a MAContainerDescription, but sometimes it is not. When validating the framework has to decide which one to use and if it should recurse the validation into the referenced description. What I would prefer is to have a multiplicity for all the descriptions. It would probably make the form generation more difficult, but it would cleanly solve the above problems. >> I suggest that somebody that really needs them gives a try and >> implements them cleanly. I have some ideas about that, but >> unfortunately I don't have the time to do it myself. > > Me neither. Maybe I have to do it soon because I use references > a lot and I don't think I can rip them out now. Yes please. Cheers, Lukas -- Lukas Renggli http://www.lukas-renggli.ch From renggli at iam.unibe.ch Thu May 10 17:22:54 2007 From: renggli at iam.unibe.ch (Lukas Renggli) Date: Thu, 10 May 2007 17:22:54 +0200 Subject: MAOneToManyComponent>>value not getting set In-Reply-To: <3de931600705100736v7fd2da47nf8e194eb685bdb88@mail.gmail.com> References: <3de931600704271622s1e2553fes8260123b84fe341f@mail.gmail.com> <4FEC095F-9A08-46D7-9FA7-17CA970A9A02@iam.unibe.ch> <3de931600705082227v38199d18m725a0cbc968ea397@mail.gmail.com> <0F1A6287-2739-4986-9E66-747F588102A6@iam.unibe.ch> <3de931600705100736v7fd2da47nf8e194eb685bdb88@mail.gmail.com> Message-ID: <21853EC6-CE1D-4D66-AC81-0E6885C84422@iam.unibe.ch> > I have a class ImageFolderDescription, which is a subclass of > MAToManyRelationDescription. This description is added to my > PlantModel through a DescriptionEditor. It is a bit hard to see what happens. I attached a file that tries to implement what you like to have: PlantModel with a collection of files. The attached code works for me. -------------- next part -------------- A non-text attachment was scrubbed... Name: PlantImages.st Type: application/octet-stream Size: 1455 bytes Desc: not available Url : http://www.iam.unibe.ch/pipermail/smallwiki/attachments/20070510/798ca993/PlantImages.obj -------------- next part -------------- Cheers, Lukas -- Lukas Renggli http://www.lukas-renggli.ch From rbb at techgame.net Thu May 10 18:48:15 2007 From: rbb at techgame.net (Brian Brown) Date: Thu, 10 May 2007 10:48:15 -0600 Subject: MASingleOptionDescription or MAOneToManyDescription? In-Reply-To: <3492FAAD-868E-4DE5-805D-D4695C798D3A@iam.unibe.ch> References: <83597B46-F579-4551-97CB-D2FB14C38834@techgame.net> <3492FAAD-868E-4DE5-805D-D4695C798D3A@iam.unibe.ch> Message-ID: On May 10, 2007, at 7:45 AM, Lukas Renggli wrote: >> I have a Person class with in ivar that holds an Organization. I >> would like to present a drop down list of Organizations when editing >> the person. I have tried various permutations of >> MASingleOptionDescription and MAOneToManyDescription, but I am not >> groking how they should be used :) > > That sounds like a MASingleOptionDescription. > > Try something like (I just copied this example from Pier): > > descriptionAlign > ^ MASingleOptionDescription new > selectorAccessor: #align; > label: 'Align'; > options: #(nil #left #center #right ); > yourself Ok, thanks for helping. I've tried that and here is what I have: descriptionOrg ^ (MASingleOptionDescription new) selectorAccessor: #org; label: 'Organization'; options: ALStorage orgs; priority: 20; yourself ALStorage>>orgs returns an OrderedCollection. The error I get is: ALOrganization(Object)>>doesNotUnderstand: #do: Receiver: an ALOrganization Arguments and temporary variables: aMessage: do: [] in WriteStream(Stream)>>nextPutAll: {[:v | self nextPut: v]} Receiver's instance variables: fullName: 'AbleLink Technologies, Inc.' address: nil caregivers: nil clients: nil licenses: nil shortName: 'AbleLink' contactManager: an ALServiceContactManager forums: nil uuid: nil staff: an OrderedCollection(an ALStaffMember) customers: nil WriteStream(Stream)>>nextPutAll: Receiver: a WriteStream '' Arguments and temporary variables: aCollection: an ALOrganization v: nil Receiver's instance variables: collection: '' position: 0 readLimit: 0 writeLimit: 0 WriteStream>>nextPutAll: Receiver: a WriteStream '' Arguments and temporary variables: aCollection: an ALOrganization newEnd: nil Receiver's instance variables: collection: '' position: 0 readLimit: 0 writeLimit: 0 MAStringWriter>>visitStringDescription: Receiver: a MAStringWriter Arguments and temporary variables: aDescription: a MAStringDescription label: '' comment: nil Receiver's instance variables: stream: a WriteStream '' object: an ALOrganization --- The full stack --- ALOrganization(Object)>>doesNotUnderstand: #do: WriteStream(Stream)>>nextPutAll: WriteStream>>nextPutAll: MAStringWriter>>visitStringDescription: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - MAStringDescription>>acceptMagritte: MAStringWriter(MAVisitor)>>visit: MAStringWriter(MAWriter)>>write:description:to: MAStringWriter>>write:description:to: MAStringWriter(MAWriter)>>write:description: MAStringWriter class(MAWriter class)>>write:description: MAStringDescription(MADescription)>>toString:writer: MAStringDescription(MADescription)>>toString: MASingleOptionDescription(MAOptionDescription)>>labelForOption: MASelectListComponent(MAOptionComponent)>>labelForOption: [] in MASelectListComponent>>renderEditorOn: {[:value | self labelForOption: value]} WASelectTag(WACollectionTag)>>labelForOption: [] in WASelectTag>>optionsOn: {[:each | brush := html option. (self isDisabled: each) ifTrue: [brush di...]} OrderedCollection>>do: WASelectTag>>optionsOn: [] in WASelectTag>>with: {[self optionsOn: canvas. aBlock value. self hasOther ifTrue: [canvas opt...]} BlockContext>>renderOn: WASelectTag(WATagBrush)>>within: [] in WASelectTag(WATagBrush)>>with: {[self within: aBlock]} BlockContext>>renderOn: WARenderCanvas(WACanvas)>>nest: WASelectTag(WABrush)>>with: WASelectTag(WATagBrush)>>with: WASelectTag>>with: WASelectTag(WABrush)>>close WARenderCanvas(WACanvas)>>flush WARenderCanvas>>close MASelectListComponent(WAPresenter)>>renderWithContext: [] in MASelectListComponent(WAComponent)>>renderOn: {[:each | each renderWithContext: aRenderer context]} MASelectListComponent(WAComponent)>>decorationChainDo: MASelectListComponent(WAComponent)>>renderOn: WARenderCanvas(WACanvas)>>render: MATableRenderer(MAComponentRenderer)>>renderControl: [] in MATableRenderer>>renderControl: {[super renderControl: aDescription]} BlockContext>>renderOn: WATableDataTag(WATagBrush)>>within: [] in WATableDataTag(WATagBrush)>>with: {[self within: aBlock]} BlockContext>>renderOn: WARenderCanvas(WACanvas)>>nest: WATableDataTag(WABrush)>>with: WATableDataTag(WATagBrush)>>with: MATableRenderer>>renderControl: MATableRenderer(MAComponentRenderer)>>renderElement: [] in MATableRenderer>>renderElement: {[super renderElement: aDescription]} BlockContext>>renderOn: WAGenericTag(WATagBrush)>>within: [] in WAGenericTag(WATagBrush)>>with: {[self within: aBlock]} BlockContext>>renderOn: WARenderCanvas(WACanvas)>>nest: WAGenericTag(WABrush)>>with: WAGenericTag(WATagBrush)>>with: WARenderCanvas(WAHtmlCanvas)>>tableRow: MATableRenderer>>renderElement: MATableRenderer(MAComponentRenderer)>>visitElementDescription: MATableRenderer(MAVisitor)>>visitReferenceDescription: MATableRenderer(MAVisitor)>>visitOptionDescription: ...etc... From renggli at iam.unibe.ch Thu May 10 18:58:38 2007 From: renggli at iam.unibe.ch (Lukas Renggli) Date: Thu, 10 May 2007 18:58:38 +0200 Subject: MASingleOptionDescription or MAOneToManyDescription? In-Reply-To: References: <83597B46-F579-4551-97CB-D2FB14C38834@techgame.net> <3492FAAD-868E-4DE5-805D-D4695C798D3A@iam.unibe.ch> Message-ID: <24E9CC40-F751-4D29-9B9A-7B6FC65BDAF3@iam.unibe.ch> >> Try something like (I just copied this example from Pier): >> >> descriptionAlign >> ^ MASingleOptionDescription new >> selectorAccessor: #align; >> label: 'Align'; >> options: #(nil #left #center #right ); >> yourself > > Ok, thanks for helping. I've tried that and here is what I have: > > descriptionOrg > ^ (MASingleOptionDescription new) > selectorAccessor: #org; > label: 'Organization'; > options: ALStorage orgs; > priority: 20; > yourself > > > ALStorage>>orgs returns an OrderedCollection. The error I get is: You have to tell Magritte how to display the organization. By default it assumes an MAStringDescription as reference, however in your case this seems to be something else. Try: descriptionOrg ^ (MASingleOptionDescription new) selectorAccessor: #org; reference: ALOrganization description; label: 'Organization'; options: ALStorage orgs; priority: 20; yourself Cheers, Lukas > > > > ALOrganization(Object)>>doesNotUnderstand: #do: > Receiver: an ALOrganization > Arguments and temporary variables: > aMessage: do: [] in WriteStream(Stream)>>nextPutAll: {[:v | self > nextPut: v]} > Receiver's instance variables: > fullName: 'AbleLink Technologies, Inc.' > address: nil > caregivers: nil > clients: nil > licenses: nil > shortName: 'AbleLink' > contactManager: an ALServiceContactManager > forums: nil > uuid: nil > staff: an OrderedCollection(an ALStaffMember) > customers: nil > > WriteStream(Stream)>>nextPutAll: > Receiver: a WriteStream '' > Arguments and temporary variables: > aCollection: an ALOrganization > v: nil > Receiver's instance variables: > collection: '' > position: 0 > readLimit: 0 > writeLimit: 0 > > WriteStream>>nextPutAll: > Receiver: a WriteStream '' > Arguments and temporary variables: > aCollection: an ALOrganization > newEnd: nil > Receiver's instance variables: > collection: '' > position: 0 > readLimit: 0 > writeLimit: 0 > > MAStringWriter>>visitStringDescription: > Receiver: a MAStringWriter > Arguments and temporary variables: > aDescription: a MAStringDescription label: '' comment: nil > Receiver's instance variables: > stream: a WriteStream '' > object: an ALOrganization > > > --- The full stack --- > ALOrganization(Object)>>doesNotUnderstand: #do: > WriteStream(Stream)>>nextPutAll: > WriteStream>>nextPutAll: > MAStringWriter>>visitStringDescription: > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > MAStringDescription>>acceptMagritte: > MAStringWriter(MAVisitor)>>visit: > MAStringWriter(MAWriter)>>write:description:to: > MAStringWriter>>write:description:to: > MAStringWriter(MAWriter)>>write:description: > MAStringWriter class(MAWriter class)>>write:description: > MAStringDescription(MADescription)>>toString:writer: > MAStringDescription(MADescription)>>toString: > MASingleOptionDescription(MAOptionDescription)>>labelForOption: > MASelectListComponent(MAOptionComponent)>>labelForOption: > [] in MASelectListComponent>>renderEditorOn: {[:value | self > labelForOption: value]} > WASelectTag(WACollectionTag)>>labelForOption: > [] in WASelectTag>>optionsOn: {[:each | brush := html option. (self > isDisabled: each) ifTrue: [brush di...]} > OrderedCollection>>do: > WASelectTag>>optionsOn: > [] in WASelectTag>>with: {[self optionsOn: canvas. aBlock value. > self hasOther ifTrue: [canvas opt...]} > BlockContext>>renderOn: > WASelectTag(WATagBrush)>>within: > [] in WASelectTag(WATagBrush)>>with: {[self within: aBlock]} > BlockContext>>renderOn: > WARenderCanvas(WACanvas)>>nest: > WASelectTag(WABrush)>>with: > WASelectTag(WATagBrush)>>with: > WASelectTag>>with: > WASelectTag(WABrush)>>close > WARenderCanvas(WACanvas)>>flush > WARenderCanvas>>close > MASelectListComponent(WAPresenter)>>renderWithContext: > [] in MASelectListComponent(WAComponent)>>renderOn: {[:each | each > renderWithContext: aRenderer context]} > MASelectListComponent(WAComponent)>>decorationChainDo: > MASelectListComponent(WAComponent)>>renderOn: > WARenderCanvas(WACanvas)>>render: > MATableRenderer(MAComponentRenderer)>>renderControl: > [] in MATableRenderer>>renderControl: {[super renderControl: > aDescription]} > BlockContext>>renderOn: > WATableDataTag(WATagBrush)>>within: > [] in WATableDataTag(WATagBrush)>>with: {[self within: aBlock]} > BlockContext>>renderOn: > WARenderCanvas(WACanvas)>>nest: > WATableDataTag(WABrush)>>with: > WATableDataTag(WATagBrush)>>with: > MATableRenderer>>renderControl: > MATableRenderer(MAComponentRenderer)>>renderElement: > [] in MATableRenderer>>renderElement: {[super renderElement: > aDescription]} > BlockContext>>renderOn: > WAGenericTag(WATagBrush)>>within: > [] in WAGenericTag(WATagBrush)>>with: {[self within: aBlock]} > BlockContext>>renderOn: > WARenderCanvas(WACanvas)>>nest: > WAGenericTag(WABrush)>>with: > WAGenericTag(WATagBrush)>>with: > WARenderCanvas(WAHtmlCanvas)>>tableRow: > MATableRenderer>>renderElement: > MATableRenderer(MAComponentRenderer)>>visitElementDescription: > MATableRenderer(MAVisitor)>>visitReferenceDescription: > MATableRenderer(MAVisitor)>>visitOptionDescription: > ...etc... > > > > > > > > _______________________________________________ > SmallWiki, Magritte, Pier and Related Tools ... > https://www.iam.unibe.ch/mailman/listinfo/smallwiki -- Lukas Renggli http://www.lukas-renggli.ch From damien.cassou at gmail.com Thu May 10 19:05:41 2007 From: damien.cassou at gmail.com (Damien Cassou) Date: Thu, 10 May 2007 19:05:41 +0200 Subject: MAReport status In-Reply-To: <4E98F4B1-1C41-406C-AA71-E722942D9336@iam.unibe.ch> References: <6ac749c10705100708o2ece0cdblf504816a58ca4f84@mail.gmail.com> <4E98F4B1-1C41-406C-AA71-E722942D9336@iam.unibe.ch> Message-ID: <6ac749c10705101005n2a0b8726m1b0c66290cda5cdc@mail.gmail.com> 2007/5/10, Lukas Renggli : > > what is the status of MAReport? A student uses MAReport to display a > > list of models. Each row has a #remove: command associated. The > > problem appears if the user click on a header to sort the table and > > then click on the #remove link. The table is not refreshed. Callin > > #refresh reset the MAReport and puts it on the first page :-( > > > > Can you help me? > > Yes, that refresh is required, because a user could click on the last > item of a page and then end up on an empty page. The refresh could be > a bit smarter though and put the user somewhere near the removed object. > > As I said in my previous mail I never used MAToOneRelationDescription > and MAToManyRelationDescription personally, and the MAReport is sort > of related to that. Please commit a fix, if you need it. The student does not use the relation descriptions too. He only wants a smart table. Thank you -- Damien Cassou From renggli at iam.unibe.ch Thu May 10 19:09:08 2007 From: renggli at iam.unibe.ch (Lukas Renggli) Date: Thu, 10 May 2007 19:09:08 +0200 Subject: MAReport status In-Reply-To: <6ac749c10705101005n2a0b8726m1b0c66290cda5cdc@mail.gmail.com> References: <6ac749c10705100708o2ece0cdblf504816a58ca4f84@mail.gmail.com> <4E98F4B1-1C41-406C-AA71-E722942D9336@iam.unibe.ch> <6ac749c10705101005n2a0b8726m1b0c66290cda5cdc@mail.gmail.com> Message-ID: >>> what is the status of MAReport? A student uses MAReport to display a >>> list of models. Each row has a #remove: command associated. The >>> problem appears if the user click on a header to sort the table and >>> then click on the #remove link. The table is not refreshed. Callin >>> #refresh reset the MAReport and puts it on the first page :-( >>> >>> Can you help me? >> >> Yes, that refresh is required, because a user could click on the last >> item of a page and then end up on an empty page. The refresh could be >> a bit smarter though and put the user somewhere near the removed >> object. >> >> As I said in my previous mail I never used MAToOneRelationDescription >> and MAToManyRelationDescription personally, and the MAReport is sort >> of related to that. Please commit a fix, if you need it. > > The student does not use the relation descriptions too. He only > wants a smart table. Anyway, the report was made as an editor to MAToManyRelationDescription. A lot of people have used it for other things (including myself). Lukas -- Lukas Renggli http://www.lukas-renggli.ch From rbb at techgame.net Thu May 10 19:25:33 2007 From: rbb at techgame.net (Brian Brown) Date: Thu, 10 May 2007 11:25:33 -0600 Subject: MASingleOptionDescription or MAOneToManyDescription? In-Reply-To: <24E9CC40-F751-4D29-9B9A-7B6FC65BDAF3@iam.unibe.ch> References: <83597B46-F579-4551-97CB-D2FB14C38834@techgame.net> <3492FAAD-868E-4DE5-805D-D4695C798D3A@iam.unibe.ch> <24E9CC40-F751-4D29-9B9A-7B6FC65BDAF3@iam.unibe.ch> Message-ID: <62780BD4-DC4E-4DC3-ABA0-A3CE5FB312D4@techgame.net> Danke Vielmals, Lukas! Alles Klar. Brian On May 10, 2007, at 10:58 AM, Lukas Renggli wrote: >>> Try something like (I just copied this example from Pier): >>> >>> descriptionAlign >>> ^ MASingleOptionDescription new >>> selectorAccessor: #align; >>> label: 'Align'; >>> options: #(nil #left #center #right ); >>> yourself >> >> Ok, thanks for helping. I've tried that and here is what I have: >> >> descriptionOrg >> ^ (MASingleOptionDescription new) >> selectorAccessor: #org; >> label: 'Organization'; >> options: ALStorage orgs; >> priority: 20; >> yourself >> >> >> ALStorage>>orgs returns an OrderedCollection. The error I get is: > > You have to tell Magritte how to display the organization. By default > it assumes an MAStringDescription as reference, however in your case > this seems to be something else. Try: > > descriptionOrg > ^ (MASingleOptionDescription new) > selectorAccessor: #org; > reference: ALOrganization description; > label: 'Organization'; > options: ALStorage orgs; > priority: 20; > yourself > > Cheers, > Lukas > > >> >> >> >> ALOrganization(Object)>>doesNotUnderstand: #do: >> Receiver: an ALOrganization >> Arguments and temporary variables: >> aMessage: do: [] in WriteStream(Stream)>>nextPutAll: {[:v | self >> nextPut: v]} >> Receiver's instance variables: >> fullName: 'AbleLink Technologies, Inc.' >> address: nil >> caregivers: nil >> clients: nil >> licenses: nil >> shortName: 'AbleLink' >> contactManager: an ALServiceContactManager >> forums: nil >> uuid: nil >> staff: an OrderedCollection(an ALStaffMember) >> customers: nil >> >> WriteStream(Stream)>>nextPutAll: >> Receiver: a WriteStream '' >> Arguments and temporary variables: >> aCollection: an ALOrganization >> v: nil >> Receiver's instance variables: >> collection: '' >> position: 0 >> readLimit: 0 >> writeLimit: 0 >> >> WriteStream>>nextPutAll: >> Receiver: a WriteStream '' >> Arguments and temporary variables: >> aCollection: an ALOrganization >> newEnd: nil >> Receiver's instance variables: >> collection: '' >> position: 0 >> readLimit: 0 >> writeLimit: 0 >> >> MAStringWriter>>visitStringDescription: >> Receiver: a MAStringWriter >> Arguments and temporary variables: >> aDescription: a MAStringDescription label: '' comment: nil >> Receiver's instance variables: >> stream: a WriteStream '' >> object: an ALOrganization >> >> >> --- The full stack --- >> ALOrganization(Object)>>doesNotUnderstand: #do: >> WriteStream(Stream)>>nextPutAll: >> WriteStream>>nextPutAll: >> MAStringWriter>>visitStringDescription: >> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - >> MAStringDescription>>acceptMagritte: >> MAStringWriter(MAVisitor)>>visit: >> MAStringWriter(MAWriter)>>write:description:to: >> MAStringWriter>>write:description:to: >> MAStringWriter(MAWriter)>>write:description: >> MAStringWriter class(MAWriter class)>>write:description: >> MAStringDescription(MADescription)>>toString:writer: >> MAStringDescription(MADescription)>>toString: >> MASingleOptionDescription(MAOptionDescription)>>labelForOption: >> MASelectListComponent(MAOptionComponent)>>labelForOption: >> [] in MASelectListComponent>>renderEditorOn: {[:value | self >> labelForOption: value]} >> WASelectTag(WACollectionTag)>>labelForOption: >> [] in WASelectTag>>optionsOn: {[:each | brush := html option. (self >> isDisabled: each) ifTrue: [brush di...]} >> OrderedCollection>>do: >> WASelectTag>>optionsOn: >> [] in WASelectTag>>with: {[self optionsOn: canvas. aBlock value. >> self hasOther ifTrue: [canvas opt...]} >> BlockContext>>renderOn: >> WASelectTag(WATagBrush)>>within: >> [] in WASelectTag(WATagBrush)>>with: {[self within: aBlock]} >> BlockContext>>renderOn: >> WARenderCanvas(WACanvas)>>nest: >> WASelectTag(WABrush)>>with: >> WASelectTag(WATagBrush)>>with: >> WASelectTag>>with: >> WASelectTag(WABrush)>>close >> WARenderCanvas(WACanvas)>>flush >> WARenderCanvas>>close >> MASelectListComponent(WAPresenter)>>renderWithContext: >> [] in MASelectListComponent(WAComponent)>>renderOn: {[:each | each >> renderWithContext: aRenderer context]} >> MASelectListComponent(WAComponent)>>decorationChainDo: >> MASelectListComponent(WAComponent)>>renderOn: >> WARenderCanvas(WACanvas)>>render: >> MATableRenderer(MAComponentRenderer)>>renderControl: >> [] in MATableRenderer>>renderControl: {[super renderControl: >> aDescription]} >> BlockContext>>renderOn: >> WATableDataTag(WATagBrush)>>within: >> [] in WATableDataTag(WATagBrush)>>with: {[self within: aBlock]} >> BlockContext>>renderOn: >> WARenderCanvas(WACanvas)>>nest: >> WATableDataTag(WABrush)>>with: >> WATableDataTag(WATagBrush)>>with: >> MATableRenderer>>renderControl: >> MATableRenderer(MAComponentRenderer)>>renderElement: >> [] in MATableRenderer>>renderElement: {[super renderElement: >> aDescription]} >> BlockContext>>renderOn: >> WAGenericTag(WATagBrush)>>within: >> [] in WAGenericTag(WATagBrush)>>with: {[self within: aBlock]} >> BlockContext>>renderOn: >> WARenderCanvas(WACanvas)>>nest: >> WAGenericTag(WABrush)>>with: >> WAGenericTag(WATagBrush)>>with: >> WARenderCanvas(WAHtmlCanvas)>>tableRow: >> MATableRenderer>>renderElement: >> MATableRenderer(MAComponentRenderer)>>visitElementDescription: >> MATableRenderer(MAVisitor)>>visitReferenceDescription: >> MATableRenderer(MAVisitor)>>visitOptionDescription: >> ...etc... >> >> >> >> >> >> >> >> _______________________________________________ >> 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 From norbert at hartl.name Fri May 11 08:33:40 2007 From: norbert at hartl.name (Norbert Hartl) Date: Fri, 11 May 2007 08:33:40 +0200 Subject: validation of referenced objects In-Reply-To: References: <1178705681.11421.22.camel@localhost> <1178787776.11421.103.camel@localhost> <1178807543.11421.106.camel@localhost> Message-ID: <1178865220.11421.149.camel@localhost> On Thu, 2007-05-10 at 16:42 +0200, Lukas Renggli wrote: > >>> How can it happen that that condition gets the real object as a > >>> value > >>> instead of the memento? In the failure case I do not invoke self > >>> value: at all. So I'm sure not to store anything strange. > >> > >> I personally never used the MAToOneRelationDescription and > >> MAToManyRelationDescription. The design of how Magritte handles those > >> is simply wrong, therefor many people run into problems when using > >> them. > > > > How do you model a reference between objects? I think it is quite > > common to interconnect objects ;) > > Well, the MARelationDescriptions were ment for that. They work well > for some cases I encountered in industrial applications and to > describe Magritte in itself, however they fail to describe relations > in general. > > One of the problems is that you have a description on every end of > the relation. Sometimes they are the same, sometimes not. Mostly the > framework assumes that this is a MAContainerDescription, but > sometimes it is not. When validating the framework has to decide > which one to use and if it should recurse the validation into the > referenced description. > > What I would prefer is to have a multiplicity for all the > descriptions. It would probably make the form generation more > difficult, but it would cleanly solve the above problems. > > >> I suggest that somebody that really needs them gives a try and > >> implements them cleanly. I have some ideas about that, but > >> unfortunately I don't have the time to do it myself. > > > > Me neither. Maybe I have to do it soon because I use references > > a lot and I don't think I can rip them out now. > > Yes please. Could you please provide some experience about your modeling with Magritte? If you use automatic form generation you need to model relationships, right? How do you model cases where objects reference each other? Norbert From renggli at iam.unibe.ch Fri May 11 09:26:55 2007 From: renggli at iam.unibe.ch (Lukas Renggli) Date: Fri, 11 May 2007 09:26:55 +0200 Subject: validation of referenced objects In-Reply-To: <1178865220.11421.149.camel@localhost> References: <1178705681.11421.22.camel@localhost> <1178787776.11421.103.camel@localhost> <1178807543.11421.106.camel@localhost> <1178865220.11421.149.camel@localhost> Message-ID: <2783B5E9-773A-41F1-9FE1-E840D2E3E6C8@iam.unibe.ch> >>>> I suggest that somebody that really needs them gives a try and >>>> implements them cleanly. I have some ideas about that, but >>>> unfortunately I don't have the time to do it myself. >>> >>> Me neither. Maybe I have to do it soon because I use references >>> a lot and I don't think I can rip them out now. >> >> Yes please. > > Could you please provide some experience about your modeling with > Magritte? If you use automatic form generation you need to model > relationships, right? How do you model cases where objects reference > each other? I rarely use relationships with Magritte. Pier, for example, doesn't use a relationships, except maybe for the PRStructureDescription that represents a link to a different page in the system. For most (if not all) applications editors mostly consisted of a bunch of basic input fields representing properties of one or more domain objects. Relationships are mostly hand-coded in Smalltalk as they require sophisticated navigation facilities that cannot be modeled using a generic approach easily. Lukas -- Lukas Renggli http://www.lukas-renggli.ch From cnantais at gmail.com Sat May 12 23:07:00 2007 From: cnantais at gmail.com (Chad Nantais) Date: Sat, 12 May 2007 14:07:00 -0700 Subject: MAOneToManyComponent>>value not getting set In-Reply-To: <21853EC6-CE1D-4D66-AC81-0E6885C84422@iam.unibe.ch> References: <3de931600704271622s1e2553fes8260123b84fe341f@mail.gmail.com> <4FEC095F-9A08-46D7-9FA7-17CA970A9A02@iam.unibe.ch> <3de931600705082227v38199d18m725a0cbc968ea397@mail.gmail.com> <0F1A6287-2739-4986-9E66-747F588102A6@iam.unibe.ch> <3de931600705100736v7fd2da47nf8e194eb685bdb88@mail.gmail.com> <21853EC6-CE1D-4D66-AC81-0E6885C84422@iam.unibe.ch> Message-ID: <3de931600705121407j309b75e2x63028aae3431ed4f@mail.gmail.com> Lukas, My Plant model is a subclass of MAAdaptiveModel and the #images description is an MAOneToManyDescription created through a description editor. Therefore, your solution above does not work for me. On 5/10/07, Lukas Renggli wrote: > > I have a class ImageFolderDescription, which is a subclass of > > MAToManyRelationDescription. This description is added to my > > PlantModel through a DescriptionEditor. > > It is a bit hard to see what happens. I attached a file that tries to > implement what you like to have: PlantModel with a collection of > files. The attached code works for me. > > > > Cheers, > Lukas > > -- > Lukas Renggli > http://www.lukas-renggli.ch > > > > > _______________________________________________ > SmallWiki, Magritte, Pier and Related Tools ... > https://www.iam.unibe.ch/mailman/listinfo/smallwiki > > -- Chad Nantais Buy my album Zero Ground on iTunes: http://tinyurl.com/2sojcn View my artist profile on MySpace Music: http://myspace.com/chadnantais Hear my music on-demand on Last.fm: http://www.last.fm/music/Chad+Nantais From wagwilk at telusplanet.net Mon May 14 18:05:39 2007 From: wagwilk at telusplanet.net (wagwilk@telusplanet.net) Date: Mon, 14 May 2007 09:05:39 -0700 Subject: Easy way to make many similar descriptions at once? Message-ID: <1179158739.464888d3b0719@webmail.telusplanet.net> I'm trying to create a magritte form for surveys used at our company, where many of the field are identical. Surveys consist of a header, for which I've created magritte descriptions in the standard way, and questions which are answered by a rating (an integer of -1, 0 or 1 or nil) and an optional comment (a string). For this particular survey, there are 18 questions; I'd like some advice on how to best use magritte to describe them. I've heard of 'multiplicites' in the context of OneToMany relations -- so this is probably not what I want -- but is there a count attribute in magritte descriptions? I'd like to avoid copy/pasting 18 field descriptions if possible. Cheers Warren Wilkinson From wagwilk at telusplanet.net Mon May 14 18:07:21 2007 From: wagwilk at telusplanet.net (wagwilk@telusplanet.net) Date: Mon, 14 May 2007 09:07:21 -0700 Subject: Easy way to make many similar descriptions at once? Message-ID: <1179158841.46488939cddbd@webmail.telusplanet.net> I'm trying to create a magritte form for surveys used at our company, where many of the field are identical. Surveys consist of a header, for which I've created magritte descriptions in the standard way, and questions which are answered by a rating (an integer of -1, 0 or 1 or nil) and an optional comment (a string). For this particular survey, there are 18 questions; I'd like some advice on how to best use magritte to describe them. I've heard of 'multiplicites' in the context of OneToMany relations -- so this is probably not what I want -- but is there a count attribute in magritte descriptions? I'd like to avoid copy/pasting 18 field descriptions if possible. Cheers Warren Wilkinson From estrangelo74 at gmail.com Mon May 14 18:39:52 2007 From: estrangelo74 at gmail.com (Pierre Q.) Date: Mon, 14 May 2007 18:39:52 +0200 Subject: [PR] Just a little error, but i don't understand why ! Message-ID: <464890D8.807@etu.univ-savoie.fr> Hi everybody, I?ve a little problem with my code! I try to generate html code starting from PIER. When I launch my widget (SPG tool) the nextPutAll method generates an error, but I don't understand why. Can you help me to understand that? Thanks in advance My project name in squeaksource.com : StaticPierGen Sample of my error: MessageNotUnderstood: UndefinedObject>>nextPutAll: Debug Full Stack ? UndefinedObject(Object)>>doesNotUnderstand: #nextPutAll: nil temps aMessage nextPutAll: 'Welcome to Pier (formerly called SmallWiki 2), the next generation of a fully extensibl...etc... ? WAHtmlStreamDocument>>nextPutAll: a WAHtmlStreamDocument temps aString 'Welcome to Pier (formerly called SmallWiki 2), the next generation of a fully extensible content ma...etc... inst vars stream nil htmlEncoder nil urlEncoder nil From renggli at iam.unibe.ch Mon May 14 19:36:15 2007 From: renggli at iam.unibe.ch (Lukas Renggli) Date: Mon, 14 May 2007 19:36:15 +0200 Subject: Easy way to make many similar descriptions at once? In-Reply-To: <1179158739.464888d3b0719@webmail.telusplanet.net> References: <1179158739.464888d3b0719@webmail.telusplanet.net> Message-ID: > For this particular survey, there are 18 questions; I'd like some > advice on how > to best use magritte to describe them. I've heard of > 'multiplicites' in the > context of OneToMany relations -- so this is probably not what I > want -- but is > there a count attribute in magritte descriptions? Yes, OneToMany relations is probably not what you want. > I'd like to avoid copy/pasting 18 field descriptions if possible. You can also create descriptions (or copy them from somewhere else) programmatically. Just override #description on the instance (or class) side of your object and return whatever you want. Question>>description ^ super description copy addAll: OtherClass1 description copy; addAll: OtherClass2 description copy; yourself The problem you probably now run into is that Question do not understand the stuff from OtherClass1 and OtherClass2. To solve this you might want to override #readUsing: and #write:using: in Question to dispatch the reading/writing to other objects/dictionaries/ whatever ... Hope this helps? Cheers, Lukas -- Lukas Renggli http://www.lukas-renggli.ch From renggli at iam.unibe.ch Mon May 14 19:38:28 2007 From: renggli at iam.unibe.ch (Lukas Renggli) Date: Mon, 14 May 2007 19:38:28 +0200 Subject: [PR] Just a little error, but i don't understand why ! In-Reply-To: <464890D8.807@etu.univ-savoie.fr> References: <464890D8.807@etu.univ-savoie.fr> Message-ID: > MessageNotUnderstood: UndefinedObject>>nextPutAll: > Debug Full Stack > ? UndefinedObject(Object)>>doesNotUnderstand: #nextPutAll: > nil > temps aMessage nextPutAll: 'Welcome to Pier (formerly called SmallWiki > 2), the next generation of a fully extensibl...etc... > ? WAHtmlStreamDocument>>nextPutAll: > a WAHtmlStreamDocument > temps aString 'Welcome to Pier (formerly called SmallWiki 2), the next > generation of a fully extensible content ma...etc... > inst vars stream nil > htmlEncoder nil > urlEncoder nil As the error says you are sending the message #nextPutAll: to nil, the instance of UndefinedObject. So you need to properly setup WAHtmlStreamDocument so that it references an instance of WriteStream. Cheers, Lukas -- Lukas Renggli http://www.lukas-renggli.ch From estrangelo74 at gmail.com Mon May 14 20:25:42 2007 From: estrangelo74 at gmail.com (Pierre Q.) Date: Mon, 14 May 2007 20:25:42 +0200 Subject: [PR] Just a little error, but i don't understand why ! In-Reply-To: References: <464890D8.807@etu.univ-savoie.fr> Message-ID: <4648A9A6.9070909@etu.univ-savoie.fr> Thank you for your answer. I will try to do that. Pe Lukas Renggli a ?crit : >> MessageNotUnderstood: UndefinedObject>>nextPutAll: >> Debug Full Stack >> ? UndefinedObject(Object)>>doesNotUnderstand: #nextPutAll: >> nil >> temps aMessage nextPutAll: 'Welcome to Pier (formerly called SmallWiki >> 2), the next generation of a fully extensibl...etc... >> ? WAHtmlStreamDocument>>nextPutAll: >> a WAHtmlStreamDocument >> temps aString 'Welcome to Pier (formerly called SmallWiki 2), the next >> generation of a fully extensible content ma...etc... >> inst vars stream nil >> htmlEncoder nil >> urlEncoder nil >> > > As the error says you are sending the message #nextPutAll: to nil, > the instance of UndefinedObject. So you need to properly setup > WAHtmlStreamDocument so that it references an instance of WriteStream. > > Cheers, > Lukas > > From ducasse at iam.unibe.ch Tue May 15 09:29:56 2007 From: ducasse at iam.unibe.ch (=?ISO-8859-1?Q?st=E9phane_ducasse?=) Date: Tue, 15 May 2007 09:29:56 +0200 Subject: [PR] Just a little error, but i don't understand why ! In-Reply-To: <464890D8.807@etu.univ-savoie.fr> References: <464890D8.807@etu.univ-savoie.fr> Message-ID: read the stack you send a message to nil > ? UndefinedObject(Object)>>doesNotUnderstand: #nextPutAll: > nil Stef On 14 mai 07, at 18:39, Pierre Q. wrote: > Hi everybody, > > I?ve a little problem with my code! I try to generate html code > starting > from PIER. When I launch my widget (SPG tool) the nextPutAll method > generates an error, but I don't understand why. Can you help me to > understand that? > > Thanks in advance > > My project name in squeaksource.com : StaticPierGen > > Sample of my error: > > MessageNotUnderstood: UndefinedObject>>nextPutAll: > Debug Full Stack > ? UndefinedObject(Object)>>doesNotUnderstand: #nextPutAll: > nil > temps aMessage nextPutAll: 'Welcome to Pier (formerly called SmallWiki > 2), the next generation of a fully extensibl...etc... > ? WAHtmlStreamDocument>>nextPutAll: > a WAHtmlStreamDocument > temps aString 'Welcome to Pier (formerly called SmallWiki 2), the next > generation of a fully extensible content ma...etc... > inst vars stream nil > htmlEncoder nil > urlEncoder nil > > _______________________________________________ > SmallWiki, Magritte, Pier and Related Tools ... > https://www.iam.unibe.ch/mailman/listinfo/smallwiki > From rbb at techgame.net Tue May 15 19:20:20 2007 From: rbb at techgame.net (Brian Brown) Date: Tue, 15 May 2007 11:20:20 -0600 Subject: Magritte MATableRenderer Message-ID: <308D1320-979E-495E-A206-65E915F02C0A@techgame.net> I would like to use the default MATableRenderer, but have a div surrounding it so I can apply styles to it easily; I can subclass it to add what I want, but is there a way to have the Magritte machinery use my custom one? I think I understand how to add custom descriptions for classes, but that doesn't impact the MAContainer that renders the descriptions.... And it's likely that I don't understand how this all fits together :-) Help! Brian From wagwilk at telusplanet.net Tue May 15 20:52:59 2007 From: wagwilk at telusplanet.net (wagwilk@telusplanet.net) Date: Tue, 15 May 2007 11:52:59 -0700 Subject: Easy way to make many similar descriptions at once? In-Reply-To: References: <1179158739.464888d3b0719@webmail.telusplanet.net> Message-ID: <1179255179.464a018be23a6@webmail.telusplanet.net> Thanks, that worked well. I'm just going to include a brief tutorial on it, so anyone in the future with a similar problem (maybe, me in three weeks) can benefit. 1) Create the non-programmatically generated fields as you normally would. (In my case, this was things like Name, Region, Office, etc). 2) Put all the survey questions in a class methods called 'questions' mine looks like this: questions ^#('Event Free Tool Use' 'Understands Tasks' 'Peer Checking' 'Co-worker Coaching' '...' 'Other') 3) Create instance variables to hold the data on your object. I added two, questionArray and commentArray, so my class description looks like this: Object subclass: #EmployeeSurvey instanceVariableNames: 'region office questionArray commentArray' classVariableNames: '' poolDictionaries: '' category: 'MyEmployeeSurvey' 4) Modify your initialization method to initialize the arrays initialize questionArray := (Array new: ((self class questions) size)). commentArray := (Array new: ((self class questions) size)). 5) Modify this method that generates an array Magritte Descriptions (one for the field, one for the comment, my appologies for how the code formatting): createQuestionLabel: aLabel priority: aPriority ^(Array new: 2) at: 1 put: ((MASingleOptionDescription accessor: (MAChainAccessor accessor: (MAAutoSelectorAccessor selector: #questionArray) next: (MADictionaryAccessor key: aPriority)) label: aLabel priority: 9+2*aPriority) options: #( 'Needs Improvement' 'Meets Expectation' 'Outstanding'); reference: MANumberDescription new; yourself); at: 2 put: (MAMemoDescription accessor: (MAChainAccessor accessor: (MAAutoSelectorAccessor selector: #commentArray) next: (MADictionaryAccessor key: aPriority)) label: 'Comment' priority: 9+2*aPriority+1); yourself. 6) Override your classes 'description' method to look like this: description | desc cfields | desc := (super description copy). (self questions) doWithIndex: [ :val :index | cfields := self createQuestionLabel: val priority: index. desc add: (cfields at: 1). desc add: (cfields at: 2). ]. ^desc Cheers, Warren Wilkinson Quoting Lukas Renggli : > > For this particular survey, there are 18 questions; I'd like some > > advice on how > > to best use magritte to describe them. I've heard of > > 'multiplicites' in the > > context of OneToMany relations -- so this is probably not what I > > want -- but is > > there a count attribute in magritte descriptions? > > Yes, OneToMany relations is probably not what you want. > > > I'd like to avoid copy/pasting 18 field descriptions if possible. > > You can also create descriptions (or copy them from somewhere else) > programmatically. Just override #description on the instance (or > class) side of your object and return whatever you want. > > Question>>description > ^ super description copy > addAll: OtherClass1 description copy; > addAll: OtherClass2 description copy; > yourself > > The problem you probably now run into is that Question do not > understand the stuff from OtherClass1 and OtherClass2. To solve this > you might want to override #readUsing: and #write:using: in Question > to dispatch the reading/writing to other objects/dictionaries/ > whatever ... > > Hope this helps? > > Cheers, > Lukas > > -- > Lukas Renggli > http://www.lukas-renggli.ch > > > > _______________________________________________ > SmallWiki, Magritte, Pier and Related Tools ... > https://www.iam.unibe.ch/mailman/listinfo/smallwiki > From renggli at iam.unibe.ch Tue May 15 21:24:09 2007 From: renggli at iam.unibe.ch (Lukas Renggli) Date: Tue, 15 May 2007 21:24:09 +0200 Subject: Magritte MATableRenderer In-Reply-To: <308D1320-979E-495E-A206-65E915F02C0A@techgame.net> References: <308D1320-979E-495E-A206-65E915F02C0A@techgame.net> Message-ID: <1B8D1EB0-E721-4947-905E-4BFCFFAB91C4@iam.unibe.ch> > I would like to use the default MATableRenderer, but have a div > surrounding it so I can apply styles to it easily; I can subclass it > to add what I want, but is there a way to have the Magritte machinery > use my custom one? > > I think I understand how to add custom descriptions for classes, but > that doesn't impact the MAContainer that renders the descriptions.... > And it's likely that I don't understand how this all fits together :-) Override on the class-side of your described classes #descriptionContainer. Address class>>#descriptionContainer ^ super descriptionContainer componentRenderer: YourTableRenderer; yourself. Cheers, Lukas -- Lukas Renggli http://www.lukas-renggli.ch From rbb at techgame.net Tue May 15 22:49:37 2007 From: rbb at techgame.net (Brian Brown) Date: Tue, 15 May 2007 14:49:37 -0600 Subject: Magritte MATableRenderer In-Reply-To: <1B8D1EB0-E721-4947-905E-4BFCFFAB91C4@iam.unibe.ch> References: <308D1320-979E-495E-A206-65E915F02C0A@techgame.net> <1B8D1EB0-E721-4947-905E-4BFCFFAB91C4@iam.unibe.ch> Message-ID: <1E9F0A64-9B67-4AE9-B568-5382CB664FBF@techgame.net> Excellent! That will work great. thanks for your help! Brian On May 15, 2007, at 1:24 PM, Lukas Renggli wrote: >> I would like to use the default MATableRenderer, but have a div >> surrounding it so I can apply styles to it easily; I can subclass it >> to add what I want, but is there a way to have the Magritte machinery >> use my custom one? >> >> I think I understand how to add custom descriptions for classes, but >> that doesn't impact the MAContainer that renders the descriptions.... >> And it's likely that I don't understand how this all fits >> together :-) > > Override on the class-side of your described classes > #descriptionContainer. > > Address class>>#descriptionContainer > ^ super descriptionContainer > componentRenderer: YourTableRenderer; > yourself. > > Cheers, > Lukas > > -- > Lukas Renggli > http://www.lukas-renggli.ch > > > > _______________________________________________ > SmallWiki, Magritte, Pier and Related Tools ... > https://www.iam.unibe.ch/mailman/listinfo/smallwiki From Pierre-Emmanuel.Queyrel at etu.univ-savoie.fr Tue May 22 09:14:16 2007 From: Pierre-Emmanuel.Queyrel at etu.univ-savoie.fr (Pierre-Emmanuel QUEYREL) Date: Tue, 22 May 2007 09:14:16 +0200 Subject: [PR] Just a little error, but i don't understand why ! In-Reply-To: <4648A9A6.9070909@etu.univ-savoie.fr> References: <464890D8.807@etu.univ-savoie.fr> <4648A9A6.9070909@etu.univ-savoie.fr> Message-ID: <46529848.6060008@etu.univ-savoie.fr> Hello, I always have the same problem with the initialization of WriteStream. In fact I do not see how to initialize it. I tested with: # myVisitor renderer: (WAStaticHtmlCanvas root: WAHtmlRoot new). # myVisitor renderer document stream: String new writeStream. But I do not obtain the result that I want. Moreover, I have this error since an update of PIER and SEASIDE. According to what I saw, the WAStaticHtmlCanvas class was modified. Could you give me information? Another question: I would like to know if it is possible to add a link towards a file (ex: afile.zip) in PIER to download it from the server? Example with a traditional server HTML: download this file # download this file Thank you in advance for your answers. Pierre Pierre Q. a ?crit : > Thank you for your answer. I will try to do that. > > Pe > > Lukas Renggli a ?crit : > >>> MessageNotUnderstood: UndefinedObject>>nextPutAll: >>> Debug Full Stack >>> ? UndefinedObject(Object)>>doesNotUnderstand: #nextPutAll: >>> nil >>> temps aMessage nextPutAll: 'Welcome to Pier (formerly called SmallWiki >>> 2), the next generation of a fully extensibl...etc... >>> ? WAHtmlStreamDocument>>nextPutAll: >>> a WAHtmlStreamDocument >>> temps aString 'Welcome to Pier (formerly called SmallWiki 2), the next >>> generation of a fully extensible content ma...etc... >>> inst vars stream nil >>> htmlEncoder nil >>> urlEncoder nil >>> >>> >> As the error says you are sending the message #nextPutAll: to nil, >> the instance of UndefinedObject. So you need to properly setup >> WAHtmlStreamDocument so that it references an instance of WriteStream. >> >> Cheers, >> Lukas >> >> >> > > _______________________________________________ > SmallWiki, Magritte, Pier and Related Tools ... > https://www.iam.unibe.ch/mailman/listinfo/smallwiki > > > From rbb at techgame.net Tue May 22 19:55:25 2007 From: rbb at techgame.net (Brian Brown) Date: Tue, 22 May 2007 11:55:25 -0600 Subject: A strange Magritte issue Message-ID: <92AD0DF1-C416-470D-9AF2-34E3069EBC9E@techgame.net> Hello, I have a model class called ALServiceContact that is using Magritte, like I am with my other model classes. This class has 6 descriptions (string, memo, 3 single options, and a date). Two of the MASingleDescription descriptions use a list of other model objects as their options. One points to a list of providers and one to a list of customers. The Magritte form builds (asValidatedForm) and displays as I expect, but when I try to save it, Magritte is giving me validation messages for descriptions from a different class. The class I am getting the validation messages from is called ALCustomer, and is only involved with ALServiceContact through: ALServiceContact class>>descriptionClient ^ (MASingleOptionDescription new) selectorAccessor: #client; label: 'Client'; priority: 20; options: ALStorage rootOrg customers; reference: ALCustomer description; comment: 'A Customer'; yourself on the ALCustomer class, I have required fields for four descriptions, and these are the messages I get: Status: Invalid input given Title: Input is required but no input given Organization: Invalid input given Email: Input is required but no input given ...when I try to save an ALServiceContact created with: add |contact| contact := self call: (ALServiceContact new asComponent addValidatedForm; yourself). contact isNil ifFalse: [ self contactManager addContact: contact. self report refresh] Of course, ALServiceContact doesn't even have those descriptions. Very Strange stuff! Any thoughts? Brian From renggli at iam.unibe.ch Tue May 22 23:15:14 2007 From: renggli at iam.unibe.ch (Lukas Renggli) Date: Tue, 22 May 2007 23:15:14 +0200 Subject: [PR] Just a little error, but i don't understand why ! In-Reply-To: <46529848.6060008@etu.univ-savoie.fr> References: <464890D8.807@etu.univ-savoie.fr> <4648A9A6.9070909@etu.univ-savoie.fr> <46529848.6060008@etu.univ-savoie.fr> Message-ID: <92EC5875-0C43-421F-9E70-647E74029A6F@iam.unibe.ch> > I always have the same problem with the initialization of WriteStream. > In fact I do not see how to initialize it. I tested with: > > # myVisitor renderer: (WAStaticHtmlCanvas root: WAHtmlRoot new). > # myVisitor renderer document stream: String new writeStream. Try to use WAStaticHtmlCanvas document: (WAHtmlStreamDocument new stream: String new writeStream) > But I do not obtain the result that I want. Moreover, I have this > error > since an update of PIER and SEASIDE. According to what I saw, the > WAStaticHtmlCanvas class was modified. Could you give me information? I've never used WAHtmlStreamDocument. Could be even broken in the latest Seaside. > Another question: I would like to know if it is possible to add a link > towards a file (ex: afile.zip) in PIER to download it from the server? > > Example with a traditional server HTML: download this file > > # download > this > file See PRDownloadView. Lukas -- Lukas Renggli http://www.lukas-renggli.ch From renggli at iam.unibe.ch Tue May 22 23:36:14 2007 From: renggli at iam.unibe.ch (Lukas Renggli) Date: Tue, 22 May 2007 23:36:14 +0200 Subject: A strange Magritte issue In-Reply-To: <92AD0DF1-C416-470D-9AF2-34E3069EBC9E@techgame.net> References: <92AD0DF1-C416-470D-9AF2-34E3069EBC9E@techgame.net> Message-ID: Hi, please try: Name: Magritte-All-lr.221 Author: lr Time: 22 May 2007, 11:35:36 pm UUID: a347f88c-ee88-4209-be3f-1e618583c236 Ancestors: Magritte-All-lr.220 Dependencies: Magritte-Model-lr.268, Magritte-Tests-lr.114, Magritte- Seaside-lr.230, Magritte-Morph-lr.38 - removed deep validation of single-/multiple-option descriptions Cheers, Lukas On 22 May 2007, at 19:55, Brian Brown wrote: > Hello, > > I have a model class called ALServiceContact that is using Magritte, > like I am with my other model classes. This class has 6 descriptions > (string, memo, 3 single options, and a date). Two of the > MASingleDescription descriptions use a list of other model objects as > their options. One points to a list of providers and one to a list of > customers. > > The Magritte form builds (asValidatedForm) and displays as I expect, > but when I try to save it, Magritte is giving me validation messages > for descriptions from a different class. > > The class I am getting the validation messages from is called > ALCustomer, and is only involved with ALServiceContact through: > > ALServiceContact class>>descriptionClient > ^ (MASingleOptionDescription new) > selectorAccessor: #client; > label: 'Client'; > priority: 20; > options: ALStorage rootOrg customers; > reference: ALCustomer description; > comment: 'A Customer'; > yourself > > > on the ALCustomer class, I have required fields for four > descriptions, and these are the messages I get: > > Status: Invalid input given > Title: Input is required but no input given > Organization: Invalid input given > Email: Input is required but no input given > > > > > ...when I try to save an ALServiceContact created with: > > add > |contact| > contact := self call: (ALServiceContact new asComponent > addValidatedForm; yourself). > contact isNil > ifFalse: [ > self contactManager addContact: contact. > self report refresh] > > Of course, ALServiceContact doesn't even have those descriptions. > > Very Strange stuff! > > Any thoughts? > > > Brian > > > > _______________________________________________ > SmallWiki, Magritte, Pier and Related Tools ... > https://www.iam.unibe.ch/mailman/listinfo/smallwiki -- Lukas Renggli http://www.lukas-renggli.ch From Pierre-Emmanuel.Queyrel at etu.univ-savoie.fr Wed May 23 13:46:08 2007 From: Pierre-Emmanuel.Queyrel at etu.univ-savoie.fr (Pierre-Emmanuel QUEYREL) Date: Wed, 23 May 2007 13:46:08 +0200 Subject: [PR] Just a little error, but i don't understand why ! In-Reply-To: <92EC5875-0C43-421F-9E70-647E74029A6F@iam.unibe.ch> References: <464890D8.807@etu.univ-savoie.fr> <4648A9A6.9070909@etu.univ-savoie.fr> <46529848.6060008@etu.univ-savoie.fr> <92EC5875-0C43-421F-9E70-647E74029A6F@iam.unibe.ch> Message-ID: <46542980.5000507@etu.univ-savoie.fr> Hi ! Thanks for your answer. I tried your suggestion but the problem is the same. When i launch my visitor, i obtain a basic stream. I will try to find another solution. For my link problem i tried with this : url: (html context urlForDocument: (WACachedDocument fileName: '.\staticPier.zip') asMIMEDocument content); Pe Lukas Renggli a ?crit : >> I always have the same problem with the initialization of WriteStream. >> In fact I do not see how to initialize it. I tested with: >> >> # myVisitor renderer: (WAStaticHtmlCanvas root: WAHtmlRoot new). >> # myVisitor renderer document stream: String new writeStream. >> > > Try to use > > WAStaticHtmlCanvas document: (WAHtmlStreamDocument new > stream: String new writeStream) > > >> But I do not obtain the result that I want. Moreover, I have this >> error >> since an update of PIER and SEASIDE. According to what I saw, the >> WAStaticHtmlCanvas class was modified. Could you give me information? >> > > I've never used WAHtmlStreamDocument. Could be even broken in the > latest Seaside. > > >> Another question: I would like to know if it is possible to add a link >> towards a file (ex: afile.zip) in PIER to download it from the server? >> >> Example with a traditional server HTML: download this file >> >> # download >> this >> file >> > > See PRDownloadView. > > Lukas > > From rbb at techgame.net Wed May 23 17:44:39 2007 From: rbb at techgame.net (Brian Brown) Date: Wed, 23 May 2007 09:44:39 -0600 Subject: Is this a useful addition? Message-ID: I added the following in my image: MAOptionDescription>>labels: aBlock "Set the labels for each option by evaluating the block." |labels| labels := Dictionary new. self options do: [:ea | labels at: ea put: (aBlock value: ea)]. self propertyAt: #labels put: labels. so that is is used like: descriptionProvider ^ (MASingleOptionDescription new) selectorAccessor: #provider; label: 'Staff'; reference: ALStaffMember description; options: ALStorage rootOrg staff; labels: [:ea | ea fullName]; priority: 20; yourself This is very helpful for me using SingleOptions that are pointing to dynamic lists; is there already a way to do this without modifying Magritte? - Brian From norbert at hartl.name Thu May 24 10:40:26 2007 From: norbert at hartl.name (Norbert Hartl) Date: Thu, 24 May 2007 10:40:26 +0200 Subject: MAValidatorVisitor>>visitToXRelation Message-ID: <1179996026.5436.20.camel@localhost> Hi, I wrote a few days ago having problems with validate. The problem is that I have a form for an object which has references to other objects. The problem for me is that the validation traverses the whole tree of objects being referenced. While this is good idea to be sure the whole data setting is correct it is often a bad idea in real life. Sometimes I need to create an object upfront which doesn't validate only to put this in a form afterwars for edition. But with the current validation I can't do this. I can't see the point why it should be necessary to check everytime every object. As long as you have form entering some data you only need to check what is being entered. For a relation description the validateKind should be enough because it is the constraint on the model. Lukas, I saw you disabled the traversing for Single and Multiple- Options. Is there any reason not doing this for the ToOne and ToMany as well? I just removed the last line self visit: self object description from MAValidatorVisitor>>visitToOneRelationDescription: aDescription This prevents traversing but still checks for validateKind. Any objections to remove this from Magritte? Norbert From renggli at iam.unibe.ch Thu May 24 21:14:45 2007 From: renggli at iam.unibe.ch (Lukas Renggli) Date: Thu, 24 May 2007 21:14:45 +0200 Subject: MAValidatorVisitor>>visitToXRelation In-Reply-To: <1179996026.5436.20.camel@localhost> References: <1179996026.5436.20.camel@localhost> Message-ID: <5390D838-6B33-4311-A094-3B6DF4B989B3@iam.unibe.ch> > Lukas, I saw you disabled the traversing for Single and Multiple- > Options. Yep, since the option descriptions have fixed options anyway, it probably doesn't make sense to check them at all. This is the responsibility of the developer to get them right. > Is there any reason not doing this for the ToOne and > ToMany as well? I just removed the last line > > self visit: self object description > > from > > MAValidatorVisitor>>visitToOneRelationDescription: aDescription > > This prevents traversing but still checks for validateKind. > > Any objections to remove this from Magritte? In most cases it probably doesn't make sense to traverse the graph. The only possible problem I see is when a to-one/to-many description is directly in-lined into the parent editor. I removed those lines for now and we will see if this turns out to be a problem. For me this is fine. Lukas -- Lukas Renggli http://www.lukas-renggli.ch From petr.fischer at praguesoft.cz Fri May 25 14:44:47 2007 From: petr.fischer at praguesoft.cz (Petr Fischer) Date: Fri, 25 May 2007 14:44:47 +0200 Subject: pier & utf-8 & national characters Message-ID: <692C64BE-D0F7-47E8-BA7F-1E6E8BB0E6CA@praguesoft.cz> Hi, is national characters handled correctly in pier (in titles, page content, search...)? I have troubles using czech characters in pier wiki pages - example chars: http://pf.praguesoft.cz/chars.html Any suggestions? Thanks! pf -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2435 bytes Desc: not available Url : http://www.iam.unibe.ch/pipermail/smallwiki/attachments/20070525/e554503a/smime.bin From Martial.Boniou at ifrance.com Fri May 25 15:17:13 2007 From: Martial.Boniou at ifrance.com (Martial Boniou) Date: Fri, 25 May 2007 15:17:13 +0200 Subject: pier & utf-8 & national characters In-Reply-To: <692C64BE-D0F7-47E8-BA7F-1E6E8BB0E6CA@praguesoft.cz> References: <692C64BE-D0F7-47E8-BA7F-1E6E8BB0E6CA@praguesoft.cz> Message-ID: <20070525131713.GA757@lacet> Accented characters are a common problem with Seaside and Squeak3.9. I tested your czech characters and it works well in Pier (I use WAKomEncoded39) but you cannot create post in Pier-Blog or name a new page with those characters because there is a problem (for instance I hope it's a temporary one) with the url. See http://lists.squeakfoundation.org/pipermail/seaside/2007-May/012037.html and: http://lists.squeakfoundation.org/pipermail/seaside/2007-May/012133.html Actually I think there is a double pass in the url parsing but I have no time (and experience) to dive in the core of seaside code. I observed that when you write accented character in pier new page, there is a conversion from UTF8 (or WideString in my case) to HTML percent convention characters and it works during the session but when sessions expire, Seaside build a new url and then the percent character are sort of re-parse. It doesn't look like a big issue but except Yengawa I don't read anything about a possible solution. I suppose Seaside (on Squeak) could be find for accented characters when someone could simply create a new entry in dispatcher with an accented character. For anything else, Pier and Seaside correctly display encoding inside page (WAKom too but there is no way to inspect it inside Squeak). In Pier when I want a page with a title with accented characters, I create a page with a non-accented characters' name and I rename the title with the accented one, so the url has no escape percent characters and the title is well displayed (a lot of PHP sites use this tip by converting every accented char in no-accented one and space in underscore; I believe it is a bad solution). I hope it helps, Cheers, -- Martial Petr Fischer a ?crit : | Hi, | | is national characters handled correctly in pier (in titles, page | content, search...)? | | I have troubles using czech characters in pier wiki pages - example | chars: | http://pf.praguesoft.cz/chars.html | | Any suggestions? Thanks! pf | | _______________________________________________ | SmallWiki, Magritte, Pier and Related Tools ... | https://www.iam.unibe.ch/mailman/listinfo/smallwiki From renggli at iam.unibe.ch Fri May 25 16:17:07 2007 From: renggli at iam.unibe.ch (Lukas Renggli) Date: Fri, 25 May 2007 16:17:07 +0200 Subject: pier & utf-8 & national characters In-Reply-To: <692C64BE-D0F7-47E8-BA7F-1E6E8BB0E6CA@praguesoft.cz> References: <692C64BE-D0F7-47E8-BA7F-1E6E8BB0E6CA@praguesoft.cz> Message-ID: > is national characters handled correctly in pier (in titles, page > content, search...)? It works well for me, see the Korean and Japanese comments in my blog. If you copy and paste some of these characters into the search input it also works: http://www.lukas-renggli.ch/blog/studenckifestwal What you have to do is to use a patched version of Kom, as I described here: http://lists.squeakfoundation.org/pipermail/seaside/2007-May/ 012133.html I believe (but I am not 100% sure) that you get such a version if you use the Installer of Seaside or Pier from SqueakMap. Then you use WAKom (not WAKomEncoded*). Text that you enter into Pier will come back exactly the same way (UTF-8 all the way down). Now for the URLs thats an entirely different story. For now I suggest that you just stick with the character set [A-Za-z0-9], you should consider doing this to improve accessibility anyway. Lukas -- Lukas Renggli http://www.lukas-renggli.ch From tapplek at gmail.com Fri May 25 21:32:10 2007 From: tapplek at gmail.com (Matthew Fulmer) Date: Fri, 25 May 2007 12:32:10 -0700 Subject: Problem with Pier-Forms In-Reply-To: References: <692C64BE-D0F7-47E8-BA7F-1E6E8BB0E6CA@praguesoft.cz> Message-ID: <20070525193210.GB30940@tacobell.ph.cox.net> I am trying to run the Pier-Forms demo from page 48-54 of Lukas's thesis. I cannot get it working. Here is what I am doing: 1. Start from squeak-web-118 image 2. Update all pier and magritte packages from universes 3. Install the Pier-Forms code from Lukas's thesis (attached) 4. go to http://localhost:8080/seaside/pier 5. Add a Form 6. Do Edit Form This results in an error that PFEditFormCommand has no label, even though it does. -- Matthew Fulmer -- http://mtfulmer.wordpress.com/ Help improve Squeak Documentation: http://wiki.squeak.org/squeak/808 -------------- next part -------------- A non-text attachment was scrubbed... Name: Pier-Forms-mtf.1.mcz Type: application/octet-stream Size: 2748 bytes Desc: not available Url : http://www.iam.unibe.ch/pipermail/smallwiki/attachments/20070525/3cc5ad3b/Pier-Forms-mtf.1.obj From keith_hodges at yahoo.co.uk Sat May 26 04:47:26 2007 From: keith_hodges at yahoo.co.uk (Keith Hodges) Date: Sat, 26 May 2007 03:47:26 +0100 Subject: Permision to view revoked, workaround Message-ID: <46579FBE.8030900@yahoo.co.uk> Hi Lukas, If I remove permission for a page to be viewed, the user can still see it if he has that page embedded in another. I suggest that this be fixed in order that an embedded forbidden page just renders as an empty string. This makes a way of making user/group specific layout elements, or notices. cheers Keith From renggli at iam.unibe.ch Sat May 26 09:40:24 2007 From: renggli at iam.unibe.ch (Lukas Renggli) Date: Sat, 26 May 2007 09:40:24 +0200 Subject: Permision to view revoked, workaround In-Reply-To: <46579FBE.8030900@yahoo.co.uk> References: <46579FBE.8030900@yahoo.co.uk> Message-ID: <5AB12869-C7B5-49E5-8DE2-0E81A56DC05F@iam.unibe.ch> Hi Keith, > If I remove permission for a page to be viewed, the user can still see > it if he has that page embedded in another. thanks, this is a severe security leak. If one page is editable, users are basically able to view any page by embedding it. > I suggest that this be fixed in order that an embedded forbidden page > just renders as an empty string. Please try, it should fix this issue: Name: Pier-All-lr.205 Author: lr Time: 26 May 2007, 9:35:56 am UUID: 99c2c998-0eee-407a-821b-5a9a0488b9ec Ancestors: Pier-All-lr.204 Dependencies: Pier-Model-lr.152, Pier-Tests-lr.69, Pier-Seaside-lr. 169, Pier-OmniBrowser-lr.24, Pier-Security-lr.80, Pier-Blog-lr.55 > This makes a way of making user/group specific layout elements, or > notices. Btw, I changed the way environments worked a few days ago. What environment should be used is now a setting of page, not necessary a child called 'environment' anymore. In my opinion this makes the use of environments much simpler and less error prone. Maybe that would be a good topic for a blog post someday ... Cheers, Lukas -- Lukas Renggli http://www.lukas-renggli.ch From renggli at iam.unibe.ch Sat May 26 09:47:38 2007 From: renggli at iam.unibe.ch (Lukas Renggli) Date: Sat, 26 May 2007 09:47:38 +0200 Subject: Problem with Pier-Forms In-Reply-To: <20070525193210.GB30940@tacobell.ph.cox.net> References: <692C64BE-D0F7-47E8-BA7F-1E6E8BB0E6CA@praguesoft.cz> <20070525193210.GB30940@tacobell.ph.cox.net> Message-ID: <963B22A4-48AD-477F-B15C-C4C98E78FD29@iam.unibe.ch> > I am trying to run the Pier-Forms demo from page 48-54 of > Lukas's thesis. I cannot get it working. Here is what I am > doing: > > 1. Start from squeak-web-118 image > 2. Update all pier and magritte packages from universes > 3. Install the Pier-Forms code from Lukas's thesis (attached) > 4. go to http://localhost:8080/seaside/pier > 5. Add a Form > 6. Do Edit Form > > This results in an error that PFEditFormCommand has no label, > even though it does. > > -- > Matthew Fulmer -- http://mtfulmer.wordpress.com/ > Help improve Squeak Documentation: http://wiki.squeak.org/squeak/808 > Pier and Magritte changed quite a bit in the past year, therefor the code in the tesis doesn't work literally anymore. Please load (or compare your code with) Name: Pier-Forms-lr.18 Author: lr Time: 26 May 2007, 9:43:50 am UUID: ab4c9737-957d-4b16-a3e5-e253f1d58096 Ancestors: Pier-Forms-lr.17 from http://source.lukas-renggli.ch/pier Lukas -- Lukas Renggli http://www.lukas-renggli.ch From tapplek at gmail.com Sat May 26 11:05:10 2007 From: tapplek at gmail.com (Matthew Fulmer) Date: Sat, 26 May 2007 02:05:10 -0700 Subject: Problem with Pier-Forms In-Reply-To: <963B22A4-48AD-477F-B15C-C4C98E78FD29@iam.unibe.ch> References: <692C64BE-D0F7-47E8-BA7F-1E6E8BB0E6CA@praguesoft.cz> <20070525193210.GB30940@tacobell.ph.cox.net> <963B22A4-48AD-477F-B15C-C4C98E78FD29@iam.unibe.ch> Message-ID: <20070526090510.GC30940@tacobell.ph.cox.net> On Sat, May 26, 2007 at 09:47:38AM +0200, Lukas Renggli wrote: > > I am trying to run the Pier-Forms demo from page 48-54 of > > Lukas's thesis. I cannot get it working. Here is what I am > > doing: > > Pier and Magritte changed quite a bit in the past year, therefor the > code in the tesis doesn't work literally anymore. > > Please load (or compare your code with) > > Name: Pier-Forms-lr.18 > Author: lr > Time: 26 May 2007, 9:43:50 am > UUID: ab4c9737-957d-4b16-a3e5-e253f1d58096 > Ancestors: Pier-Forms-lr.17 > > from > > http://source.lukas-renggli.ch/pier Thanks. That worked great! -- Matthew Fulmer -- http://mtfulmer.wordpress.com/ Help improve Squeak Documentation: http://wiki.squeak.org/squeak/808 From ducasse at iam.unibe.ch Sun May 27 16:22:16 2007 From: ducasse at iam.unibe.ch (=?ISO-8859-1?Q?st=E9phane_ducasse?=) Date: Sun, 27 May 2007 16:22:16 +0200 Subject: Looking for MA-report Message-ID: Hi guys I would like to know if you have developed an alternative to MAReport or enhance it. For now I read: NOW " do not use ... this is unfinished, buggy and not working " Stef From renggli at iam.unibe.ch Sun May 27 16:52:49 2007 From: renggli at iam.unibe.ch (Lukas Renggli) Date: Sun, 27 May 2007 16:52:49 +0200 Subject: Looking for MA-report In-Reply-To: References: Message-ID: <3E0D173B-72A5-4356-9650-AFDB94AB8C06@iam.unibe.ch> > I would like to know if you have developed an alternative to MAReport > or enhance it. > For now I read: > NOW > " do not use ... this is unfinished, buggy and not working " Well, it is used in many commercial applications. I think you can safely use it, unless you have something better. I think I should change that comment once ... Lukas -- Lukas Renggli http://www.lukas-renggli.ch From ducasse at iam.unibe.ch Sun May 27 19:23:30 2007 From: ducasse at iam.unibe.ch (=?ISO-8859-1?Q?st=E9phane_ducasse?=) Date: Sun, 27 May 2007 19:23:30 +0200 Subject: Looking for MA-report In-Reply-To: <3E0D173B-72A5-4356-9650-AFDB94AB8C06@iam.unibe.ch> References: <3E0D173B-72A5-4356-9650-AFDB94AB8C06@iam.unibe.ch> Message-ID: Ok Thanks >> I would like to know if you have developed an alternative to MAReport >> or enhance it. >> For now I read: >> NOW >> " do not use ... this is unfinished, buggy and not working " > > Well, it is used in many commercial applications. I think you can > safely use it, unless you have something better. I think I should > change that comment once ... > > Lukas > > -- > Lukas Renggli > http://www.lukas-renggli.ch > > > > _______________________________________________ > SmallWiki, Magritte, Pier and Related Tools ... > https://www.iam.unibe.ch/mailman/listinfo/smallwiki From ducasse at iam.unibe.ch Sun May 27 19:54:40 2007 From: ducasse at iam.unibe.ch (=?ISO-8859-1?Q?st=E9phane_ducasse?=) Date: Sun, 27 May 2007 19:54:40 +0200 Subject: Looking for MA-report In-Reply-To: <3E0D173B-72A5-4356-9650-AFDB94AB8C06@iam.unibe.ch> References: <3E0D173B-72A5-4356-9650-AFDB94AB8C06@iam.unibe.ch> Message-ID: lukas is there a hook so that I can attach callback on certain elements displayed in the table. Is it when I create a row or a column that I can specify that? Stef On 27 mai 07, at 16:52, Lukas Renggli wrote: >> I would like to know if you have developed an alternative to MAReport >> or enhance it. >> For now I read: >> NOW >> " do not use ... this is unfinished, buggy and not working " > > Well, it is used in many commercial applications. I think you can > safely use it, unless you have something better. I think I should > change that comment once ... > > Lukas > > -- > Lukas Renggli > http://www.lukas-renggli.ch > > > > _______________________________________________ > SmallWiki, Magritte, Pier and Related Tools ... > https://www.iam.unibe.ch/mailman/listinfo/smallwiki From ducasse at iam.unibe.ch Sun May 27 21:16:15 2007 From: ducasse at iam.unibe.ch (=?ISO-8859-1?Q?st=E9phane_ducasse?=) Date: Sun, 27 May 2007 21:16:15 +0200 Subject: some other MA questions Message-ID: <2F6A8976-9307-45CB-A55F-9DFD7F4C75FD@iam.unibe.ch> Question I generate a view as follow view: bd self call: (bd asComponent readonly: true ; addSwitch ; yourself) Now I would like to know how I could get a close button too that would invoke an answer method? Question 2. I have a description.... and I wanted to know how I can specify a default value. descriptionEditor ^ (MASingleOptionDescription selector: #editor label: 'Publisher' priority: 400) options: self editors; beSorted; yourself In fact I would like to select the value of the editor iv so I tried default: #editor But it does not work Stef From renggli at iam.unibe.ch Sun May 27 22:17:35 2007 From: renggli at iam.unibe.ch (Lukas Renggli) Date: Sun, 27 May 2007 22:17:35 +0200 Subject: Looking for MA-report In-Reply-To: References: <3E0D173B-72A5-4356-9650-AFDB94AB8C06@iam.unibe.ch> Message-ID: <7287908E-2FBF-46F8-BAA3-E9D5AF61EBD5@iam.unibe.ch> > lukas is there a hook so that I can attach callback on certain > elements displayed in the table. > Is it when I create a row or a column that I can specify that? Have a look at the references to MACommandColumn. You add an instance of MACommandColumn as a new column to your report (#addColumn:). Lukas > > Stef > > > On 27 mai 07, at 16:52, Lukas Renggli wrote: > >>> I would like to know if you have developed an alternative to >>> MAReport >>> or enhance it. >>> For now I read: >>> NOW >>> " do not use ... this is unfinished, buggy and not working " >> >> Well, it is used in many commercial applications. I think you can >> safely use it, unless you have something better. I think I should >> change that comment once ... >> >> Lukas >> >> -- >> Lukas Renggli >> http://www.lukas-renggli.ch >> >> >> >> _______________________________________________ >> 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 renggli at iam.unibe.ch Sun May 27 22:20:53 2007 From: renggli at iam.unibe.ch (Lukas Renggli) Date: Sun, 27 May 2007 22:20:53 +0200 Subject: some other MA questions In-Reply-To: <2F6A8976-9307-45CB-A55F-9DFD7F4C75FD@iam.unibe.ch> References: <2F6A8976-9307-45CB-A55F-9DFD7F4C75FD@iam.unibe.ch> Message-ID: <1E6D6ED5-6F3B-45A6-8ADD-0EFC3C468FA4@iam.unibe.ch> > I generate a view as follow > > view: bd > > self call: (bd asComponent readonly: true ; addSwitch ; > yourself) > > Now I would like to know how I could get a close button too that > would invoke an answer method? Unfortunately the MASwitchDecoration doesn't allow custom buttons. You probably need to subclass it to get the desired functionality. > Question 2. > I have a description.... > and I wanted to know how I can specify a default value. > > descriptionEditor > > ^ (MASingleOptionDescription selector: #editor label: 'Publisher' > priority: 400) > options: self editors; > > beSorted; > yourself > > In fact I would like to select the value of the editor iv > so I tried default: #editor Then the symbol #editor is the default. As default you have to directly specify the object you want to use, e.g. default: self editors first Lukas -- Lukas Renggli http://www.lukas-renggli.ch From kamikaze.is.waiting.you at gmail.com Mon May 28 02:29:53 2007 From: kamikaze.is.waiting.you at gmail.com (Oleg Korsak) Date: Mon, 28 May 2007 03:29:53 +0300 Subject: Pier Widget Message-ID: <3191c1c60705271729g2fc8b4b5r526798b0a0ce5ef1@mail.gmail.com> Hello everybody :) How can I create a widget in Pier? For example I want to create PRHeaderWidget clone as PRKamikazeHeaderWidget. I have a second PRKernel instance named 'kamikaze', so I want to use my own Header here, but the original one in the default instance. I've tried to create simple PRCommandWidget, but after that I had two "Commands" in the Environment->Header->[Edit]->Component class. Thanks :) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.iam.unibe.ch/pipermail/smallwiki/attachments/20070528/fe2dc833/attachment.html From renggli at iam.unibe.ch Mon May 28 10:56:14 2007 From: renggli at iam.unibe.ch (Lukas Renggli) Date: Mon, 28 May 2007 10:56:14 +0200 Subject: Pier Widget In-Reply-To: <3191c1c60705271729g2fc8b4b5r526798b0a0ce5ef1@mail.gmail.com> References: <3191c1c60705271729g2fc8b4b5r526798b0a0ce5ef1@mail.gmail.com> Message-ID: <8376385A-6D2B-43CA-B757-764D013B1DEC@iam.unibe.ch> > How can I create a widget in Pier? Essentially a widget is just a Seaside component, except that it's a subclass of PRWidget. > For example I want to create PRHeaderWidget clone as > PRKamikazeHeaderWidget. I have a second PRKernel instance named > 'kamikaze', so I want to use my own Header here, but the original > one in the default instance. Go to the /environment/header, click on Edit and select your component instead of the default one. > I've tried to create simple PRCommandWidget, but after that I had > two "Commands" in the Environment->Header->[Edit]->Component class. Change the #label method on the class site, to tell them apart. Lukas -- Lukas Renggli http://www.lukas-renggli.ch From wagwilk at telusplanet.net Mon May 28 17:05:01 2007 From: wagwilk at telusplanet.net (wagwilk@telusplanet.net) Date: Mon, 28 May 2007 08:05:01 -0700 Subject: some other MA questions In-Reply-To: <2F6A8976-9307-45CB-A55F-9DFD7F4C75FD@iam.unibe.ch> References: <2F6A8976-9307-45CB-A55F-9DFD7F4C75FD@iam.unibe.ch> Message-ID: <1180364701.465aef9d15828@webmail.telusplanet.net> Quoting st?phane ducasse : For question 1, I'm not certain, but I think there is a display generating function that is called to actually generate the seaside component; if so, you could probably override that method to call the super method, and then add a callback link that answers. For question 2, I've heard one way to do it, is to define your variable get/set methods using this sort of pattern myVar: aVar myVar = aVar myVar myVar isNil ifTrue: [myVar := 'Default Value']. ^myVar But I haven't tried this myself. Cheers, Warren Wilkinson > Question > > I generate a view as follow > > view: bd > > self call: (bd asComponent readonly: true ; addSwitch ; > yourself) > > Now I would like to know how I could get a close button too that > would invoke an answer method? > > > Question 2. > I have a description.... > and I wanted to know how I can specify a default value. > > descriptionEditor > > ^ (MASingleOptionDescription selector: #editor label: 'Publisher' > priority: 400) > options: self editors; > > beSorted; > yourself > > In fact I would like to select the value of the editor iv > so I tried default: #editor > > But it does not work > > Stef > > > _______________________________________________ > SmallWiki, Magritte, Pier and Related Tools ... > https://www.iam.unibe.ch/mailman/listinfo/smallwiki > From kamikaze.is.waiting.you at gmail.com Tue May 29 02:34:37 2007 From: kamikaze.is.waiting.you at gmail.com (Oleg Korsak) Date: Tue, 29 May 2007 03:34:37 +0300 Subject: new PRWidget problem Message-ID: <3191c1c60705281734m388fa9abhe15d45ff9ac394@mail.gmail.com> Still no luck :( I can't see it in the list. Also I can't see that "#label" in other PRWidget subclasses. Ok, I have a "file out" of my package with just one PRWidget subclass: PRWidget subclass: #PMKHeaderWidget instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'Pier-My-Widgets'! !PMKHeaderWidget methodsFor: 'rendering' stamp: 'kmz 5/29/2007 03:19'! renderContentOn: html html header: 'yoyo'. ! ! !PMKHeaderWidget methodsFor: 'initialization' stamp: 'kmz 5/29/2007 02:52'! initialize super initialize.! ! !PMKHeaderWidget methodsFor: 'accessing' stamp: 'kmz 5/29/2007 03:04'! asLabel ^ 'KmzHeader'! ! !PMKHeaderWidget methodsFor: 'accessing' stamp: 'kmz 5/29/2007 03:16'! defaultCssClass ^ 'box'! ! !PMKHeaderWidget methodsFor: 'accessing' stamp: 'kmz 5/29/2007 03:16'! isAbstract ^ false! ! !PMKHeaderWidget methodsFor: 'accessing' stamp: 'kmz 5/29/2007 03:04'! label ^ 'KmzHeader'! ! ------ I have an image running with this package on: http://kamikaze.seasidehosting.st (editale, feel free to break all :)) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.iam.unibe.ch/pipermail/smallwiki/attachments/20070529/44201a25/attachment.html From renggli at iam.unibe.ch Tue May 29 07:55:38 2007 From: renggli at iam.unibe.ch (Lukas Renggli) Date: Tue, 29 May 2007 07:55:38 +0200 Subject: new PRWidget problem In-Reply-To: <3191c1c60705281734m388fa9abhe15d45ff9ac394@mail.gmail.com> References: <3191c1c60705281734m388fa9abhe15d45ff9ac394@mail.gmail.com> Message-ID: > Still no luck :( I can't see it in the list. Also I can't see that > "#label" in other PRWidget subclasses. It is on the class side. > !PMKHeaderWidget methodsFor: 'accessing' stamp: 'kmz 5/29/2007 03:04'! > asLabel > ^ 'KmzHeader'! ! > > !PMKHeaderWidget methodsFor: 'accessing' stamp: 'kmz 5/29/2007 03:16'! > defaultCssClass > ^ 'box'! ! > > !PMKHeaderWidget methodsFor: 'accessing' stamp: 'kmz 5/29/2007 03:16'! > isAbstract > ^ false! ! > > !PMKHeaderWidget methodsFor: 'accessing' stamp: 'kmz 5/29/2007 03:04'! > label > ^ 'KmzHeader'! ! All the above methods belong to the class side. Lukas -- Lukas Renggli http://www.lukas-renggli.ch From kamikaze.is.waiting.you at gmail.com Tue May 29 16:20:34 2007 From: kamikaze.is.waiting.you at gmail.com (Oleg Korsak) Date: Tue, 29 May 2007 17:20:34 +0300 Subject: new PRWidget problem In-Reply-To: References: <3191c1c60705281734m388fa9abhe15d45ff9ac394@mail.gmail.com> Message-ID: <3191c1c60705290720y1d9b4cdat4f403a25df17b61@mail.gmail.com> Thanks, finally it works :) 2007/5/29, Lukas Renggli : > > > Still no luck :( I can't see it in the list. Also I can't see that > > "#label" in other PRWidget subclasses. > > It is on the class side. > > > !PMKHeaderWidget methodsFor: 'accessing' stamp: 'kmz 5/29/2007 03:04'! > > asLabel > > ^ 'KmzHeader'! ! > > > > !PMKHeaderWidget methodsFor: 'accessing' stamp: 'kmz 5/29/2007 03:16'! > > defaultCssClass > > ^ 'box'! ! > > > > !PMKHeaderWidget methodsFor: 'accessing' stamp: 'kmz 5/29/2007 03:16'! > > isAbstract > > ^ false! ! > > > > !PMKHeaderWidget methodsFor: 'accessing' stamp: 'kmz 5/29/2007 03:04'! > > label > > ^ 'KmzHeader'! ! > > All the above methods belong to the class side. > > Lukas > > -- > Lukas Renggli > http://www.lukas-renggli.ch > > > > _______________________________________________ > SmallWiki, Magritte, Pier and Related Tools ... > https://www.iam.unibe.ch/mailman/listinfo/smallwiki > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.iam.unibe.ch/pipermail/smallwiki/attachments/20070529/73b817f1/attachment.html From brian at murphydye.com Wed May 30 07:02:27 2007 From: brian at murphydye.com (Brian Murphy-Dye) Date: Tue, 29 May 2007 23:02:27 -0600 Subject: Duplicate key question In-Reply-To: <1179843228.29081.63.camel@localhost> References: <1179843228.29081.63.camel@localhost> Message-ID: <57B936BE-1A72-4F85-9C32-BBB8BE4BC8E5@murphydye.com> I'm using Ramon Leon's MagritteGlorp package, which ties together the extremely useful Magritte and Glorp packages, but must not be using it quite correctly. When registering an object that has a reference to an already stored object, it seems to attempt re-insert the referenced object. For example: objA := ADescriptorSystem getSession execute: (A find where [:ea | ea name = 'hello']). objB := B new. objB a: objA. session := B getSession. session beginUnitOfWork. objB register: objB. session commitUnitOfWork. raises a 'GlorpDatabaseWriteError: ERROR: duplicate key violates unique constraint' error. I thought it might be because I am using one session to load the object and another session to register, but believe I've also tried doing everything in one session. If it is of any help, the reference description is of type MAToOneRelationDescription. On another project, I tried MAMultipleOptionDescription with the same error. Any ideas on how to make it recognize the object is already stored and hasn't changed? Thanks, Brian. Glorp.rjl.8 GlorpPostload-rjl.3 GlorpPreload-rjl.2 Magritte-Seaside-lr.228.mcz Magritte-Model-lr.266 MagritteGlorp-rjl.47 From kamikaze.is.waiting.you at gmail.com Wed May 30 16:17:39 2007 From: kamikaze.is.waiting.you at gmail.com (Oleg Korsak) Date: Wed, 30 May 2007 17:17:39 +0300 Subject: Navigation config Message-ID: <3191c1c60705300717y15066cd2pe5e7b712a3c1cbe9@mail.gmail.com> hi all :) The problem is here: http://kamikaze.seasidehosting.st/ How can setup Pier so it will not show all these "Add,Remove.." in Commands section. The only available items could be Login and maybe View. I want to setup Pier to get menu items like here: http://www.lukas-renggli.ch/ :) Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.iam.unibe.ch/pipermail/smallwiki/attachments/20070530/c55acb7e/attachment.html From david.tibbe at hpi.uni-potsdam.de Wed May 30 16:27:29 2007 From: david.tibbe at hpi.uni-potsdam.de (David Tibbe) Date: Wed, 30 May 2007 16:27:29 +0200 Subject: Navigation config In-Reply-To: <3191c1c60705300717y15066cd2pe5e7b712a3c1cbe9@mail.gmail.com> References: <3191c1c60705300717y15066cd2pe5e7b712a3c1cbe9@mail.gmail.com> Message-ID: <465D89D1.5090104@hpi.uni-potsdam.de> > How can setup Pier so it will not show all these "Add,Remove.." in Commands > section. The only available items could be Login and maybe View. Use the "Change User", "Change Group" and "Change Other" Commands from the menu. Select the actions you want to allow to the selected user group and press save. Hit the "recursive"-checkbox if you want to apply the settings to all pages under the current within the page tree. Regards, David From kamikaze.is.waiting.you at gmail.com Wed May 30 17:44:57 2007 From: kamikaze.is.waiting.you at gmail.com (Oleg Korsak) Date: Wed, 30 May 2007 18:44:57 +0300 Subject: Navigation config In-Reply-To: <465D89D1.5090104@hpi.uni-potsdam.de> References: <3191c1c60705300717y15066cd2pe5e7b712a3c1cbe9@mail.gmail.com> <465D89D1.5090104@hpi.uni-potsdam.de> Message-ID: <3191c1c60705300844r2bd9d129l5f7f73997c33a6b@mail.gmail.com> ok, 10x :) it works 2007/5/30, David Tibbe : > > > How can setup Pier so it will not show all these "Add,Remove.." in > Commands > > section. The only available items could be Login and maybe View. > Use the "Change User", "Change Group" and "Change Other" Commands from > the menu. > Select the actions you want to allow to the selected user group and > press save. Hit the "recursive"-checkbox if you want to apply the > settings to all pages under the current within the page tree. > > Regards, > David > > _______________________________________________ > SmallWiki, Magritte, Pier and Related Tools ... > https://www.iam.unibe.ch/mailman/listinfo/smallwiki > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.iam.unibe.ch/pipermail/smallwiki/attachments/20070530/1a0ccdf5/attachment.html From brian at murphydye.com Wed May 30 21:20:06 2007 From: brian at murphydye.com (Brian Murphy-Dye) Date: Wed, 30 May 2007 13:20:06 -0600 Subject: [Glorp-development] Duplicate key question In-Reply-To: <20070530123401.BAFB65B7504@abq.csl.sri.com> References: <1179843228.29081.63.camel@localhost> <57B936BE-1A72-4F85-9C32-BBB8BE4BC8E5@murphydye.com> <20070530123401.BAFB65B7504@abq.csl.sri.com> Message-ID: Thanks for the responses. I did get this to work by using one session for reading the nested object and registering the new object. One of the situations where another session's objects would be nice to use is that rarely changed nested objects could be cached in memory rather than running another query. Glorp is efficient enough that I should worry about such things, but old habits die hard :) Brian. On May 30, 2007, at 6:31 AM, Alan Knight wrote: > I don't quite know why this would be happening, partly because I > don't know the MagritteGlorp package, so I'm not sure what some of > these calls are doing. My guess is that it is because you're using > two different sessions. In general, it's a very bad idea to mix > objects between two different sessions. Glorp relies on knowing > whether or not it read the object from the database in order to > know whether to do an insert or an update. If you read objA in one > session, then give it to another session as if it were a new > object, it will probably try to insert it and cause an error. If > you did this in the same session, I'd expect it to work. Certainly > that sort of thing works fine in basic Glorp. > > At 01:02 AM 5/30/2007, Brian Murphy-Dye wrote: >> I'm using Ramon Leon's MagritteGlorp package, which ties together the >> extremely useful Magritte and Glorp packages, but must not be using >> it quite correctly. When registering an object that has a reference >> to an already stored object, it seems to attempt re-insert the >> referenced object. For example: >> >> objA := ADescriptorSystem getSession execute: (A find where [:ea | ea >> name = 'hello']). >> objB := B new. >> objB a: objA. >> session := B getSession. >> session beginUnitOfWork. >> objB register: objB. >> session commitUnitOfWork. >> >> raises a 'GlorpDatabaseWriteError: ERROR: duplicate key violates >> unique constraint' error. I thought it might be because I am using >> one session to load the object and another session to register, but >> believe I've also tried doing everything in one session. If it is of >> any help, the reference description is of type >> MAToOneRelationDescription. On another project, I tried >> MAMultipleOptionDescription with the same error. Any ideas on how to >> make it recognize the object is already stored and hasn't changed? >> >> Thanks, Brian. >> >> Glorp.rjl.8 >> GlorpPostload-rjl.3 >> GlorpPreload-rjl.2 >> Magritte-Seaside-lr.228.mcz >> Magritte-Model-lr.266 >> MagritteGlorp-rjl.47 >> >> >> --------------------------------------------------------------------- >> ---- >> This SF.net email is sponsored by DB2 Express >> Download DB2 Express C - the FREE version of DB2 express and take >> control of your XML. No limits. Just data. Click to get it now. >> http://sourceforge.net/powerbar/db2/ >> _______________________________________________ >> Glorp-development mailing list >> Glorp-development at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/glorp-development > > -- > Alan Knight [|], Cincom Smalltalk Development > knight at acm.org > aknight at cincom.com > http://www.cincom.com/smalltalk > > "The Static Typing Philosophy: Make it fast. Make it right. Make it > run." - Niall Ross -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.iam.unibe.ch/pipermail/smallwiki/attachments/20070530/5c23d396/attachment.html From billksun at yahoo.com Wed May 30 22:16:54 2007 From: billksun at yahoo.com (Bill Sun) Date: Wed, 30 May 2007 13:16:54 -0700 (PDT) Subject: Pier back button problem Message-ID: <327867.21396.qm@web53307.mail.re2.yahoo.com> Hi, I'm using squeak-web-118.image by Damien Cassou. What I did: 1. Install the latest Magritte (Magritte-all-lr.224), then Pier (Pier-all-lr.207) from mc.lukas-renggli.ch. 2. Do WAKom startOn: 8080. 3. Browse to the Pier front page. 4. Click on the link "information page". 5. Click the back button. 6. Click on the "information page" link again. 7. I then get this error: Error: Components not found while processing callbacks: an Array(a PRDefaultView) WARender(Object)>>error:selfa WARendertempsaString'Components not found while processing callbacks: an Array(a PRDefaultView)'inst varsroota WAToolFramecontexta WARenderingContextrequesta WARequesturla WAUrl The version of Pier and Magritte that came with squeak-web-118.image works fine, so something along the way must have broken the back button. -Bill ____________________________________________________________________________________ Moody friends. Drama queens. Your life? Nope! - their life, your story. Play Sims Stories at Yahoo! Games. http://sims.yahoo.com/ From renggli at iam.unibe.ch Wed May 30 22:28:59 2007 From: renggli at iam.unibe.ch (Lukas Renggli) Date: Wed, 30 May 2007 22:28:59 +0200 Subject: Pier back button problem In-Reply-To: <327867.21396.qm@web53307.mail.re2.yahoo.com> References: <327867.21396.qm@web53307.mail.re2.yahoo.com> Message-ID: <56BAFB19-576C-43AF-9913-B8D2B99F5373@iam.unibe.ch> The latest Pier only works with the latest Seaside 2.8, I don't know if you have that loaded in squeak-web-118? Lukas On 30 May 2007, at 22:16, Bill Sun wrote: > Hi, > > > > I'm using squeak-web-118.image by Damien Cassou. What I did: > > > > 1. Install the latest Magritte (Magritte-all-lr.224), then Pier > (Pier-all-lr.207) from mc.lukas-renggli.ch. > > 2. Do WAKom startOn: 8080. > > 3. Browse to the Pier front page. > > 4. Click on the link "information page". > > 5. Click the back button. > > 6. Click on the "information page" link again. > > 7. I then get this error: > > Error: Components not found while processing callbacks: an Array(a > PRDefaultView) > WARender(Object)>>error:selfa WARendertempsaString'Components not > found while processing callbacks: an Array(a PRDefaultView)'inst > varsroota WAToolFramecontexta WARenderingContextrequesta > WARequesturla WAUrl > > The version of Pier and Magritte that came with squeak- > web-118.image works fine, so something along the way must have > broken the back button. > > -Bill > > > > > > > > ______________________________________________________________________ > ______________ > Moody friends. Drama queens. Your life? Nope! - their life, your > story. Play Sims Stories at Yahoo! Games. > http://sims.yahoo.com/ > > _______________________________________________ > SmallWiki, Magritte, Pier and Related Tools ... > https://www.iam.unibe.ch/mailman/listinfo/smallwiki -- Lukas Renggli http://www.lukas-renggli.ch From billksun at yahoo.com Thu May 31 04:00:09 2007 From: billksun at yahoo.com (Bill Sun) Date: Wed, 30 May 2007 19:00:09 -0700 (PDT) Subject: Pier back button problem Message-ID: <771231.67492.qm@web53311.mail.re2.yahoo.com> Ah, that was it! Many thanks for the lightning quick response! -Bill ----- Original Message ---- From: Lukas Renggli To: "Magritte, Pier and Related Tools ..." Sent: Wednesday, May 30, 2007 1:28:59 PM Subject: Re: Pier back button problem The latest Pier only works with the latest Seaside 2.8, I don't know if you have that loaded in squeak-web-118? Lukas On 30 May 2007, at 22:16, Bill Sun wrote: > Hi, > > > > I'm using squeak-web-118.image by Damien Cassou. What I did: > > > > 1. Install the latest Magritte (Magritte-all-lr.224), then Pier > (Pier-all-lr.207) from mc.lukas-renggli.ch. > > 2. Do WAKom startOn: 8080. > > 3. Browse to the Pier front page. > > 4. Click on the link "information page". > > 5. Click the back button. > > 6. Click on the "information page" link again. > > 7. I then get this error: > > Error: Components not found while processing callbacks: an Array(a > PRDefaultView) > WARender(Object)>>error:selfa WARendertempsaString'Components not > found while processing callbacks: an Array(a PRDefaultView)'inst > varsroota WAToolFramecontexta WARenderingContextrequesta > WARequesturla WAUrl > > The version of Pier and Magritte that came with squeak- > web-118.image works fine, so something along the way must have > broken the back button. > > -Bill > > > > > > > > ______________________________________________________________________ > ______________ > Moody friends. Drama queens. Your life? Nope! - their life, your > story. Play Sims Stories at Yahoo! Games. > http://sims.yahoo.com/ > > _______________________________________________ > 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 ____________________________________________________________________________________Got a little couch potato? Check out fun summer activities for kids. http://search.yahoo.com/search?fr=oni_on_mail&p=summer+activities+for+kids&cs=bz From damien.cassou at gmail.com Thu May 31 08:18:26 2007 From: damien.cassou at gmail.com (Damien Cassou) Date: Thu, 31 May 2007 08:18:26 +0200 Subject: Pier back button problem In-Reply-To: <56BAFB19-576C-43AF-9913-B8D2B99F5373@iam.unibe.ch> References: <327867.21396.qm@web53307.mail.re2.yahoo.com> <56BAFB19-576C-43AF-9913-B8D2B99F5373@iam.unibe.ch> Message-ID: <6ac749c10705302318o3b0a8eebp8fe8f3184cefcd87@mail.gmail.com> 2007/5/30, Lukas Renggli : > The latest Pier only works with the latest Seaside 2.8, I don't know > if you have that loaded in squeak-web-118? What are the last magritte and pier versions which work under Seaside 2.7? -- Damien Cassou From renggli at iam.unibe.ch Thu May 31 08:27:55 2007 From: renggli at iam.unibe.ch (Lukas Renggli) Date: Thu, 31 May 2007 08:27:55 +0200 Subject: Pier back button problem In-Reply-To: <6ac749c10705302318o3b0a8eebp8fe8f3184cefcd87@mail.gmail.com> References: <327867.21396.qm@web53307.mail.re2.yahoo.com> <56BAFB19-576C-43AF-9913-B8D2B99F5373@iam.unibe.ch> <6ac749c10705302318o3b0a8eebp8fe8f3184cefcd87@mail.gmail.com> Message-ID: >> The latest Pier only works with the latest Seaside 2.8, I don't know >> if you have that loaded in squeak-web-118? > > What are the last magritte and pier versions which work under > Seaside 2.7? For Magritte it should not matter. For Pier it says sometime ago in the comments. Lukas -- Lukas Renggli http://www.lukas-renggli.ch From renggli at iam.unibe.ch Thu May 31 08:37:37 2007 From: renggli at iam.unibe.ch (Lukas Renggli) Date: Thu, 31 May 2007 08:37:37 +0200 Subject: Pier permissions problem In-Reply-To: <465E685C.1050808@yahoo.co.uk> References: <465E685C.1050808@yahoo.co.uk> Message-ID: > Having added a subclass of PRPage, I cant add one in pier due to a > permissions error. If you are logged in as administrator this should work. > Now I understand that an existing page's permissions would not be > aware of the new class. So I added a new PRPage first, then > attempted to add the new page type to that. Still no go. So I set a > halt in PUSecurity-validateCommand: to investigate further. > > It appears that the ownerPermissions set is being created with nils > in the first couple of slots. This results in #includes: returning > false before it finds the PUAddPermission that it is looking for in > slot 4 (in this instance). The permissions (Unix Security) of new pages inherit from their parent. Since no structure knows about the 'add new xxx permission' this won't give you that permission either. You have to explicitly add this permission using the security commands to have it useable from a non-admin user. > The code in the above repository simply converts the sets to arrays > before the #includes: test and all is fine. I don't understand how this could help? Lukas -- Lukas Renggli http://www.lukas-renggli.ch From thushar.g-r at hp.com Thu May 31 10:23:07 2007 From: thushar.g-r at hp.com (G R, Thushar) Date: Thu, 31 May 2007 13:53:07 +0530 Subject: UI in Squeak Message-ID: <77715F6AFC753C44A1043A235ED6F07D7D99D3@bgeexc01.asiapacific.cpqcorp.net> Hi all.... I was previously workin in VisualWorks and now I have switched to squeak.Finding it very difficult to adjust with the lack of adequate tools and developing evironment in Squeak.Visualworks was much much better.So could any one tell me if there is anything like a UIPainter in squeak?I tried Tweak but it needs hell lot of unnessasary coding to even open a spec or to add some widgets to it.pls give me your suggestions. Thanks in Advance, G R Thushar -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.iam.unibe.ch/pipermail/smallwiki/attachments/20070531/7046965c/attachment.html From damien.cassou at gmail.com Thu May 31 10:35:27 2007 From: damien.cassou at gmail.com (Damien Cassou) Date: Thu, 31 May 2007 10:35:27 +0200 Subject: UI in Squeak In-Reply-To: <77715F6AFC753C44A1043A235ED6F07D7D99D3@bgeexc01.asiapacific.cpqcorp.net> References: <77715F6AFC753C44A1043A235ED6F07D7D99D3@bgeexc01.asiapacific.cpqcorp.net> Message-ID: <6ac749c10705310135o205528du4c466c20956dd2e6@mail.gmail.com> 2007/5/31, G R, Thushar : > I was previously workin in VisualWorks and now I have switched to > squeak.Finding it very difficult to adjust with the lack of adequate tools > and developing evironment in Squeak.Visualworks was much much better.So > could any one tell me if there is anything like a UIPainter in squeak?I > tried Tweak but it needs hell lot of unnessasary coding to even open a spec > or to add some widgets to it.pls give me your suggestions. Hi, I don't think there is a tool like UIPainter. However, we have two great frameworks: ToolBuilder and OmniBrowser. The first one is able to draw anything whereas the second is meant to implement browsers of any kind (code browser, file browser...). These frameworks are really easy to use. For ToolBuilder, I advise you to have a look at the class TestRunner which is build on top of it. -- Damien Cassou From thushar.g-r at hp.com Thu May 31 11:16:43 2007 From: thushar.g-r at hp.com (G R, Thushar) Date: Thu, 31 May 2007 14:46:43 +0530 Subject: UI in Squeak In-Reply-To: <6ac749c10705310135o205528du4c466c20956dd2e6@mail.gmail.com> References: <77715F6AFC753C44A1043A235ED6F07D7D99D3@bgeexc01.asiapacific.cpqcorp.net> <6ac749c10705310135o205528du4c466c20956dd2e6@mail.gmail.com> Message-ID: <77715F6AFC753C44A1043A235ED6F07D7D9A5A@bgeexc01.asiapacific.cpqcorp.net> Hi Damien, Thanks a lot. I needed an expert advice. Now I can proceed smoothly by writing the code myself. If at all something like UIPainter was there then I will be wasting my time to describe each and every button by code. One more thing.As I was using VW I think I got a bit lazy so if there is any tools or parcels awailable in squeak that u constantly use to make things better pls suggest the same to me... Thanks again... thushar -----Original Message----- From: smallwiki-bounces at iam.unibe.ch [mailto:smallwiki-bounces at iam.unibe.ch] On Behalf Of Damien Cassou Sent: Thursday, May 31, 2007 1:35 AM To: Magritte, Pier and Related Tools ... Subject: Re: UI in Squeak 2007/5/31, G R, Thushar : > I was previously workin in VisualWorks and now I have switched to > squeak.Finding it very difficult to adjust with the lack of adequate tools > and developing evironment in Squeak.Visualworks was much much better.So > could any one tell me if there is anything like a UIPainter in squeak?I > tried Tweak but it needs hell lot of unnessasary coding to even open a spec > or to add some widgets to it.pls give me your suggestions. Hi, I don't think there is a tool like UIPainter. However, we have two great frameworks: ToolBuilder and OmniBrowser. The first one is able to draw anything whereas the second is meant to implement browsers of any kind (code browser, file browser...). These frameworks are really easy to use. For ToolBuilder, I advise you to have a look at the class TestRunner which is build on top of it. -- Damien Cassou _______________________________________________ SmallWiki, Magritte, Pier and Related Tools ... https://www.iam.unibe.ch/mailman/listinfo/smallwiki From damien.cassou at gmail.com Thu May 31 11:32:38 2007 From: damien.cassou at gmail.com (Damien Cassou) Date: Thu, 31 May 2007 11:32:38 +0200 Subject: UI in Squeak In-Reply-To: <77715F6AFC753C44A1043A235ED6F07D7D9A5A@bgeexc01.asiapacific.cpqcorp.net> References: <77715F6AFC753C44A1043A235ED6F07D7D99D3@bgeexc01.asiapacific.cpqcorp.net> <6ac749c10705310135o205528du4c466c20956dd2e6@mail.gmail.com> <77715F6AFC753C44A1043A235ED6F07D7D9A5A@bgeexc01.asiapacific.cpqcorp.net> Message-ID: <6ac749c10705310232p3371a439y66ee1befee09a0a0@mail.gmail.com> 2007/5/31, G R, Thushar : > One more thing.As I was using VW I think I got a bit lazy so if there is > any tools or parcels awailable in squeak that u constantly use to make > things better pls suggest the same to me... Tools I always use to develop are included in the squeak-dev image: http://damien.cassou.free.fr/squeak-dev/. Beta versions are based on Squeak 3.10 whereas normal versions are based on 3.9. I always use the beta images and they are as stable as 3.9 based images. -- Damien Cassou From Martial.Boniou at ifrance.com Thu May 31 16:11:39 2007 From: Martial.Boniou at ifrance.com (Martial Boniou) Date: Thu, 31 May 2007 16:11:39 +0200 Subject: PRComponentSettings disappeared and... Message-ID: <20070531141139.GA838@cendre> Hi, I am a bit lost since the PRComponentSettings vanished in Pier. Actually I cannot export/import my old kernels because of an obsolete PRComponentSettings. I think there is a way to remove the PRComponentSettings use in my kernels but I don't know how to find/do this. Everytime a big change is made, it could be nice to go thru the Instances of PRKernel to change things (even if I know it's a lot of work). Regards, -- Martial From Martial.Boniou at ifrance.com Thu May 31 17:14:20 2007 From: Martial.Boniou at ifrance.com (Martial Boniou) Date: Thu, 31 May 2007 17:14:20 +0200 Subject: PRComponentSettings disappeared and... In-Reply-To: <20070531141139.GA838@cendre> References: <20070531141139.GA838@cendre> Message-ID: <20070531151420.GB838@cendre> I found that the PUSecurity instances maintain the Settings in the arrays #ownerPermissions and #groupPermissions. How can I remove them in each decorations ? -- Martial Martial Boniou a ?crit : | Hi, | | I am a bit lost since the PRComponentSettings vanished in Pier. Actually | I cannot export/import my old kernels because of an obsolete PRComponentSettings. | I think there is a way to remove the PRComponentSettings use in my | kernels but I don't know how to find/do this. Everytime a big change is | made, it could be nice to go thru the Instances of PRKernel to change | things (even if I know it's a lot of work). | | Regards, | | -- | Martial | | | _______________________________________________ | SmallWiki, Magritte, Pier and Related Tools ... | https://www.iam.unibe.ch/mailman/listinfo/smallwiki From renggli at iam.unibe.ch Thu May 31 18:03:21 2007 From: renggli at iam.unibe.ch (Lukas Renggli) Date: Thu, 31 May 2007 18:03:21 +0200 Subject: PRComponentSettings disappeared and... In-Reply-To: <20070531151420.GB838@cendre> References: <20070531141139.GA838@cendre> <20070531151420.GB838@cendre> Message-ID: > I found that the PUSecurity instances maintain the Settings in the > arrays > #ownerPermissions and #groupPermissions. How can I remove them in each > decorations ? Did you try something like? PUSecurity allInstancesDo: [ :e | e remove ] This resets just all the security settings. I am sure one could think of something more sophisticated that would just fix the obsolete references. Lukas > > -- > Martial > > Martial Boniou a ?crit : > | Hi, > | > | I am a bit lost since the PRComponentSettings vanished in Pier. > Actually > | I cannot export/import my old kernels because of an obsolete > PRComponentSettings. > | I think there is a way to remove the PRComponentSettings use in my > | kernels but I don't know how to find/do this. Everytime a big > change is > | made, it could be nice to go thru the Instances of PRKernel to > change > | things (even if I know it's a lot of work). > | > | Regards, > | > | -- > | Martial > | > | > | _______________________________________________ > | 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 Martial.Boniou at ifrance.com Thu May 31 18:08:48 2007 From: Martial.Boniou at ifrance.com (Martial Boniou) Date: Thu, 31 May 2007 18:08:48 +0200 Subject: PRComponentSettings disappeared and... In-Reply-To: References: <20070531141139.GA838@cendre> <20070531151420.GB838@cendre> Message-ID: <20070531160848.GA1097@cendre> Lukas Renggli a ?crit : | > I found that the PUSecurity instances maintain the Settings in the | > arrays | > #ownerPermissions and #groupPermissions. How can I remove them in each | > decorations ? | | Did you try something like? | | PUSecurity allInstancesDo: [ :e | e remove ] That's what I just was doing. Unfortunately it's the only way for instance. -- Martial | | This resets just all the security settings. I am sure one could think | of something more sophisticated that would just fix the obsolete | references. | | Lukas | | | | | > | > -- | > Martial | > | > Martial Boniou a ?crit : | > | Hi, | > | | > | I am a bit lost since the PRComponentSettings vanished in Pier. | > Actually | > | I cannot export/import my old kernels because of an obsolete | > PRComponentSettings. | > | I think there is a way to remove the PRComponentSettings use in my | > | kernels but I don't know how to find/do this. Everytime a big | > change is | > | made, it could be nice to go thru the Instances of PRKernel to | > change | > | things (even if I know it's a lot of work). | > | | > | Regards, | > | | > | -- | > | Martial | > | | > | | > | _______________________________________________ | > | 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 | | | | | _______________________________________________ | SmallWiki, Magritte, Pier and Related Tools ... | https://www.iam.unibe.ch/mailman/listinfo/smallwiki | From renggli at iam.unibe.ch Thu May 31 19:08:26 2007 From: renggli at iam.unibe.ch (Lukas Renggli) Date: Thu, 31 May 2007 19:08:26 +0200 Subject: PRComponentSettings disappeared and... In-Reply-To: <20070531160848.GA1097@cendre> References: <20070531141139.GA838@cendre> <20070531151420.GB838@cendre> <20070531160848.GA1097@cendre> Message-ID: <6EE0B70A-793A-4C60-8C77-746FDA72E072@iam.unibe.ch> > | > I found that the PUSecurity instances maintain the Settings in the > | > arrays > | > #ownerPermissions and #groupPermissions. How can I remove them > in each > | > decorations ? > | > | Did you try something like? > | > | PUSecurity allInstancesDo: [ :e | e remove ] > > That's what I just was doing. Unfortunately it's the only way for > instance. That would be preserve all the security settings ... PUSecurity allInstancesDo: [ :e | e ownerPermissions: (e ownerPermissions reject: [ :f | f command isObsolete ]). e groupPermissions: (e groupPermissions reject: [ :f | f command isObsolete ]). e otherPermissions: (e otherPermissions reject: [ :f | f command isObsolete ]). Lukas -- Lukas Renggli http://www.lukas-renggli.ch From Martial.Boniou at ifrance.com Thu May 31 22:02:50 2007 From: Martial.Boniou at ifrance.com (Martial Boniou) Date: Thu, 31 May 2007 22:02:50 +0200 Subject: PRComponentSettings disappeared and... In-Reply-To: <6EE0B70A-793A-4C60-8C77-746FDA72E072@iam.unibe.ch> References: <20070531141139.GA838@cendre> <20070531151420.GB838@cendre> <20070531160848.GA1097@cendre> <6EE0B70A-793A-4C60-8C77-746FDA72E072@iam.unibe.ch> Message-ID: <20070531195416.GB1097@cendre> Lukas Renggli a ?crit : | > | > I found that the PUSecurity instances maintain the Settings in the | > | > arrays | > | > #ownerPermissions and #groupPermissions. How can I remove them | > in each | > | > decorations ? | > | | > | Did you try something like? | > | | > | PUSecurity allInstancesDo: [ :e | e remove ] | > | > That's what I just was doing. Unfortunately it's the only way for | > instance. | | That would be preserve all the security settings ... | | PUSecurity allInstancesDo: [ :e | | e ownerPermissions: (e ownerPermissions | reject: [ :f | f command isObsolete ]). | e groupPermissions: (e groupPermissions | reject: [ :f | f command isObsolete ]). | e otherPermissions: (e otherPermissions | reject: [ :f | f command isObsolete ]). | That works. I was searching a thing like that. One must add a "f command isNil" to filter all bad built PUPermission. Maybe it would be cool to add such a test for each Pier upgrade. I did this: (PUSecurity instVarNames select: [:p | '*Permissions' match: p]) do: [:me | PUSecurity allInstancesDo: [:ea | ea perform: (me , ':') asSymbol with: ((ea perform: me asSymbol) reject: [:c | c command isNil or: [c command isObsolete]])]]. Thanks, -- Martial | Lukas | | -- | Lukas Renggli | http://www.lukas-renggli.ch | | | | _______________________________________________ | SmallWiki, Magritte, Pier and Related Tools ... | https://www.iam.unibe.ch/mailman/listinfo/smallwiki