From chris at chrisburkert.de Tue Jan 11 18:36:15 2005 From: chris at chrisburkert.de (Chris Burkert) Date: Tue, 11 Jan 2005 18:36:15 +0100 Subject: SMALLWIKI application In-Reply-To: <1071878153.20050111100103@libero.it> References: <1071878153.20050111100103@libero.it> Message-ID: <41E40E8F.6060407@chrisburkert.de> Hi Andrea, please send your questions to the smallwiki mailinglist. Others also may be interested in the topic. Andrea Loddo wrote: > I am developping an easy application with Smallwiki. Actually I am > trying to make a file upload between a client and the smallwiki HTTP server > with the method "fileUploadWithCallback:aBlock" but I have no > idea about the block it accepts. > Coud you help me? Take a look at the example when uploading Resources to SmallWiki. Just browse the senders of #fileUploadWithCallback: ... you will find #renderFields in SWResourceEdit which, in this particular case, passes a symbol, not a block. best regards Chris Burkert PS: You might be more interested in Seaside than SmallWiki for a real 'application'. -- http://www.chrisburkert.de/ From garbiner at libero.it Tue Jan 11 19:02:13 2005 From: garbiner at libero.it (Andrea Loddo) Date: Tue, 11 Jan 2005 19:02:13 +0100 Subject: file upload & Action Message-ID: <1472794339.20050111190213@libero.it> hi, the instance method renderForm html form: [ html fileUploadWithCallback: [:f | file _ f]. html submitButton. ]. of an Action subclass I used for a file upload has a problem: "f" is an istance of my Action subclass and it is not the file I want to upload. Could anybody tell me why? Is it necessary to implement a subclass of Action to perform a file upload? Thanks a lot. Andrea Loddo. mailto:garbiner at libero.it From renggli at iam.unibe.ch Tue Jan 11 19:38:12 2005 From: renggli at iam.unibe.ch (Lukas Renggli) Date: Tue, 11 Jan 2005 19:38:12 +0100 Subject: file upload & Action In-Reply-To: <1472794339.20050111190213@libero.it> References: <1472794339.20050111190213@libero.it> Message-ID: Hi Andrea, have a look at the class CallbackDemo, to see a lot of examples on callbacks in SmallWiki. Also have a look at Action>>executeCallback and all the messages it sends to see how the callbacks are evaluated. I know, that the way callbacks are handled in SmallWiki 1 isn't that easy to understand, but still it is probably the best you can get from a state-less framework as opposed to Seaside. Note that on every request there is a new action instance created, I refer to the new one when talking about the one currently running and to the old one when talking about the one that was used to render the page that set-up the callbacks. A callback is either a symbol or a block that will be evaluated if necessary. Let's have a look at the two cases independently: 1. a symbol will be performed on the new action. 2. a block will be evaluated with the new action as first argument. This is what you observed. For form elements the submitted value and the mime type are passed in, if your symbol or block accepts more arguments. So for your action you maybe want to use a block like html fileUploadWithCallback: [ :action :file :mime | ... ] or a selector like html fileUploadWithCallback: #callbackWithFile:andMime: And probably you should render your form like this: html attributeAt: 'enctype' put: 'multipart/form-data'. html form: [ ... ] action: self. The first line is actually a requirement of the HTTP protocol, when you want to make sure that files are properly transmitted. The second line should replace your #form: It makes sure that the callbacks are evaluated within the same structure and within the same action class, else you'll loose your context and the callback will be probably performed at the wrong place and an error will be raised. Actually I don't know what happens if you specify a form without an url handler. I hope this helps. Else there are some more examples and discussions about this topic in the mailing-list archive. Cheers, Lukas -- Lukas Renggli http://www.lukas-renggli.ch From mdrio at tiscali.it Tue Jan 11 22:48:31 2005 From: mdrio at tiscali.it (Mauro Del Rio) Date: Tue, 11 Jan 2005 22:48:31 +0100 Subject: file upload & Action References: <1472794339.20050111190213@libero.it> Message-ID: <002901c4f827$4bd9e280$addcb9c2@glottis> Mmm, per un attimo ho pensato che la tua mail fosse spam :) Cmq ora come ora non so aiutarti, diciamo che non ho capito una mazza. Magari se ci si vede... Ciao Mauro ----- Original Message ----- From: "Andrea Loddo" To: Sent: Tuesday, January 11, 2005 7:02 PM Subject: file upload & Action > hi, > > the instance method > > renderForm > html form: [ > html fileUploadWithCallback: [:f | file _ f]. > html submitButton. > ]. > > of an Action subclass I used for a file upload has a problem: > "f" is an istance of my Action subclass and it is not the file I want to upload. > Could anybody tell me why? > Is it necessary to implement a subclass of Action to perform a file > upload? > > Thanks a lot. > > Andrea Loddo. > mailto:garbiner at libero.it > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.iam.unibe.ch/pipermail/smallwiki/attachments/20050111/c2cec31c/attachment.htm From garbiner at libero.it Thu Jan 13 15:14:41 2005 From: garbiner at libero.it (Andrea Loddo) Date: Thu, 13 Jan 2005 15:14:41 +0100 Subject: file upload & Action In-Reply-To: References: <1472794339.20050111190213@libero.it> Message-ID: <1557077858.20050113151441@libero.it> Thanks very much! Everything works properly now! File upload is OK! Thanks a lot! Andrea Loddo. Tuesday, January 11, 2005, 7:38:12 PM, you wrote: > Hi Andrea, > have a look at the class CallbackDemo, to see a lot of examples on > callbacks in SmallWiki. Also have a look at Action>>executeCallback and > all the messages it sends to see how the callbacks are evaluated. > I know, that the way callbacks are handled in SmallWiki 1 isn't that > easy to understand, but still it is probably the best you can get from > a state-less framework as opposed to Seaside. > Note that on every request there is a new action instance created, I > refer to the new one when talking about the one currently running and > to the old one when talking about the one that was used to render the > page that set-up the callbacks. > A callback is either a symbol or a block that will be evaluated if > necessary. Let's have a look at the two cases independently: > 1. a symbol will be performed on the new action. > 2. a block will be evaluated with the new action as first argument. > This is what you observed. > For form elements the submitted value and the mime type are passed in, > if your symbol or block accepts more arguments. So for your action you > maybe want to use a block like > html fileUploadWithCallback: [ :action :file :mime | ... ] > or a selector like > html fileUploadWithCallback: #callbackWithFile:andMime: > And probably you should render your form like this: > html attributeAt: 'enctype' put: 'multipart/form-data'. > html form: [ ... ] action: self. > The first line is actually a requirement of the HTTP protocol, when you > want to make sure that files are properly transmitted. The second line > should replace your #form: It makes sure that the callbacks are > evaluated within the same structure and within the same action class, > else you'll loose your context and the callback will be probably > performed at the wrong place and an error will be raised. Actually I > don't know what happens if you specify a form without an url handler. > I hope this helps. Else there are some more examples and discussions > about this topic in the mailing-list archive. > Cheers, > Lukas From girba at iam.unibe.ch Wed Jan 19 15:29:47 2005 From: girba at iam.unibe.ch (Tudor Girba) Date: Wed, 19 Jan 2005 15:29:47 +0100 Subject: where did the edit go from Smallwiki on kilana? Message-ID: <91BB54E0-6A26-11D9-81ED-000A95840880@iam.unibe.ch> Hi, Does anyone know where did the "edit" link go from the kilana server? I need this urgently, because the ESE teams rely on the Wiki. Thanks, Doru -- Tudor Adrian Girba Software Composition Group (www.iam.unibe.ch/~girba) University of Bern, Switzerland "Problem solving efficiency grows with the abstractness level of problem understanding." From girba at iam.unibe.ch Wed Jan 19 15:32:06 2005 From: girba at iam.unibe.ch (Tudor Girba) Date: Wed, 19 Jan 2005 15:32:06 +0100 Subject: where did the edit go from Smallwiki on kilana? In-Reply-To: <91BB54E0-6A26-11D9-81ED-000A95840880@iam.unibe.ch> References: <91BB54E0-6A26-11D9-81ED-000A95840880@iam.unibe.ch> Message-ID: Ok, So I tried to log in as the admin and it is there, which means that the edit capability was removed from the anonymous user. Is there any generic user the students could use? Or is it possible for parts of the Smallwiki to be open for anyone? Doru On Jan 19, 2005, at 3:29 PM, Tudor Girba wrote: > Hi, > > Does anyone know where did the "edit" link go from the kilana server? > I need this urgently, because the ESE teams rely on the Wiki. > > Thanks, > Doru > > -- > Tudor Adrian Girba Software Composition Group > (www.iam.unibe.ch/~girba) University of Bern, Switzerland > > "Problem solving efficiency grows with the abstractness level > of problem understanding." > > -- Tudor Adrian Girba Software Composition Group (www.iam.unibe.ch/~girba) University of Bern, Switzerland "There are no old things, there are only old ways of looking at them." From ducasse at iam.unibe.ch Wed Jan 19 20:35:27 2005 From: ducasse at iam.unibe.ch (=?ISO-8859-1?Q?st=E9phane_ducasse?=) Date: Wed, 19 Jan 2005 20:35:27 +0100 Subject: where did the edit go from Smallwiki on kilana? In-Reply-To: References: <91BB54E0-6A26-11D9-81ED-000A95840880@iam.unibe.ch> Message-ID: <45A47591-6A51-11D9-B476-000D932DAF46@iam.unibe.ch> doru the problems is that the smallWiki image that is use is instable (we do not get a window) because we loaded the code of david and it broke a bit the image. :( So I would suggest you to - install another smallWiki (we will have to do that anyway) - use Swiki Stef On 19 janv. 05, at 15:32, Tudor Girba wrote: > Ok, > > So I tried to log in as the admin and it is there, which means that > the edit capability was removed from the anonymous user. Is there any > generic user the students could use? Or is it possible for parts of > the Smallwiki to be open for anyone? > > Doru > > On Jan 19, 2005, at 3:29 PM, Tudor Girba wrote: > >> Hi, >> >> Does anyone know where did the "edit" link go from the kilana server? >> I need this urgently, because the ESE teams rely on the Wiki. >> >> Thanks, >> Doru >> >> -- >> Tudor Adrian Girba Software Composition Group >> (www.iam.unibe.ch/~girba) University of Bern, Switzerland >> >> "Problem solving efficiency grows with the abstractness level >> of problem understanding." >> >> > -- > Tudor Adrian Girba Software Composition Group > (www.iam.unibe.ch/~girba) University of Bern, Switzerland > > "There are no old things, there are only old ways of looking at them." > From renggli at iam.unibe.ch Wed Jan 19 21:16:43 2005 From: renggli at iam.unibe.ch (Lukas Renggli) Date: Wed, 19 Jan 2005 21:16:43 +0100 Subject: where did the edit go from Smallwiki on kilana? In-Reply-To: <45A47591-6A51-11D9-B476-000D932DAF46@iam.unibe.ch> References: <91BB54E0-6A26-11D9-81ED-000A95840880@iam.unibe.ch> <45A47591-6A51-11D9-B476-000D932DAF46@iam.unibe.ch> Message-ID: <0987FA69-6A57-11D9-9726-000393CFE6C8@iam.unibe.ch> Everything has been fixed from within the emergency debugger. It is up and running again ;-) On Jan 19, 2005, at 20:35, st?phane ducasse wrote: > doru > > the problems is that the smallWiki image that is use is instable (we > do not get a window) > because we loaded the code of david and it broke a bit the image. :( > > So I would suggest you to > - install another smallWiki (we will have to do that anyway) > - use Swiki > > Stef > > On 19 janv. 05, at 15:32, Tudor Girba wrote: > >> Ok, >> >> So I tried to log in as the admin and it is there, which means that >> the edit capability was removed from the anonymous user. Is there any >> generic user the students could use? Or is it possible for parts of >> the Smallwiki to be open for anyone? >> >> Doru >> >> On Jan 19, 2005, at 3:29 PM, Tudor Girba wrote: >> >>> Hi, >>> >>> Does anyone know where did the "edit" link go from the kilana >>> server? I need this urgently, because the ESE teams rely on the >>> Wiki. >>> >>> Thanks, >>> Doru >>> >>> -- >>> Tudor Adrian Girba Software Composition Group >>> (www.iam.unibe.ch/~girba) University of Bern, Switzerland >>> >>> "Problem solving efficiency grows with the abstractness level >>> of problem understanding." >>> >>> >> -- >> Tudor Adrian Girba Software Composition Group >> (www.iam.unibe.ch/~girba) University of Bern, Switzerland >> >> "There are no old things, there are only old ways of looking at them." >> > > -- Lukas Renggli http://www.lukas-renggli.ch From renggli at iam.unibe.ch Wed Jan 19 21:16:43 2005 From: renggli at iam.unibe.ch (Lukas Renggli) Date: Wed, 19 Jan 2005 21:16:43 +0100 Subject: where did the edit go from Smallwiki on kilana? In-Reply-To: <45A47591-6A51-11D9-B476-000D932DAF46@iam.unibe.ch> References: <91BB54E0-6A26-11D9-81ED-000A95840880@iam.unibe.ch> <45A47591-6A51-11D9-B476-000D932DAF46@iam.unibe.ch> Message-ID: <0987FA69-6A57-11D9-9726-000393CFE6C8@iam.unibe.ch> Everything has been fixed from within the emergency debugger. It is up and running again ;-) On Jan 19, 2005, at 20:35, st?phane ducasse wrote: > doru > > the problems is that the smallWiki image that is use is instable (we > do not get a window) > because we loaded the code of david and it broke a bit the image. :( > > So I would suggest you to > - install another smallWiki (we will have to do that anyway) > - use Swiki > > Stef > > On 19 janv. 05, at 15:32, Tudor Girba wrote: > >> Ok, >> >> So I tried to log in as the admin and it is there, which means that >> the edit capability was removed from the anonymous user. Is there any >> generic user the students could use? Or is it possible for parts of >> the Smallwiki to be open for anyone? >> >> Doru >> >> On Jan 19, 2005, at 3:29 PM, Tudor Girba wrote: >> >>> Hi, >>> >>> Does anyone know where did the "edit" link go from the kilana >>> server? I need this urgently, because the ESE teams rely on the >>> Wiki. >>> >>> Thanks, >>> Doru >>> >>> -- >>> Tudor Adrian Girba Software Composition Group >>> (www.iam.unibe.ch/~girba) University of Bern, Switzerland >>> >>> "Problem solving efficiency grows with the abstractness level >>> of problem understanding." >>> >>> >> -- >> Tudor Adrian Girba Software Composition Group >> (www.iam.unibe.ch/~girba) University of Bern, Switzerland >> >> "There are no old things, there are only old ways of looking at them." >> > > -- Lukas Renggli http://www.lukas-renggli.ch From emicklei at philemonworks.com Thu Jan 20 09:45:07 2005 From: emicklei at philemonworks.com (emicklei@philemonworks.com) Date: Thu, 20 Jan 2005 09:45:07 +0100 (CET) Subject: changing stylesheet Message-ID: <50584.164.140.159.143.1106210707.squirrel@webmail.theinternetone.net> Hi What expression should I use in the Stylesheet editor such that the Webserver will use a locally defined stylesheet? I tried: @import "mystyle.css"; and put this file in the Squeak image directory. thx, Ernest -------------------------------------------- Free Webmail courtesy of http://www.444.net/ From garbiner at libero.it Fri Jan 21 09:16:38 2005 From: garbiner at libero.it (Andrea Loddo) Date: Fri, 21 Jan 2005 09:16:38 +0100 Subject: changing stylesheet In-Reply-To: <50584.164.140.159.143.1106210707.squirrel@webmail.theinternetone.net> References: <50584.164.140.159.143.1106210707.squirrel@webmail.theinternetone.net> Message-ID: <67438127.20050121091638@libero.it> Try to include the whole path of the folder that contains "mystyle.css". Bye. Andrea Loddo. Thursday, January 20, 2005, 9:45:07 AM, you wrote: > Hi > What expression should I use in the Stylesheet editor > such that the Webserver will use a locally defined stylesheet? > I tried: > @import "mystyle.css"; > and put this file in the Squeak image directory. > thx, > Ernest > -------------------------------------------- > Free Webmail courtesy of http://www.444.net/ From chris at chrisburkert.de Thu Jan 27 18:31:30 2005 From: chris at chrisburkert.de (Chris Burkert) Date: Thu, 27 Jan 2005 18:31:30 +0100 Subject: [SW1][Squeak] Resources (was: File uploat problems) In-Reply-To: References: Message-ID: <41F92572.7060102@chrisburkert.de> Brent Pinkney wrote: > I really need to know how to upload files to SmallWiki. > > I edited a page to create a resouce and then use the SWResouceEdit page > to choose a file (d:\temp\tbms.txt) and do not check the embedded > option. This this the appears in my Squeak explorer with a byte array > containing the file contents. This looks ok. > > However if I clock on the link to (view/download the resouce) I return > to the SWResourceEdit page, but the fields are empty. > > The issue appears to be in > > SWResource class>>defaultViewAction > ^SWResourceEdit > ! > > How does one download a resource ? Did you try another URL in your browser: http://url/To/Your/Resource?action=SWMimeView You can change the method to: SWResource class>>defaultViewAction ^SWMimeView I don't know if this is a bug or a feature?!? How does the VW Version behave (unfortunatly VW currently doesn't run on my xorg)? best regards Chris Burkert -- http://www.chrisburkert.de/ From garbiner at libero.it Fri Jan 28 10:09:28 2005 From: garbiner at libero.it (Andrea Loddo) Date: Fri, 28 Jan 2005 10:09:28 +0100 Subject: tests on Action subclass Message-ID: <9310351455.20050128100928@libero.it> Hi, Does anybody know how can I perform tests on a Action subclass responsable of rendering html contents and data managing? I mean, the original idea was to implement a subclass of TestCase but I don't think this would be the best solution. I found out ActionTest class and maybe it would be better to implement an ActionTest subclass! Thanks. Andrea Loddo. mailto:garbiner at libero.it From renggli at iam.unibe.ch Fri Jan 28 12:17:52 2005 From: renggli at iam.unibe.ch (Lukas Renggli) Date: Fri, 28 Jan 2005 12:17:52 +0100 Subject: tests on Action subclass In-Reply-To: <9310351455.20050128100928@libero.it> References: <9310351455.20050128100928@libero.it> Message-ID: <4c4a03e09785b1fee5c3668060e53aec@iam.unibe.ch> Hi Andrea, I don't think that it doesn't make it easier to test your actions if you create a subclass of ActionTests as there are no utility methods in there that could help you. However if you really want to test your actions (I neglected these somehow for most of the action functionality), I would create an abstract subclass of TestCase where you implemented some utility methods to make action-testing more convenient. Hope this helps, Lukas -- Lukas Renggli http://www.lukas-renggli.ch From garbiner at libero.it Fri Jan 28 20:58:31 2005 From: garbiner at libero.it (Andrea Loddo) Date: Fri, 28 Jan 2005 20:58:31 +0100 Subject: tests on Action subclass In-Reply-To: <4c4a03e09785b1fee5c3668060e53aec@iam.unibe.ch> References: <9310351455.20050128100928@libero.it> <4c4a03e09785b1fee5c3668060e53aec@iam.unibe.ch> Message-ID: <1046393137.20050128205831@libero.it> Ok thanks! One more thing: I'd want to download a resource. I added a resource (this resource is present in the server root folder and it is a file) and I created a Visitor instance in order to access to this resource and to collect all the informations about it. Then I need a link in a page that allows users to dowload this resource. I thought that a Template is necessary to render this link in an Action context and the problem is how to implement a TemplateBody subclass responsable of rendering this link to the resource. Thanks a lot. Andrea Loddo. Friday, January 28, 2005, 12:17:52 PM, you wrote: > Hi Andrea, > I don't think that it doesn't make it easier to test your actions if > you create a subclass of ActionTests as there are no utility methods in > there that could help you. > However if you really want to test your actions (I neglected these > somehow for most of the action functionality), I would create an > abstract subclass of TestCase where you implemented some utility > methods to make action-testing more convenient. > Hope this helps, > Lukas