From ramon.leon at allresnet.com Thu Nov 2 23:35:44 2006 From: ramon.leon at allresnet.com (Ramon Leon) Date: Thu, 2 Nov 2006 15:35:44 -0700 Subject: Magritte Validations Message-ID: <014d01c6fecf$3c09abf0$9700a8c0@hq.allresnet.com> Anyone know of any good resources for working with the validation system of Magritte. Specifically I'm interested in what it takes to have fields that depend on the value of each other. Say an end date that must be before a start date, both of which have just been edited. I was thinking something like this on the instance side... description ^self class description collect: [:each | each accessor selector = #eventEndDate ifTrue: [each addCondition: [:value | value > self eventStartDate]] ifFalse: [each]] But that doesn't work because I can't rely on eventStartDate having a value yet, it may not have been set by its description, or it may be invalid for some other reason. Are the any public sample apps that use Magritte heavily one could look at? Ramon Leon http://onsmalltalk.com From philippe.marschall at gmail.com Thu Nov 2 23:52:41 2006 From: philippe.marschall at gmail.com (Philippe Marschall) Date: Thu, 2 Nov 2006 23:52:41 +0100 Subject: Magritte Validations In-Reply-To: <014d01c6fecf$3c09abf0$9700a8c0@hq.allresnet.com> References: <014d01c6fecf$3c09abf0$9700a8c0@hq.allresnet.com> Message-ID: <66666f210611021452g348d5d52rf9b937916544c031@mail.gmail.com> 2006/11/2, Ramon Leon : > Anyone know of any good resources for working with the validation system of > Magritte. Specifically I'm interested in what it takes to have fields that > depend on the value of each other. Say an end date that must be before a > start date, both of which have just been edited. > > I was thinking something like this on the instance side... > > description > ^self class description collect: [:each | > each accessor selector = #eventEndDate > ifTrue: [each addCondition: [:value | value > self > eventStartDate]] > ifFalse: [each]] > > But that doesn't work because I can't rely on eventStartDate having a value > yet, it may not have been set by its description, or it may be invalid for > some other reason. Are the any public sample apps that use Magritte heavily > one could look at? I need something like that for events in ICalMagritte where either duration or end has to be nil. I define a condition on the object (event) like this: MACondition subclass: #ICMEventCondition value: aCheckedMemento ^(self endOf: aCheckedMemento) isNil or: [ (self durationOf: aCheckedMemento) isNil ] endOf: aCheckedMemento ^aCheckedMemento cache at: ICEvent descriptionEnd durationOf: aCheckedMemento ^aCheckedMemento cache at: ICEvent descriptionDuration ICEvent class >> #descriptionContainer ^super descriptionContainer addCondition: ICMEventCondition new labelled: ICMEventCondition defaultLabel; yourself There are probably better ways but this works nice for me. Cheers Philippe From ramon.leon at allresnet.com Fri Nov 3 01:18:59 2006 From: ramon.leon at allresnet.com (Ramon Leon) Date: Thu, 2 Nov 2006 17:18:59 -0700 Subject: Magritte Validations In-Reply-To: <66666f210611021452g348d5d52rf9b937916544c031@mail.gmail.com> Message-ID: <016001c6fedd$a84ca2a0$9700a8c0@hq.allresnet.com> > I need something like that for events in ICalMagritte where > either duration or end has to be nil. I define a condition on > the object > (event) like this: > > MACondition subclass: #ICMEventCondition > > value: aCheckedMemento > ^(self endOf: aCheckedMemento) isNil > or: [ (self durationOf: aCheckedMemento) isNil ] > > endOf: aCheckedMemento > ^aCheckedMemento cache at: ICEvent descriptionEnd > > durationOf: aCheckedMemento > ^aCheckedMemento cache at: ICEvent descriptionDuration > > ICEvent class >> #descriptionContainer > ^super descriptionContainer > addCondition: ICMEventCondition new labelled: > ICMEventCondition defaultLabel; > yourself > > There are probably better ways but this works nice for me. > > Cheers > Philippe Sweet, exactly what I needed, thanks. Ramon Leon http://onsmalltalk.com From ramon.leon at allresnet.com Fri Nov 3 19:10:33 2006 From: ramon.leon at allresnet.com (Ramon Leon) Date: Fri, 3 Nov 2006 11:10:33 -0700 Subject: Magritte Validations In-Reply-To: <66666f210611021452g348d5d52rf9b937916544c031@mail.gmail.com> Message-ID: <01a201c6ff73$5b07fd50$9700a8c0@hq.allresnet.com> > I need something like that for events in ICalMagritte where > either duration or end has to be nil. I define a condition on > the object > (event) like this: > > MACondition subclass: #ICMEventCondition > > value: aCheckedMemento > ^(self endOf: aCheckedMemento) isNil > or: [ (self durationOf: aCheckedMemento) isNil ] > > endOf: aCheckedMemento > ^aCheckedMemento cache at: ICEvent descriptionEnd > > durationOf: aCheckedMemento > ^aCheckedMemento cache at: ICEvent descriptionDuration > > ICEvent class >> #descriptionContainer > ^super descriptionContainer > addCondition: ICMEventCondition new labelled: > ICMEventCondition defaultLabel; > yourself > > There are probably better ways but this works nice for me. > > Cheers > Philippe Any chance you know or where to hook Magritte to customize the output of the errors. Required Errors for example, if I don't like the default message, can I change it? What if I want the errors to show beside the fiels of the error, is that possible? Ramon Leon http://onsmalltalk.com From renggli at iam.unibe.ch Sat Nov 4 09:39:18 2006 From: renggli at iam.unibe.ch (Lukas Renggli) Date: Sat, 4 Nov 2006 09:39:18 +0100 Subject: Magritte Validations In-Reply-To: <01a201c6ff73$5b07fd50$9700a8c0@hq.allresnet.com> References: <01a201c6ff73$5b07fd50$9700a8c0@hq.allresnet.com> Message-ID: <5F5BE5E7-E4E7-4D35-855A-FE50AC6B4088@iam.unibe.ch> > Any chance you know or where to hook Magritte to customize the > output of the errors. Required Errors for example, if I don't like > the default message, can I change it? What if I want the errors to > show beside the fiels of the error, is that possible? Yes, this is easily possible, we have a few applications that highlights the field with the error and puts the error message next to it. To achieve the desired effect you have to create you own form renderer by subclassing MAComponentRenderer or one of its subclasses. Lukas -- Lukas Renggli http://www.lukas-renggli.ch From ducasse at iam.unibe.ch Sat Nov 4 10:41:38 2006 From: ducasse at iam.unibe.ch (=?ISO-8859-1?Q?st=E9phane_ducasse?=) Date: Sat, 4 Nov 2006 10:41:38 +0100 Subject: Magritte Validations In-Reply-To: <5F5BE5E7-E4E7-4D35-855A-FE50AC6B4088@iam.unibe.ch> References: <01a201c6ff73$5b07fd50$9700a8c0@hq.allresnet.com> <5F5BE5E7-E4E7-4D35-855A-FE50AC6B4088@iam.unibe.ch> Message-ID: excellent! Stef On 4 nov. 06, at 09:39, Lukas Renggli wrote: >> Any chance you know or where to hook Magritte to customize the >> output of the errors. Required Errors for example, if I don't like >> the default message, can I change it? What if I want the errors to >> show beside the fiels of the error, is that possible? > > Yes, this is easily possible, we have a few applications that > highlights the field with the error and puts the error message next > to it. To achieve the desired effect you have to create you own form > renderer by subclassing MAComponentRenderer or one of its subclasses. > > Lukas > > -- > Lukas Renggli > http://www.lukas-renggli.ch > > > > _______________________________________________ > SmallWiki, Magritte, Pier and Related Tools ... > https://www.iam.unibe.ch/mailman/listinfo/smallwiki From ramonleon at cox.net Sat Nov 4 16:27:58 2006 From: ramonleon at cox.net (Ramon Leon) Date: Sat, 04 Nov 2006 08:27:58 -0700 Subject: Magritte Validations In-Reply-To: <5F5BE5E7-E4E7-4D35-855A-FE50AC6B4088@iam.unibe.ch> References: <01a201c6ff73$5b07fd50$9700a8c0@hq.allresnet.com> <5F5BE5E7-E4E7-4D35-855A-FE50AC6B4088@iam.unibe.ch> Message-ID: <454CB17E.4000206@cox.net> Lukas Renggli wrote: >>Any chance you know or where to hook Magritte to customize the >>output of the errors. Required Errors for example, if I don't like >>the default message, can I change it? What if I want the errors to >>show beside the fiels of the error, is that possible? > > > Yes, this is easily possible, we have a few applications that > highlights the field with the error and puts the error message next > to it. To achieve the desired effect you have to create you own form > renderer by subclassing MAComponentRenderer or one of its subclasses. > > Lukas > Perfect, I was going to do that anyway to do a CSS layout, I guess it makes perfect sense that the validations are in there as well. From ramon.leon at allresnet.com Mon Nov 6 23:25:06 2006 From: ramon.leon at allresnet.com (Ramon Leon) Date: Mon, 6 Nov 2006 15:25:06 -0700 Subject: Magritte Forms Message-ID: <028c01c701f2$6932aa70$9700a8c0@hq.allresnet.com> Anyone know if it's possible, to take descriptions from several objects and display them on the screen all at once? For example, say I have a Customer object with an addresses collection. But one data entry screen, I want to flatten it so that the first address in the collection shows up as fields on the customer form, but the model still keeps them as separate objects and each field still writes to it's original model. I looked through Lukas's thesis but didn't see anything. I was thinking I could override description on the instance side, and add All the subcomponents descriptors to the main description, but I don't see how it'd get bound to the subcomponent as it's model. Ramon Leon http://onsmalltalk.com From renggli at iam.unibe.ch Mon Nov 6 23:42:13 2006 From: renggli at iam.unibe.ch (Lukas Renggli) Date: Mon, 6 Nov 2006 23:42:13 +0100 Subject: Magritte Forms In-Reply-To: <028c01c701f2$6932aa70$9700a8c0@hq.allresnet.com> References: <028c01c701f2$6932aa70$9700a8c0@hq.allresnet.com> Message-ID: <0F383B3A-4174-4D43-9F95-48751F8CBD74@iam.unibe.ch> > Anyone know if it's possible, to take descriptions from several > objects and > display them on the screen all at once? Sure, there are at least two possibilities: 1. http://www.iam.unibe.ch/pipermail/smallwiki/2005-October/001431.html 2. http://www.iam.unibe.ch/pipermail/smallwiki/2005-November/001521.html Cheers, Lukas -- Lukas Renggli http://www.lukas-renggli.ch From ramon.leon at allresnet.com Tue Nov 7 00:52:50 2006 From: ramon.leon at allresnet.com (Ramon Leon) Date: Mon, 6 Nov 2006 16:52:50 -0700 Subject: Magritte Forms In-Reply-To: <0F383B3A-4174-4D43-9F95-48751F8CBD74@iam.unibe.ch> Message-ID: <028d01c701fe$aae89a40$9700a8c0@hq.allresnet.com> > > > Anyone know if it's possible, to take descriptions from several > > objects and display them on the screen all at once? > > Sure, there are at least two possibilities: > > 1. > http://www.iam.unibe.ch/pipermail/smallwiki/2005-October/001431.html > > 2. > http://www.iam.unibe.ch/pipermail/smallwiki/2005-November/001521.html > > Cheers, > Lukas > > -- > Lukas Renggli > http://www.lukas-renggli.ch LOL, that'll teach me to search before asking. Been a while, hadn't realized we'd discussed this before. Ramon Leon http://onsmalltalk.com From philippe.marschall at gmail.com Sun Nov 12 15:17:56 2006 From: philippe.marschall at gmail.com (Philippe Marschall) Date: Sun, 12 Nov 2006 15:17:56 +0100 Subject: Reuse of PierSecurity or Spielverderber without Pier in Seaside Application In-Reply-To: <4555FA55.4070408@laposte.net> References: <4555FA55.4070408@laposte.net> Message-ID: <66666f210611120617q788e15d0m74e0e2d4a9adc3fc@mail.gmail.com> 2006/11/11, florent trolat : > Hi, > > I need, for my seaside application, security and authentification. > I've seen PierSecurity and Spielverder. This 2 packages will be very > usefull if I success tu use one without pier. > What's your feeling about this? > Do you think it's possible to reuse Spielverder without pier for example? > > maybe you know other security/authentification packages? I'm not really sure how much can be reused besides the general ideas behind it. I only know Spielverderber but I don't think the situation is much different for Lukas' package. The model makes the general assumption that we have commands that operate on a structure. There is a user class, a group class, some special group and user classes that you probably don't want and a command group class. Besides there is a list class, a list item class and some methods to find an item in the list. That was it, the rest is Pier specific. Philippe From renggli at gmail.com Tue Nov 14 18:34:57 2006 From: renggli at gmail.com (Lukas Renggli) Date: Tue, 14 Nov 2006 18:34:57 +0100 Subject: [Seaside] [Magritte] Multiple descriptions validation/condition In-Reply-To: <005301c70802$a8298a80$9700a8c0@hq.allresnet.com> References: <37fd0c50611131927w37c6482as88c5902cfe988a23@mail.gmail.com> <005301c70802$a8298a80$9700a8c0@hq.allresnet.com> Message-ID: <67628d690611140934o3f579d47y8c6c0c48d4a76373@mail.gmail.com> > Thanks, glad it's useful. As for beRequired, you got me there, no clue, > maybe someone else will chime in with the answer. The latest version of Magritte (Magritte-All-lr.179 or later) has properties to set the error text for specific error, e.g. #conflictErrorMessage:, #kindErrorMessage:, #multipleErrorsMessage:, #requiredErrorMessage: and #rangeErrorMessage:. The latest version of Pier also makes use of this new feature and now displays much nicer error messages. Note that you are required to load Seaside2.7 to use this version of Magritte. Hope this helps, Lukas -- Lukas Renggli http://www.lukas-renggli.ch From renggli at iam.unibe.ch Sun Nov 19 13:11:33 2006 From: renggli at iam.unibe.ch (Lukas Renggli) Date: Sun, 19 Nov 2006 13:11:33 +0100 Subject: need help whith Magritte In-Reply-To: <000901c70b34$616a2660$a602a8c0@tof> References: <000901c70b34$616a2660$a602a8c0@tof> Message-ID: Hi Christophe, > I make my model and view package. But now I am lost?how I can run > this? I see in your tutorial the line below to have seaside interface: > > result := self call: (aModel asComponent addValidatedForm; yourself). > > But I am block. This code looks ok and should work fine. The whole part within the brackets is Magritte, the rest is plain Seaside. So depending on why you are blocked, you might want to check out different resource: - If it is the Magritte part, you can read my master thesis [1] and or re-ask the question in the Pier, Magritte mailing list [2]. - If it is the Seaside part that poses the problem, you might want to check out my Seaside tutorials [3] or re-ask the question in the Seaside mailing list [4]. Cheers, Lukas [1] http://www.iam.unibe.ch/~scg/Archive/Diploma/Reng06a.pdf [2] http://www.iam.unibe.ch/mailman/listinfo/smallwiki [3] http://www.lukas-renggli.ch/smalltalk/seaside/tutorial [4] http://lists.squeakfoundation.org/cgibin/mailman/listinfo/seaside -- Lukas Renggli http://www.lukas-renggli.ch From Martial.Boniou at ifrance.com Tue Nov 21 18:36:48 2006 From: Martial.Boniou at ifrance.com (Martial Boniou) Date: Tue, 21 Nov 2006 18:36:48 +0100 Subject: saving image and deployment features Message-ID: <20061121173648.GA1069@Cendre.local> Hi, I am real interested in seaside/magritte/pier and as a newbie (in squeak but not in smalltalk) I would like to do a little Pier/seaside website. I chose to run my squeak process in a linux server with a framebuffer X server to administrate my image with VNC access (and not by the seaside inspector available with halos). I did it with a special user (not root) and my firewall connection configuration permits me to access externally to my webserver on standard port 80. But I am a bit unsecure with a deployment of a "classical" pier configuration. If my machine crash, I lost all my data. So I need to do backup. I can run a: SmalltalkImage current snapshot: true andQuit: false. but if a user does something on my website, it's rejected. So I read somewhere (maybe thru this mailing-list archive) about a way to do backup. Actually, I would like to save the image everytime it's possible. I heard about the use of: UnixProcess saveImageInBackgroundNicely but I don't know how to use it. With forkHeadlessSqueakAndDoThenQuit message, it seems to be possible to save my image in another until I do the permanent and tested weekly backup. So if I crash or there is a glitch, my image or the periodically save image can be broken but I can restore the most recent backup. If someone can explain me how to do (or find how to do) this, I'll be glad. I don't want to build a wiki/blog like site and lost in a crash all the readers'comments/posts. I also noticed some errors in the deployment of squeakfoundation.org. By clicking on 'Edit' or 'Login', there's error. But instead of permitting me to go back to the previous page with a short error message (and advertising the webadmin) like on the other classic php/jsp website, I go to debug message. It's really bad. I guess that when I click on 'Debug' I open a morph Debugger window on the squeak image. It's not what I (and probably the squeakfoundation.org webmaster) want. I am sure there is a way to shortcut the doesNotUnderstand message in seaside/pier so that in a deployment mode, the user has just a friendly error message and the webmaster received an email from squeak with the debug message infos and the context. So I need your help to try to develop a website with seaside/pier because I believe in those kind of way to develop websites (I like servlets too but it's ugly, heavy and I prefer smalltalk as I used smalltalk or ObjectiveC during the most important part of my life as a programmer). I thought that I just can develop component and toggle the deployment preference tag to true, to have a ready-to-use website but there are missing things. As I said before: + how to save in one or two temporary images without stopping the working pier site? and without going (as I do now) in config page (the only place when I said 'deployment' to false) to toggle halos and then to have an inspector which permits me to manually save (I know Lukas did so too but it's not a good way). There's database way too for persistence and I will probably look at Magma/REServe and something like that. I think there are smalltalk that can save multiimage (visualworks can do this I guess) and it could be a good option that squeak do that too. + how to build a beautiful debug messages to a secure and friendly deployment? The example of the squeakfoundation.org website is a horrible one. As with the 'Toggle Halos' button in the oops-i-didnt-see-i-toogle-deployment-to-false case, it's dangerous and every visitor can crash or browse in the image without getting the root seaside admin (that could be nd5 encrypted too). I hope you will have answers. Very thanks for reading this a-bit-too-long mail, -- Martial From renggli at iam.unibe.ch Tue Nov 21 18:55:18 2006 From: renggli at iam.unibe.ch (Lukas Renggli) Date: Tue, 21 Nov 2006 18:55:18 +0100 Subject: saving image and deployment features In-Reply-To: <20061121173648.GA1069@Cendre.local> References: <20061121173648.GA1069@Cendre.local> Message-ID: Hi Martial, > I am real interested in seaside/magritte/pier and as a newbie (in > squeak but not in smalltalk) I would like to do a little Pier/ > seaside website. I chose to run my squeak process in a linux server > with a framebuffer X server to administrate my image with VNC > access (and not by the seaside inspector available with halos). I > did it with a special user (not root) and my firewall connection > configuration permits me to access externally to my webserver on > standard port 80. welcome to Seaside/Magritte/Pier ;-) So far your configuration looks pretty standard for such a setup. > But I am a bit unsecure with a deployment of a "classical" pier > configuration. If my machine crash, I lost all my data. So I need > to do > backup. I can run a: > SmalltalkImage current snapshot: true andQuit: false. > but if a user does something on my website, it's rejected. So I read > somewhere (maybe thru this mailing-list archive) about a way to do > backup. Actually, I would like to save the image everytime it's > possible. I heard about the use of: > UnixProcess saveImageInBackgroundNicely but I don't know how to use > it. > With forkHeadlessSqueakAndDoThenQuit message, it seems to be > possible to > save my image in another until I do the permanent and tested weekly > backup. So if I crash or there is a glitch, my image or the > periodically > save image can be broken but I can restore the most recent backup. > If someone can explain me how to do (or find how to do) this, I'll be > glad. I don't want to build a wiki/blog like site and lost in a crash > all the readers'comments/posts. This is what is implemented in PRImagePersistency. If you have OSProcess loaded it will do it nicely in the background, else it will just do a snapshot and block the VM for a few seconds while saving. I am successfully using this method for all my Pier images. Have a look at the implementation, there are a lot of things that you can tweak and change there. Keith Hodges did a persistency implementation using the object database Magma. This looks very promising and I think this will be the way to go in the future. I am sure he is willing to tell you more about it ... There are a couple of other persistency strategies floating around, check out the mailing list archive. > I also noticed some errors in the deployment of > squeakfoundation.org. By > clicking on 'Edit' or 'Login', there's error. But instead of > permitting > me to go back to the previous page with a short error message (and > advertising the webadmin) like on the other classic php/jsp website, I > go to debug message. It's really bad. I guess that when I click on > 'Debug' I open a morph Debugger window on the squeak image. It's not > what I (and probably the squeakfoundation.org webmaster) want. I am > sure > there is a way to shortcut the doesNotUnderstand message in seaside/ > pier > so that in a deployment mode, the user has just a friendly error > message > and the webmaster received an email from squeak with the debug message > infos and the context. I am not responsible for this server, but I know the problem: the versions of Pier and Seaside do not match. To answer your question: in the Seaside configuration interface there is a setting to choose among different error handlers or implement your very own one ... Cheers, Lukas -- Lukas Renggli http://www.lukas-renggli.ch From brad at sonaural.com Tue Nov 21 19:27:48 2006 From: brad at sonaural.com (Brad Fuller) Date: Tue, 21 Nov 2006 10:27:48 -0800 Subject: saving image and deployment features In-Reply-To: References: <20061121173648.GA1069@Cendre.local> Message-ID: <45634524.6010001@sonaural.com> Lukas Renggli wrote: >Hi Martial, > > > >>I am real interested in seaside/magritte/pier and as a newbie (in >>squeak but not in smalltalk) I would like to do a little Pier/ >>seaside website. I chose to run my squeak process in a linux server >>with a framebuffer X server to administrate my image with VNC >>access (and not by the seaside inspector available with halos). I >>did it with a special user (not root) and my firewall connection >>configuration permits me to access externally to my webserver on >>standard port 80. >> >> > >welcome to Seaside/Magritte/Pier ;-) > >So far your configuration looks pretty standard for such a setup. > > > >>But I am a bit unsecure with a deployment of a "classical" pier >>configuration. If my machine crash, I lost all my data. So I need >>to do >>backup. I can run a: >>SmalltalkImage current snapshot: true andQuit: false. >>but if a user does something on my website, it's rejected. So I read >>somewhere (maybe thru this mailing-list archive) about a way to do >>backup. Actually, I would like to save the image everytime it's >>possible. I heard about the use of: >>UnixProcess saveImageInBackgroundNicely but I don't know how to use >>it. >>With forkHeadlessSqueakAndDoThenQuit message, it seems to be >>possible to >>save my image in another until I do the permanent and tested weekly >>backup. So if I crash or there is a glitch, my image or the >>periodically >>save image can be broken but I can restore the most recent backup. >>If someone can explain me how to do (or find how to do) this, I'll be >>glad. I don't want to build a wiki/blog like site and lost in a crash >>all the readers'comments/posts. >> >> > >This is what is implemented in PRImagePersistency. If you have >OSProcess loaded it will do it nicely in the background, else it will >just do a snapshot and block the VM for a few seconds while saving. I >am successfully using this method for all my Pier images. Have a look >at the implementation, there are a lot of things that you can tweak >and change there. > >Keith Hodges did a persistency implementation using the object >database Magma. This looks very promising and I think this will be >the way to go in the future. I am sure he is willing to tell you more >about it ... > >There are a couple of other persistency strategies floating around, >check out the mailing list archive. > > > >>I also noticed some errors in the deployment of >>squeakfoundation.org. By >>clicking on 'Edit' or 'Login', there's error. But instead of >>permitting >>me to go back to the previous page with a short error message (and >>advertising the webadmin) like on the other classic php/jsp website, I >>go to debug message. It's really bad. I guess that when I click on >>'Debug' I open a morph Debugger window on the squeak image. It's not >>what I (and probably the squeakfoundation.org webmaster) want. I am >>sure >>there is a way to shortcut the doesNotUnderstand message in seaside/ >>pier >>so that in a deployment mode, the user has just a friendly error >>message >>and the webmaster received an email from squeak with the debug message >>infos and the context. >> >> > >I am not responsible for this server, but I know the problem: the >versions of Pier and Seaside do not match. > > That was fixed before. I don't know why it doesn't work now. I'll check that out. (though, I'm not really the webmaster of the site.) But, besides that, the squeakfoundation.org site should not be open to the public to edit. I guess the board has not been working on it, although they have been told it is available. brad From deborahvjzvmhvdgpwh at calbick.com Wed Nov 22 15:51:46 2006 From: deborahvjzvmhvdgpwh at calbick.com (Lindsay Gomez) Date: Wed, 22 Nov 2006 14:51:46 -0000 Subject: Lindsay wrote: Message-ID: <01c75719$e2811de0$6c822ecf@deborahvjzvmhvdgpwh> Score with Nanotechnology! We called it! NSLT is up BIG on huge volume. We hope you took a position early and are smiling right now. If you didn't, not to worry. The big spike is expected also on Wednesday, November 22nd. Get in now! It is widely predicted that nanotechnology will be the next booming industry for our economy. Our feature is in the perfect place at the perfect time. Company: Nano Superlattice Technology, Inc. Symbol: NSLT Price: $0.22(+37%) Short-Term Target: $0.58 Long-Term Target: $5.50 With the increased miniaturization of personal electronics devices current tools are reaching their limits. Nano Superlattice Technology Inc. is a nanotechnology company engaged in the coating of tools and components with nano structured PVD coatings for high-tech industries. NSLT uses Superlattice technology to apply multi-layers of super-hard elemental coatings on an array of precision products to achieve a variety of physical properties. An amazing revelation is set to come out of the Nano laboratoryes which will have an enormous impact on the manufacturing world. Seize the day and get in before the news is out! --- (CNN) -- Although Congress is unlikely to follow calls from a top Democrat to bring back the military draft, the United States does have a plan, if necessary, aimed at inducting millions of young men for service. EGG HARBOR TOWNSHIP, New Jersey (AP) -- Autopsies were being conducted Tuesday on four women whose bodies were found in a seedy area just outside Atlantic City. WASHINGTON (AP) -- NASA's best effort to find a missing Mars space probe failed Monday night, as scientists at the space agency began to lose hope for the 10-year-old planet-mapping workhorse From norbert at hartl.name Mon Nov 27 15:37:12 2006 From: norbert at hartl.name (Norbert Hartl) Date: Mon, 27 Nov 2006 15:37:12 +0100 Subject: Customizing views in Magritte Message-ID: <1164638232.25572.42.camel@localhost> Hi, at the moment I'm playing with magritte to test if it is suitable for my web application which is done with seaside. I created a model and I'm able to use it as a component with seaside. I have a model where ClassA has a 1:m relationship to ClassB. The exception here is that there is a fixed set of possible instances for ClassB to choose for the reference from ClassA. So what I need on the html rendering side is a kind of a pull-down and not an extra form for creating new instances of ClassB. I read the tutorial.pdf. There are three possibilities mentioned to customize the views for the model. Unfortunately I didn't figure out how this is working. The mentioned method defaultContainer (which should be overridden) doesn't exist in the magritte version I use. (I is the newest from Monticello) I even tried to set a new componentClass in the descriptionFoo class method.But with no effect. I'm not sure what I'm doing wrong. Magritte seems to ignore every step I take to customize. What would be the best way to customize on the class or even better on description instance side? Why is there an extra componentRenderer? As far as I figured it out componentRenderer is container dependent. What is the reason for having a additional method componentRenderer? What are the best practices for wiring magritte components together? The only way I found is to use onAnswer:. thanks in advance, Norbert From renggli at iam.unibe.ch Mon Nov 27 16:47:29 2006 From: renggli at iam.unibe.ch (Lukas Renggli) Date: Mon, 27 Nov 2006 16:47:29 +0100 Subject: Customizing views in Magritte In-Reply-To: <1164638232.25572.42.camel@localhost> References: <1164638232.25572.42.camel@localhost> Message-ID: <3989BA2F-560E-4FA0-A658-4F4ABABEE93D@iam.unibe.ch> Hi Norbert, > I created a model and I'm able to use it as a component with > seaside. I have a model where ClassA has a 1:m relationship > to ClassB. The exception here is that there is a fixed set > of possible instances for ClassB to choose for the reference > from ClassA. Then you should use the MAMultipleOptionDescription and you get 3 possibilites to choose Widgets from: MAMultiselectListComponent (default), MACheckboxGroupComponent and MAListCompositonComponent. (see slide 41) > I read the tutorial.pdf. There are three possibilities mentioned > to customize the views for the model. Unfortunately I didn't > figure out how this is working. The mentioned method defaultContainer > (which should be overridden) doesn't exist in the magritte version > I use. (I is the newest from Monticello) #defaultContainer has been renamed to #descriptionContainer some time ago. I have updated slides in the pipeline that I will use during a Magritte tutorial next Monday, however they are not quite ready yet. > I even tried to set a new componentClass in the descriptionFoo > class method.But with no effect. I'm not sure what I'm doing > wrong. Magritte seems to ignore every step I take to customize. > What would be the best way to customize on the class or even > better on description instance side? In the Pier Unix Security package there is the following use of MAMultipleOptionDescription, where the user can choose among different permission objects in an 1:m relation: PUChangeSecurity>>descriptionPermissions ^ (MAMultipleOptionDescription selector: #permissions label: 'Permissions' priority: 310) comment: 'Defines the set of permissions used together with the selected operation.'; options: self permissionInstances; reference: PUPermission description; beSorted; yourself As I wrote above this is using MAMultiselectListComponent as a Seaside component. If you want to use checkboxes instead of a list you could add "componentClass: MACheckboxGroupComponent" to the cascade. > Why is there an extra componentRenderer? As far as I figured > it out componentRenderer is container dependent. What is the > reason for having a additional method componentRenderer? #componentRenderer: is defined in the container. It is a visitor used to define the layout in which your description components are arranged. #componentClass: is defined on every description, it is used to provide the Seaside component class responsible to display the description. > What are the best practices for wiring magritte components > together? The only way I found is to use onAnswer:. To use #onAnswer: is a pretty good practice. Also #call: is quite nice, most of my applications use it like this: result := self call: (aModel asComponent addValidatedForm; yourself). Hope this helps, Lukas -- Lukas Renggli http://www.lukas-renggli.ch