From sebastian_heidbrink at yahoo.de Tue Dec 1 00:39:40 2015 From: sebastian_heidbrink at yahoo.de (Sebastian Heidbrink) Date: Tue Dec 1 00:39:47 2015 Subject: [Seaside] Re: Using Polymer Webcomponents in seaside In-Reply-To: References: Message-ID: <565CEC4C.2080804@yahoo.de> Hi Andy, I use/d Amber and Seaside and there is one particular thing that I never really liked. You still do not feel like writing web content in a comfortable way. Even though development speed pick's up as soon as you have implemented your basic framework and components I always thought it might be more convenient to use the specialized IDEs for HTML, JS and CSS for the first visualization of your proof of concept. Now I stumbled across Polymer and I finally had the impression that one can, just like in Seaside, built small easy to understand components and grow from there. I actually like the separation of JS, HTML and CSS in Polymer as well as the loosely coupling of the application parts via events,.... just like in Smalltalk. BUT! I can not yet imagine on how to debug a complex Polymer application where some components might even be developed by other developers or teams.... This is why I thought,.... PharoJS and Polymer might be a good fit. Unfortunately I was very close to write you anyways that it currently seems to me as if PharoSJ is not really there yet. I understood the concept behind PharoJS but to integrate the needed websocket proxy layer of PharoJS into Polymer is something I still have trouble to wrap my head around. I think Noury or Dave will first have to tell me how they would integrate something like jQuery into PharoJS in order to enable me to take what I already have and finish the Polymer parts missing. One might be able to use Polymer right now, but the resulting JS code would not be comparable to the one used in the Polymer documentation and that does not really make sense to me. One would implement PharoJS Code that accesses/manipulates an existing polymer object based on http://polymer.github.io/polymer/ Polymer.Base and not just provide a json specification as a configuration for a Polymer constructor. I am not sure yet if PharoJS is the right thing for me. I still feel like writing Amber or Seaside code but this time against a wall of proxy objects (document, window, WebSocket, ... ). I, again, need to know and learn the api of those first class objects and their particular behaviors... But if you would like to implement pure logic, independent from third party libraries then PharoJS is alreay providing a lot to accomplish that. The only thing that needs more attention is the layer that takes care of the proxy and web socket live cycles. I have to restart my image too often to have a working JbBridge again... What did you try so far? Sebastian On 2015-11-30 8:47 AM, Andy Burnett wrote: > >>> Sebastian Heidbrink said > > Hi Andy, > > I actually just started to write a little PolymerWorkbench as a > proof-of-concept to integrate Glamour, PharoJS and Polymer. I have no > idea if that will work at all yet, since I have only little PharoJS > experience so far. Seaside is no target of mine. I parse the web > component definition files and will edit CSS and HTML directly. > Eventhandling and script generation shall be done via PharoJS. I think > this could open the PharoIDE to the web dev world if successful. > > My impression on Polymer is the same as yours. > I have the impression that Polymer finally adds some software > engineering level sanity to the JS web world... > I'll let you know once I will have made sources available. > > <<< > > That sounds very interesting indeed. I have just started playing with > PharoJS. So, I am keen to learn about your experience. > > Cheers > Andy > > > _______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20151130/ffbad1b4/attachment.htm From maarten.mostert at wanadoo.fr Tue Dec 1 08:04:54 2015 From: maarten.mostert at wanadoo.fr (Maarten Mostert) Date: Tue Dec 1 08:04:58 2015 Subject: [Seaside] Using Polymer Webcomponents in seaside In-Reply-To: <565CEC4C.2080804@yahoo.de> References: <565CEC4C.2080804@yahoo.de> Message-ID: He Guys If you?re like me and never managed to really understand seaside, you should have a look at Cincoms AppeX, which really makes a gr??t difference in writing web applications the natural way if that is the bottom line of your concern. In AppeX, you only need to know two things, smalltalk and javascript, you write the later directly (with syntax control) in the smalltalk IDE which makes for a real diff?rence. Personally I write on top of jQuery, Bootstrap, Stripe and numerous additional plugins. My only problems remain in really understanding javascript and jquery. Regards, Maarten MOSTERT 28 Av Alphonse Denis 83400 Hy?res, France +33 676411296 https://stakepoint.com/ > Le 1 d?c. 2015 ? 01:39, Sebastian Heidbrink a ?crit : > > Hi Andy, > > I use/d Amber and Seaside and there is one particular thing that I never really liked. > You still do not feel like writing web content in a comfortable way. Even though development speed pick's up as soon as you have implemented your basic framework and components I always thought it might be more convenient to use the specialized IDEs for HTML, JS and CSS for the first visualization of your proof of concept. > > Now I stumbled across Polymer and I finally had the impression that one can, just like in Seaside, built small easy to understand components and grow from there. I actually like the separation of JS, HTML and CSS in Polymer as well as the loosely coupling of the application parts via events,.... just like in Smalltalk. > BUT! I can not yet imagine on how to debug a complex Polymer application where some components might even be developed by other developers or teams.... > > This is why I thought,.... PharoJS and Polymer might be a good fit. > Unfortunately I was very close to write you anyways that it currently seems to me as if PharoSJ is not really there yet. I understood the concept behind PharoJS but to integrate the needed websocket proxy layer of PharoJS into Polymer is something I still have trouble to wrap my head around. > I think Noury or Dave will first have to tell me how they would integrate something like jQuery into PharoJS in order to enable me to take what I already have and finish the Polymer parts missing. > One might be able to use Polymer right now, but the resulting JS code would not be comparable to the one used in the Polymer documentation and that does not really make sense to me. One would implement PharoJS Code that accesses/manipulates an existing polymer object based on http://polymer.github.io/polymer/ Polymer.Base and not just provide a json specification as a configuration for a Polymer constructor. > > I am not sure yet if PharoJS is the right thing for me. I still feel like writing Amber or Seaside code but this time against a wall of proxy objects (document, window, WebSocket, ... ). I, again, need to know and learn the api of those first class objects and their particular behaviors... > But if you would like to implement pure logic, independent from third party libraries then PharoJS is alreay providing a lot to accomplish that. > > The only thing that needs more attention is the layer that takes care of the proxy and web socket live cycles. I have to restart my image too often to have a working JbBridge again... > > What did you try so far? > Sebastian > > > > On 2015-11-30 8:47 AM, Andy Burnett wrote: >> >>> Sebastian Heidbrink said >> >> Hi Andy, >> >> I actually just started to write a little PolymerWorkbench as a >> proof-of-concept to integrate Glamour, PharoJS and Polymer. I have no >> idea if that will work at all yet, since I have only little PharoJS >> experience so far. Seaside is no target of mine. I parse the web >> component definition files and will edit CSS and HTML directly. >> Eventhandling and script generation shall be done via PharoJS. I think >> this could open the PharoIDE to the web dev world if successful. >> >> My impression on Polymer is the same as yours. >> I have the impression that Polymer finally adds some software >> engineering level sanity to the JS web world... >> I'll let you know once I will have made sources available. >> >> <<< >> >> That sounds very interesting indeed. I have just started playing with PharoJS. So, I am keen to learn about your experience. >> >> Cheers >> Andy >> >> >> _______________________________________________ >> seaside mailing list >> seaside@lists.squeakfoundation.org >> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > _______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20151201/3db10883/attachment-0001.htm From johan at inceptive.be Tue Dec 1 08:43:19 2015 From: johan at inceptive.be (Johan Brichau) Date: Tue Dec 1 08:43:21 2015 Subject: [Seaside] Using Polymer Webcomponents in seaside In-Reply-To: References: <565CEC4C.2080804@yahoo.de> Message-ID: <2970F295-27D6-489B-B455-2DED36BD77B6@inceptive.be> Hey guys, Web components are a perfect fit for Seaside. It does not even have to be changed to start using them. At it?s core, Seaside is an extensible framework and adding new (html) tags is a core extensible feature. Take a look at the Bootstrap extension, for example. For the implementation of the web component itself, I don?t see why you would want/need to use Seaside. It?s all javascript that needs to execute in the browser and therefore best implemented using tools for that. This means you can easily still generate the entire page using Seaside (if you want server-side rendering) and include the web components implementation.We did exactly this in a couple of cases to reduce the size of the generated page: we included custom html elements in the Seaside-rendered page and included the js implementation of the corresponding web components. In any case, too bad to hear Seaside did not work out for you. It?s a given fact that Seaside is not the answer to all web development tasks. Use the right tool for the right job is a healthy That being said, it would be beneficial if more people try to add onto (or integrate with) Seaside rather than implement something completely new. For example, take a look at how the ruby-on-rails community has added onto their (server-side rendering) framework. We (Yesplan) use Seaside for all server-side rendered components and are having a blast using it. We are also using javascript frameworks like knockoutjs, d3js, datatables and react. But we don?t try to work with them from a Smalltalk IDE, nor do we think we can develop for those without really understanding javascript and jquery. cheers, Johan > On 01 Dec 2015, at 09:04, Maarten Mostert wrote: > > He Guys If you?re like me and never managed to really understand seaside, you should have a look at Cincoms AppeX, which really makes a gr??t difference in writing web applications the natural way if that is the bottom line of your concern. > In AppeX, you only need to know two things, smalltalk and javascript, you write the later directly (with syntax control) in the smalltalk IDE which makes for a real diff?rence. Personally I write on top of jQuery, Bootstrap, Stripe and numerous additional plugins. My only problems remain in really understanding javascript and jquery. > > Regards, > > Maarten MOSTERT > > > > 28 Av Alphonse Denis > 83400 Hy?res, France > +33 676411296 > https://stakepoint.com/ > > > > > > > >> Le 1 d?c. 2015 ? 01:39, Sebastian Heidbrink > a ?crit : >> >> Hi Andy, >> >> I use/d Amber and Seaside and there is one particular thing that I never really liked. >> You still do not feel like writing web content in a comfortable way. Even though development speed pick's up as soon as you have implemented your basic framework and components I always thought it might be more convenient to use the specialized IDEs for HTML, JS and CSS for the first visualization of your proof of concept. >> >> Now I stumbled across Polymer and I finally had the impression that one can, just like in Seaside, built small easy to understand components and grow from there. I actually like the separation of JS, HTML and CSS in Polymer as well as the loosely coupling of the application parts via events,.... just like in Smalltalk. >> BUT! I can not yet imagine on how to debug a complex Polymer application where some components might even be developed by other developers or teams.... >> >> This is why I thought,.... PharoJS and Polymer might be a good fit. >> Unfortunately I was very close to write you anyways that it currently seems to me as if PharoSJ is not really there yet. I understood the concept behind PharoJS but to integrate the needed websocket proxy layer of PharoJS into Polymer is something I still have trouble to wrap my head around. >> I think Noury or Dave will first have to tell me how they would integrate something like jQuery into PharoJS in order to enable me to take what I already have and finish the Polymer parts missing. >> One might be able to use Polymer right now, but the resulting JS code would not be comparable to the one used in the Polymer documentation and that does not really make sense to me. One would implement PharoJS Code that accesses/manipulates an existing polymer object based on http://polymer.github.io/polymer/ Polymer.Base and not just provide a json specification as a configuration for a Polymer constructor. >> >> I am not sure yet if PharoJS is the right thing for me. I still feel like writing Amber or Seaside code but this time against a wall of proxy objects (document, window, WebSocket, ... ). I, again, need to know and learn the api of those first class objects and their particular behaviors... >> But if you would like to implement pure logic, independent from third party libraries then PharoJS is alreay providing a lot to accomplish that. >> >> The only thing that needs more attention is the layer that takes care of the proxy and web socket live cycles. I have to restart my image too often to have a working JbBridge again... >> >> What did you try so far? >> Sebastian >> >> >> >> On 2015-11-30 8:47 AM, Andy Burnett wrote: >>> >>> Sebastian Heidbrink said >>> >>> Hi Andy, >>> >>> I actually just started to write a little PolymerWorkbench as a >>> proof-of-concept to integrate Glamour, PharoJS and Polymer. I have no >>> idea if that will work at all yet, since I have only little PharoJS >>> experience so far. Seaside is no target of mine. I parse the web >>> component definition files and will edit CSS and HTML directly. >>> Eventhandling and script generation shall be done via PharoJS. I think >>> this could open the PharoIDE to the web dev world if successful. >>> >>> My impression on Polymer is the same as yours. >>> I have the impression that Polymer finally adds some software >>> engineering level sanity to the JS web world... >>> I'll let you know once I will have made sources available. >>> >>> <<< >>> >>> That sounds very interesting indeed. I have just started playing with PharoJS. So, I am keen to learn about your experience. >>> >>> Cheers >>> Andy >>> >>> >>> _______________________________________________ >>> seaside mailing list >>> seaside@lists.squeakfoundation.org >>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside >> >> _______________________________________________ >> seaside mailing list >> seaside@lists.squeakfoundation.org >> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > _______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20151201/a5499f81/attachment.htm From bsselfridge at gmail.com Tue Dec 1 13:38:13 2015 From: bsselfridge at gmail.com (bsselfridge@gmail.com) Date: Tue Dec 1 13:54:33 2015 Subject: [Seaside] Re: Using Polymer Webcomponents in seaside In-Reply-To: <2970F295-27D6-489B-B455-2DED36BD77B6@inceptive.be> References: <565CEC4C.2080804@yahoo.de> <2970F295-27D6-489B-B455-2DED36BD77B6@inceptive.be> Message-ID: <1448977093276-4864538.post@n4.nabble.com> Would Polymer fit better in Amber rather than PharoJS? ----- Brad Selfridge -- View this message in context: http://forum.world.st/Re-Using-Polymer-Webcomponents-in-seaside-tp4864427p4864538.html Sent from the Seaside General mailing list archive at Nabble.com. From sebastian_heidbrink at yahoo.de Tue Dec 1 15:25:09 2015 From: sebastian_heidbrink at yahoo.de (Sebastian Heidbrink) Date: Tue Dec 1 15:25:19 2015 Subject: [Bulk] [Seaside] Re: Using Polymer Webcomponents in seaside In-Reply-To: <1448977093276-4864538.post@n4.nabble.com> References: <565CEC4C.2080804@yahoo.de> <2970F295-27D6-489B-B455-2DED36BD77B6@inceptive.be> <1448977093276-4864538.post@n4.nabble.com> Message-ID: <565DBBD5.4060903@yahoo.de> I do not think that that makes any difference. I once tried to integrate Amber with RiverTrail and there was no way to get access to the Amber context within RiverTrail and vice versa. At least at that time.... Amber has a great environment to maintain all the prerequisites of your application. The whole installation and maintenance bundle that Herby setup is really sophisticated and takes a lot of JS burden from the Smalltalk developer. PharoJS has nothing like that to offer, yet. On 2015-12-01 5:38 AM, bsselfridge@gmail.com wrote: > Would Polymer fit better in Amber rather than PharoJS? > > > > > > ----- > Brad Selfridge > -- > View this message in context: http://forum.world.st/Re-Using-Polymer-Webcomponents-in-seaside-tp4864427p4864538.html > Sent from the Seaside General mailing list archive at Nabble.com. > _______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > From andy.burnett at knowinnovation.com Tue Dec 1 17:00:23 2015 From: andy.burnett at knowinnovation.com (Andy Burnett) Date: Tue Dec 1 17:00:30 2015 Subject: [Seaside] Re: Using Polymer Webcomponents in seaside In-Reply-To: <565dbbec.49698c0a.bd6c3.02feSMTPIN_ADDED_MISSING@mx.google.com> References: <565dbbec.49698c0a.bd6c3.02feSMTPIN_ADDED_MISSING@mx.google.com> Message-ID: <888BE13A-EC5E-4CDE-B09F-89343F3218C2@knowinnovation.com> >>> Johan Brichau said Hey guys, Web components are a perfect fit for Seaside. It does not even have to be changed to start using them. At it?s core, Seaside is an extensible framework and adding new (html) tags is a core extensible feature. Take a look at the Bootstrap extension, for example. For the implementation of the web component itself, I don?t see why you would want/need to use Seaside. It?s all javascript that needs to execute in the browser and therefore best implemented using tools for that. This means you can easily still generate the entire page using Seaside (if you want server-side rendering) and include the web components implementation.We did exactly this in a couple of cases to reduce the size of the generated page: we included custom html elements in the Seaside-rendered page and included the js implementation of the corresponding web components. SNIP <<< That's great to know. I had hoped it would be easy to do. Could you give an example of how you might get the selected value from eg a polymer date picker? I want to get a sense of the basic plumbing - btw my seaside experience is very limited. Cheers Andy From johan at inceptive.be Wed Dec 2 08:07:21 2015 From: johan at inceptive.be (Johan Brichau) Date: Wed Dec 2 08:07:25 2015 Subject: [Seaside] Using Polymer Webcomponents in seaside In-Reply-To: <888BE13A-EC5E-4CDE-B09F-89343F3218C2@knowinnovation.com> References: <565dbbec.49698c0a.bd6c3.02feSMTPIN_ADDED_MISSING@mx.google.com> <888BE13A-EC5E-4CDE-B09F-89343F3218C2@knowinnovation.com> Message-ID: > On 01 Dec 2015, at 18:00, Andy Burnett wrote: > > Could you give an example of how you might get the selected value from eg a polymer date picker? I want to get a sense of the basic plumbing - btw my seaside experience is very limited. Good point. It requires knowledge on how to work with JavaScript from Seaside. The cases we worked with an x-tags web component, we used event delegation and event handlers that make a request back to server. There are probably other ways, so I will take a look and try to create an example. Johan -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20151202/c2bbcb96/attachment.htm From sven at stfx.eu Wed Dec 2 08:18:28 2015 From: sven at stfx.eu (Sven Van Caekenberghe) Date: Wed Dec 2 08:18:32 2015 Subject: [Seaside] Using Polymer Webcomponents in seaside In-Reply-To: References: <565dbbec.49698c0a.bd6c3.02feSMTPIN_ADDED_MISSING@mx.google.com> <888BE13A-EC5E-4CDE-B09F-89343F3218C2@knowinnovation.com> Message-ID: <4ED9F41C-C724-42ED-8CA2-091A3B525698@stfx.eu> There is really a great need for extra documentation so that mere mortals can learn how to work with all the JavaScript magic in Seaside. A lot is possible, but it is very hard to figure it out just by browsing (in Smalltalk). There has to be a real document with a high level outline, best practices, guidelines, examples, tutorials - along the lines of the Seaside book. > On 02 Dec 2015, at 09:07, Johan Brichau wrote: > > >> On 01 Dec 2015, at 18:00, Andy Burnett wrote: >> >> Could you give an example of how you might get the selected value from eg a polymer date picker? I want to get a sense of the basic plumbing - btw my seaside experience is very limited. > > Good point. > It requires knowledge on how to work with JavaScript from Seaside. > The cases we worked with an x-tags web component, we used event delegation and event handlers that make a request back to server. There are probably other ways, so I will take a look and try to create an example. > > Johan > _______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside From olivier.auverlot at gmail.com Thu Dec 3 08:32:19 2015 From: olivier.auverlot at gmail.com (olivier auverlot) Date: Thu Dec 3 08:32:21 2015 Subject: [Seaside] Material Design Lite Message-ID: Hi, Kevin and me have worked this summer on a port of Material Design Lite for Seaside. It's a work in progress but we think that someone could be interested to use and improve our work. http://www.getmdl.io/ http://smalltalkhub.com/#!/~KevinLanvin/MaterialDesignLite Best regards Olivier -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20151203/7f787634/attachment.htm From marianopeck at gmail.com Thu Dec 3 23:34:57 2015 From: marianopeck at gmail.com (Mariano Martinez Peck) Date: Thu Dec 3 23:34:59 2015 Subject: [Seaside] Hook "WACurrentRequestContext" into debugger? Message-ID: Hi guys, This thing I will ask in this email it's in my mind since YEARS. But I have always thought it was like that and that there was nothing we could do. However, I think it's time I ask again :) For those that have used Seaside, and you try to debug, you know that upon request processing seaside uses Exceptions mechanisim to always have access to the request, session, etc. They way that is done is very smart :) WACurrentRequestContext use: self during: aBlock In that case, "self" is the request instance and aBlock the closure that takes care of the request processing. So, inside that closure, everywhere you do "WACurrentRequestContext value" you get the correct request instance. So..that's great for Seaside, but debugging gets complicated. While you can restart, proceed, etc, once inside debugger, you cannot evaluate any piece of code that will use the session or request because you get a WARequestContextNotFound. Of course, because I guess the evaluation you do from cmd+d on a piece of text or via the debugger inspector, creates another closure/context which does not receive the WACurrentRequestContext instance. Now....besides WACurrentRequestContext I have my own class UserContextInformation where I basically have a bunch of stuff associated to the logged user. And I do exactly the same as the WACurrentRequestContext. And I have the same problem. I really want to be able to fix this. Anyone have an idea on how can I do it? I guess I can change the debugger, in the place where I evaluate code so that I wrap that evaluation with my request context instance??? Thoughts? -- Mariano http://marianopeck.wordpress.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20151203/9cfea791/attachment.htm From marianopeck at gmail.com Fri Dec 4 16:11:02 2015 From: marianopeck at gmail.com (Mariano Martinez Peck) Date: Fri Dec 4 16:11:04 2015 Subject: [Seaside] Re: [Pharo-dev] Hook "WACurrentRequestContext" into debugger? In-Reply-To: References: <39F3DFB6-0496-48D7-A99B-C5BC4BC99785@gmail.com> Message-ID: I found a way!!!! Much cleaner and easier. Awesome! I will clean it, test it a bit more and try to package it for public usage :) On Fri, Dec 4, 2015 at 12:31 PM, Mariano Martinez Peck < marianopeck@gmail.com> wrote: > > > On Fri, Dec 4, 2015 at 12:05 PM, Max Leske wrote: > >> >> On 04 Dec 2015, at 14:29, Mariano Martinez Peck >> wrote: >> >> Max...Seaside uses WADynamicVariable (NOT DynamicVariable) which >> are completely different. WADynamicVariable uses exception mechanism >> while DynamicVariable uses the ProcessSpecificVariable. >> But thanks anyway! >> >> >> Oh man?. Sorry :) >> >> I wonder, why WADynamicVariable *isn?t* a DynamicVariable. The semantics >> are the same if I?m not mistaken (e.g. only available in the current >> process) and I think access to a dynamic variable may even be faster >> because it *doesn?t* use the exception mechanism (i.e. no need to walk down >> the stack). >> If someone knows the answer, I?d be happy to hear it. >> >> > I bet it's because of portability. For example, i remember in GemStone the > ProcessorLocalVariable did not behave the same as in Pharo. And it was > actually an experiment. I think you cannot expect all this stuff to be ansi > (or easily portable), while exceptions do. > > >> I?ve played around with Process>>signalException: and >> Context>>handleSignal: (which looked quite promising) but didn?t get any >> results. I?m out of ideas. >> >> > I have played all morning with an idea of using local variables. I arrive > to the point where I DO HAVE the request context at hand, but I don't find > an easy way to hook into do-its, print-it etc so that the closure evaluated > gets the request context plugged. In other ways... let's say I have the > context stored somewhere. I am at the SmalltalkEditor >> > evaluateSelectionAndDo: aBlock > > and so..somewhere I need to do something like: > > WACurrentRequestContext use: self storedContextSomewhere during: [ self > theSelectionToBeEvaluated ] > > and that's where I am now :) > > > > >> Cheers, >> Max >> >> >> On Fri, Dec 4, 2015 at 7:32 AM, Max Leske wrote: >> >>> Here?s a snippet to play with: >>> >>> p := Processor activeProcess. >>> x := 2. >>> v := TestDynamicVariable value: x during: [ >>> ((p instVarNamed: 'env') ifNotNil: [ :env| >>> env copyWithout: nil ]) inspect >>> ]. >>> >>> ((p instVarNamed: 'env') ifNotNil: [ :env| >>> env copyWithout: nil ]) inspect >>> >>> Cheers, >>> Max >>> >>> On 04 Dec 2015, at 10:47, Max Leske wrote: >>> >>> I feel you :) >>> >>> Without having thought this through completely: if you look at the >>> implementation of DynamicVariable>>value:during: you?ll see that the way it >>> works is that the variable is bound to the active process. In the debugger >>> you have access to the process that is being debugged and thus you should >>> have access to the variables bound to it. You could try accessing all such >>> variables by iterating over them (which I think will require an extension >>> on Process because you?d need to access at least the PSKeys class variable). >>> >>> Cheers, >>> Max >>> >>> On 04 Dec 2015, at 00:34, Mariano Martinez Peck >>> wrote: >>> >>> Hi guys, >>> >>> This thing I will ask in this email it's in my mind since YEARS. But I >>> have always thought it was like that and that there was nothing we could >>> do. However, I think it's time I ask again :) >>> >>> For those that have used Seaside, and you try to debug, you know that >>> upon request processing seaside uses Exceptions mechanisim to always have >>> access to the request, session, etc. They way that is done is very smart :) >>> >>> WACurrentRequestContext use: self during: aBlock >>> >>> In that case, "self" is the request instance and aBlock the closure that >>> takes care of the request processing. So, inside that closure, everywhere >>> you do "WACurrentRequestContext value" you get the correct request instance. >>> >>> So..that's great for Seaside, but debugging gets complicated. While you >>> can restart, proceed, etc, once inside debugger, you cannot evaluate any >>> piece of code that will use the session or request because you get >>> a WARequestContextNotFound. Of course, because I guess the evaluation you >>> do from cmd+d on a piece of text or via the debugger inspector, creates >>> another closure/context which does not receive the WACurrentRequestContext >>> instance. >>> >>> Now....besides WACurrentRequestContext I have my own class >>> UserContextInformation where I basically have a bunch of stuff associated >>> to the logged user. And I do exactly the same as the >>> WACurrentRequestContext. And I have the same problem. I really want to be >>> able to fix this. >>> >>> Anyone have an idea on how can I do it? I guess I can change the >>> debugger, in the place where I evaluate code so that I wrap that evaluation >>> with my request context instance??? >>> >>> Thoughts? >>> >>> >>> -- >>> Mariano >>> http://marianopeck.wordpress.com >>> >>> >>> >>> >> >> >> -- >> Mariano >> http://marianopeck.wordpress.com >> >> >> > > > -- > Mariano > http://marianopeck.wordpress.com > -- Mariano http://marianopeck.wordpress.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20151204/31b344d1/attachment-0001.htm From self at je77.com Fri Dec 4 17:05:49 2015 From: self at je77.com (J.F. Rick) Date: Fri Dec 4 17:14:09 2015 Subject: [Seaside] Split form Message-ID: Hi, I'm creating a web interface using seaside that's a bit complicated. One particular annoying part is that I have to use multiple forms: (1) Form 1 contains some fields (2) Form 2 is used for uploading images asynchronously (3) Form 3 contains more fields that really belong to Form 1. Because of layout and because forms can't be within other forms, I have to have both Form 1 and 3, though really they should be the same form that uses one submit button. Is there a good way to combine the forms in such a way that the callbacks for both forms are evaluated? I did notice that the _k are identical for both forms. Cheers, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20151204/f6fe815a/attachment.htm From iwan at reahl.org Sat Dec 5 06:33:52 2015 From: iwan at reahl.org (Iwan Vosloo) Date: Sat Dec 5 06:33:58 2015 Subject: [Seaside] Split form In-Reply-To: References: Message-ID: <56628550.8020403@reahl.org> Hi Jeff, On 04/12/2015 19:05, J.F. Rick wrote: > I'm creating a web interface using seaside that's a bit complicated. > One particular annoying part is that I have to use multiple forms: > (1) Form 1 contains some fields > (2) Form 2 is used for uploading images asynchronously > (3) Form 3 contains more fields that really belong to Form 1. > Because of layout and because forms can't be within other forms, I > have to have both Form 1 and 3, though really they should be the same > form that uses one submit button. Is there a good way to combine the > forms in such a way that the callbacks for both forms are evaluated? > In another non-seaside world I have nested forms using the new html5 form= attribute on inputs: https://developer.mozilla.org/en/docs/Web/HTML/Element/Input#attr-form So you could have HTML like:
I have not tried to do this in seaside, but can't think offhand why it would not work... -Iwan -- Reahl, the Python only web framework: http://www.reahl.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20151205/0d36d069/attachment.htm From marianopeck at gmail.com Sun Dec 6 00:11:50 2015 From: marianopeck at gmail.com (Mariano Martinez Peck) Date: Sun Dec 6 00:11:52 2015 Subject: [Seaside] Split form In-Reply-To: References: Message-ID: Hi Jeff, I hope I am correct with what I say, but I am not 100% sure. I think you can use Ajax for this. Since you serialize the form you won't need a HTML form tag at all. That is, no need of HTML form (unless it does not harm if you want it as for displaying/css things), and instead of using submit buttons, you use normal buttons with ajax calls and serialization. Example: html button bePush; onClick: (html jQuery ajax serialize: (html jQuery: '.formToSubmit' ) script: [ :s | self doSomething. ] ); value: 'Click me'. The basis here is: 1) use bePush because you are using Ajax and so buttons do NOT have to be submit. 2) The magic here is #serialize: which will serialize and invoke callbacks for those inputs. And the good thing is that it accepts a jQuery as the argument of what to serialize. So you can say, for example, all those elements with css class '.formToSubmit'. And then, when you render forms 1 and 3, you add css class 'formToSubmit'. If the component is very very large, you can reduce the jquery search for performance (like checking those elements form AND css class formToSubmit etc...). 3) Note that since this is ajax, you could have a couple of headaches. For example, doing an #answer: from within the #script: of the ajax call is not easy. Also, if you are used to normal request, you would re-render everything automatically. Here, unless you do something inside #script: it won't refresh anything. So depending on what you need to you may need to refresh something from there. If you are used to Ajax this will be very very easy. If you need more help, let me know. On Fri, Dec 4, 2015 at 2:05 PM, J.F. Rick wrote: > Hi, > > I'm creating a web interface using seaside that's a bit complicated. One > particular annoying part is that I have to use multiple forms: > (1) Form 1 contains some fields > (2) Form 2 is used for uploading images asynchronously > (3) Form 3 contains more fields that really belong to Form 1. > Because of layout and because forms can't be within other forms, I have to > have both Form 1 and 3, though really they should be the same form that > uses one submit button. Is there a good way to combine the forms in such a > way that the callbacks for both forms are evaluated? > > I did notice that the _k are identical for both forms. > > Cheers, > > Jeff > > _______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > -- Mariano http://marianopeck.wordpress.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20151205/4e011f77/attachment.htm From hilaire at drgeo.eu Sun Dec 6 09:09:17 2015 From: hilaire at drgeo.eu (Hilaire) Date: Sun Dec 6 09:09:28 2015 Subject: [Seaside] Nonfunctional datalist example Message-ID: Hello, The datalist example in the class WAHtml5InputText is incomplete: The code at the end of its method renderContentOn: could be corrected as follow: html tableRow: [ html tableHeading: [ html label: 'datalist' ]. html tableData: [ html textInput listId: 'datalist'. html datalist id: 'datalist'; with: [ html option: 'HTML2'. html option: 'HTML3'. html option: 'HTML4'. html option: 'HTML5'. html option disabled: true; with: 'XHTML' ] ] ] ]. -- Dr. Geo http://drgeo.eu http://google.com/+DrgeoEu From johan at inceptive.be Sun Dec 6 09:22:13 2015 From: johan at inceptive.be (Johan Brichau) Date: Sun Dec 6 09:22:13 2015 Subject: [Seaside] Nonfunctional datalist example In-Reply-To: References: Message-ID: <0FCFB26D-8965-4CFD-BCDB-EC564541E2FB@inceptive.be> Hilaire, Thank you for spotting that. Fixed it in 3.2.0 (see commit below). cheers Johan Name: Seaside-Tests-Functional-JohanBrichau.167 Author: JohanBrichau Time: 6 December 2015, 10:21:27.104394 am UUID: f7295892-03d6-4d1d-b391-88cd9ae1c355 Ancestors: Seaside-Tests-Functional-pmm.166 > On 06 Dec 2015, at 10:09, Hilaire wrote: > > Hello, > > The datalist example in the class WAHtml5InputText is incomplete: > > The code at the end of its method renderContentOn: could be corrected as > follow: > > > html tableRow: [ > > html tableHeading: [ html label: 'datalist' ]. > > html tableData: [ > > html textInput listId: 'datalist'. > > html datalist id: 'datalist'; with: [ > > html option: 'HTML2'. > > html option: 'HTML3'. > > html option: 'HTML4'. > > html option: 'HTML5'. > > html option disabled: true; with: 'XHTML' ] ] ] ]. > > -- > Dr. Geo > http://drgeo.eu > http://google.com/+DrgeoEu > > > _______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside From hilaire at drgeo.eu Sun Dec 6 10:12:58 2015 From: hilaire at drgeo.eu (Hilaire) Date: Sun Dec 6 10:13:16 2015 Subject: [Seaside] Re: Nonfunctional datalist example In-Reply-To: <0FCFB26D-8965-4CFD-BCDB-EC564541E2FB@inceptive.be> References: <0FCFB26D-8965-4CFD-BCDB-EC564541E2FB@inceptive.be> Message-ID: I have a doubt, according to the spec. it should be written[1] as: html option value: 'HTML2'. ... [1] http://www.w3.org/TR/html5/forms.html#the-datalist-element Le 06/12/2015 10:22, Johan Brichau a ?crit : > Hilaire, > > Thank you for spotting that. Fixed it in 3.2.0 (see commit below). > > cheers > Johan > > Name: Seaside-Tests-Functional-JohanBrichau.167 > Author: JohanBrichau > Time: 6 December 2015, 10:21:27.104394 am > UUID: f7295892-03d6-4d1d-b391-88cd9ae1c355 > Ancestors: Seaside-Tests-Functional-pmm.166 > >> On 06 Dec 2015, at 10:09, Hilaire wrote: >> >> Hello, >> >> The datalist example in the class WAHtml5InputText is incomplete: >> >> The code at the end of its method renderContentOn: could be corrected as >> follow: >> >> >> html tableRow: [ >> >> html tableHeading: [ html label: 'datalist' ]. >> >> html tableData: [ >> >> html textInput listId: 'datalist'. >> >> html datalist id: 'datalist'; with: [ >> >> html option: 'HTML2'. >> >> html option: 'HTML3'. >> >> html option: 'HTML4'. >> >> html option: 'HTML5'. >> >> html option disabled: true; with: 'XHTML' ] ] ] ]. >> >> -- >> Dr. Geo >> http://drgeo.eu >> http://google.com/+DrgeoEu >> >> >> _______________________________________________ >> seaside mailing list >> seaside@lists.squeakfoundation.org >> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside -- Dr. Geo http://drgeo.eu http://google.com/+DrgeoEu From johan at inceptive.be Sun Dec 6 10:33:05 2015 From: johan at inceptive.be (Johan Brichau) Date: Sun Dec 6 10:33:04 2015 Subject: [Seaside] Re: Nonfunctional datalist example In-Reply-To: References: <0FCFB26D-8965-4CFD-BCDB-EC564541E2FB@inceptive.be> Message-ID: You?re right. I adapted the example to follow the spec. > On 06 Dec 2015, at 11:12, Hilaire wrote: > > I have a doubt, according to the spec. it should be written[1] as: > > html option value: 'HTML2'. > ... > > [1] http://www.w3.org/TR/html5/forms.html#the-datalist-element > > Le 06/12/2015 10:22, Johan Brichau a ?crit : >> Hilaire, >> >> Thank you for spotting that. Fixed it in 3.2.0 (see commit below). >> >> cheers >> Johan >> >> Name: Seaside-Tests-Functional-JohanBrichau.167 >> Author: JohanBrichau >> Time: 6 December 2015, 10:21:27.104394 am >> UUID: f7295892-03d6-4d1d-b391-88cd9ae1c355 >> Ancestors: Seaside-Tests-Functional-pmm.166 >> >>> On 06 Dec 2015, at 10:09, Hilaire wrote: >>> >>> Hello, >>> >>> The datalist example in the class WAHtml5InputText is incomplete: >>> >>> The code at the end of its method renderContentOn: could be corrected as >>> follow: >>> >>> >>> html tableRow: [ >>> >>> html tableHeading: [ html label: 'datalist' ]. >>> >>> html tableData: [ >>> >>> html textInput listId: 'datalist'. >>> >>> html datalist id: 'datalist'; with: [ >>> >>> html option: 'HTML2'. >>> >>> html option: 'HTML3'. >>> >>> html option: 'HTML4'. >>> >>> html option: 'HTML5'. >>> >>> html option disabled: true; with: 'XHTML' ] ] ] ]. >>> >>> -- >>> Dr. Geo >>> http://drgeo.eu >>> http://google.com/+DrgeoEu >>> >>> >>> _______________________________________________ >>> seaside mailing list >>> seaside@lists.squeakfoundation.org >>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > > -- > Dr. Geo > http://drgeo.eu > http://google.com/+DrgeoEu > > > _______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside From marianopeck at gmail.com Mon Dec 7 18:36:41 2015 From: marianopeck at gmail.com (Mariano Martinez Peck) Date: Mon Dec 7 18:36:43 2015 Subject: [Seaside] [ANN]: WADynamicVariablesErrorHandler (let me know if I should integrate this) Message-ID: Dear all, For those that have used Seaside, and you try to debug with the Debugger, you know that upon request processing seaside uses Exceptions mechanism to always have access to the current request, error handler, etc. The way that this is done is via subclasses of WADynamicVariable: WACurrentRequestContext use: self during: aBlock In that case, "self" is the request instance and "aBlock" the closure that takes care of the request processing. So, inside that closure, everywhere you do "WACurrentRequestContext value" you get the correct request instance. Once inside the debugger, things get complicated. While you can restart, proceed, etc (because the process you are debugging is inside the scope of the dynamic variables), you cannot evaluate any piece of code that at the end use the session or request because you get a WARequestContextNotFound kind of error. The reason is obvious: The evaluation, do-it, print-it, etc etc you on a piece of text or via the debugger inspector, creates another closure/context which is not in the scope of the dynamic variables. For a client, we also have custom subclasses of WADynamicVariable, for example UserContextInformation. And that means that almost every time in the debugger I really need access to that object. To solve that issue, I create a project which is actually a proof of concept: Check package SeasidePharoDebugging from http://smalltalkhub.com/#!/~marianopeck/MarianoPublic It does work for me, and if you think this could be useful for Seaside itself, I can commit it there. The idea is very simple. I have a WADynamicVariablesErrorHandler subclass of WADebugErrorHandler. We reimplements there #handleException: in order to simply iterate all values of all dynamic variables (all WADynamicVaraible subclasses) and store those into a dictionary in a class variable of WADynamicVariablesErrorHandler. Then, I simply override (this is the part that must be cleared if we integrate this in Seaside) WADynamicVarible >> #defaultAction to be something like this: WADynamicVarible >> #defaultAction ^ (WADynamicVariablesErrorHandler storedDynamicVariable: self class) ifNil: [ self class defaultValue ] That way... when we handle an exception, we save out all values into a class side. And then, in the debugger, whenever we evaluate, inspect, print etc anything that would do a #value over a WADynamicVariable subclass, it ends up calling #defaultAction (because there will be no handler in the stack) and there, we first check if the have the value for that dynamic variable. If we do, we answer that, if not, the defaultValue :) There are tests too. There is WACurrentRequestDebuggingTest which you can try from /tests/seasidepharodebugging For the user, there is almost nothing to do. All WADynamicVariable subclasses are managed automatically. All you need is to register the exception handler: app filter configuration at: #exceptionHandler put: WADynamicVariablesErrorHandler. The only drawback here is that this doesn't work with multiple debuggers as the last debugger will override the class variable values and hence the OLD already opened debuggers will be getting a wrong (the latest) value for the dynamic variables. What do you think? I think that while it might not be the best solution and it has limits, it is every is extremely simple and does the job. Maybe you see problems I am not seeing? Let me know if do you want this integrated or not. In the meanwhile, I am loading it from my repo for my apps and keeping the override (I would like to get rid of it!!!). Best, -- Mariano http://marianopeck.wordpress.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20151207/b87c1bac/attachment.htm From self at je77.com Tue Dec 8 05:41:34 2015 From: self at je77.com (J.F. Rick) Date: Tue Dec 8 05:41:47 2015 Subject: [Seaside] Split form In-Reply-To: References: Message-ID: Thanks. That's a really nice way to do that. I ended up doing it with some Javascript (combining forms before submitting) but this would be less hacky. Cheers, Jeff On Sat, Dec 5, 2015 at 7:11 PM Mariano Martinez Peck wrote: > Hi Jeff, > > I hope I am correct with what I say, but I am not 100% sure. I think you > can use Ajax for this. Since you serialize the form you won't need a HTML > form tag at all. That is, no need of HTML form (unless it does not harm if > you want it as for displaying/css things), and instead of using submit > buttons, you use normal buttons with ajax calls and serialization. Example: > > html button bePush; onClick: (html jQuery ajax serialize: (html jQuery: > '.formToSubmit' ) script: [ :s | self doSomething. > ] ); value: 'Click me'. > > The basis here is: > > 1) use bePush because you are using Ajax and so buttons do NOT have to be > submit. > 2) The magic here is #serialize: which will serialize and invoke callbacks > for those inputs. And the good thing is that it accepts a jQuery as the > argument of what to serialize. So you can say, for example, all those > elements with css class '.formToSubmit'. And then, when you render forms 1 > and 3, you add css class 'formToSubmit'. If the component is very very > large, you can reduce the jquery search for performance (like checking > those elements form AND css class formToSubmit etc...). > 3) Note that since this is ajax, you could have a couple of headaches. For > example, doing an #answer: from within the #script: of the ajax call is not > easy. Also, if you are used to normal request, you would re-render > everything automatically. Here, unless you do something inside #script: it > won't refresh anything. So depending on what you need to you may need to > refresh something from there. > > If you are used to Ajax this will be very very easy. If you need more > help, let me know. > > > On Fri, Dec 4, 2015 at 2:05 PM, J.F. Rick wrote: > >> Hi, >> >> I'm creating a web interface using seaside that's a bit complicated. One >> particular annoying part is that I have to use multiple forms: >> (1) Form 1 contains some fields >> (2) Form 2 is used for uploading images asynchronously >> (3) Form 3 contains more fields that really belong to Form 1. >> Because of layout and because forms can't be within other forms, I have >> to have both Form 1 and 3, though really they should be the same form that >> uses one submit button. Is there a good way to combine the forms in such a >> way that the callbacks for both forms are evaluated? >> >> I did notice that the _k are identical for both forms. >> >> Cheers, >> >> Jeff >> >> _______________________________________________ >> seaside mailing list >> seaside@lists.squeakfoundation.org >> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside >> >> > > > -- > Mariano > http://marianopeck.wordpress.com > _______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20151208/a4dd1318/attachment.htm From marianopeck at gmail.com Tue Dec 8 16:07:36 2015 From: marianopeck at gmail.com (Mariano Martinez Peck) Date: Tue Dec 8 16:07:56 2015 Subject: [Seaside] Re: [Pharo-users] Datatables In-Reply-To: References: <1064078260.1065.1449241094558.JavaMail.zimbra@softsargentina.dyndns.biz> <56629BCA.7090302@free.fr> Message-ID: Hi guys, Pablo was asking about Datatables which is a JS plugin, not databases :) Pablo, In Smalltalk hub there are a couple of DataTables projects. It would be interesting to know which one is the "official". Second, please ask in Seaside mailing list. For my client, I forked the original DatatablesFileLibrary because I needed extra plugins. And then, I simple used JS. So the steps are simply add the file library into the libs of your app. Then render some html table. Finally, invoke some JS. Either from jQuery or from normal JS. Note that I can imagine that some of the Datatables found in Smalltalkhub should have examples. Check them out. Something like this (it's full of domain stuff and probably I am copy pasting with errors but will help you to get the idea): 1) Register lib to app: app addLibrary: DataTablesFileLibrary (or whatever class name is it) 2) Then render table and container (whatever you want, however you want...you simple need a container and a table). containerDiv := html div. containerDivId := containerDiv ensureId. containerDiv class: 'reportContainer'; with: [ html table id: self tableId; with: [ self renderTableOn: html. ]. *html script: (FaDataTablesHelper datatablesScriptFor: tableID tableHeightString: '"scrollY": (0.80 * $(window).height()),' containerDivId: containerDivId). * The magic here is that to the generated table you pass via #script: the Datatables JS. 3) Generate datatables JS: FaDataTablesHelper class >> datatablesScriptFor: tableID tableHeightString: aTableHeightString containerDivId: aContainerDivId ^ ' $(document).ready(function() { var getCellText = function (elem) { //get only the element text return elem.contents().filter(function() { return this.nodeValue; }).text(); }; // this is so that the table does not use all the height space and hence the horizontal scroll looks outside the empty space. // By default, we make the table a max height of a % of the windows. var oTable = $(''#', tableID asString ,''').DataTable( { ', aTableHeightString, ' "scrollX": "100%", "scrollCollapse": true, "paginate": false, "stateSave": false, "stateDuration": -1, "destroy": true, "filter": false, "ordering": false, "searching": false, "sort": false, "orderClasses": false, "autoWidth": false, "jQueryUI": false, // J: ColResize. // I: ColPin. It needs ColReorder. // R: ColReorder // "dom": ''C<"clear">Rt'', "dom": ''t'', // colVis: { // label: function (index, title, th) { // return $(''a[href]'', th).text() || getCellText($(th)); // } // }, // this is in case I want to use the paginate for the Scroller "iDisplayLength": -1 } ); // oTable.colResize.init({fixedLayout: true, dblClick: ''matchContent''}); // Previosuly it was the below line, but this is bad...because if the widths of the columns keep fixed // all along the session, we may wast a lot of space because columns were kepts with its original width... // and when filtering, sorting, etc..the width of the column changes to better adjust its width needs..." // Check if body width is higher than window width :) if ( $(''#', tableID asString ,''').width() > $("#', aContainerDivId,'").width() ) { // Add default fixedColumns // oTable.colPin.init({ // fixedColumns: { // leftColumns: 1, // rightColumns: 1, // heightMatch: ''auto'' // } // }); new $.fn.dataTable.FixedColumns( oTable, { leftColumns: 1, rightColumns: 1 } ); }; //table is bigger than container }); // document on load '. This point 3) depends completely on how you want to use Datatables. Read it's documentation in order to know what you need/want. Also..use the Developer Tools of the browser (console) since you may have missing plugins, or wrong JS code etc. That console will be your friend until you make it work. Cheers, On Sat, Dec 5, 2015 at 11:25 AM, phil@highoctane.be wrote: > I have used this datatable package in Seaside in my app. > > MCSmalltalkhubRepository > owner: 'GastonDallOglio' > project: 'DataTables' > user: '' > password: '' > > For the examples, looking at the Datatables JS API was helpful. The > version was the older one. > > You can use it like this (there is some bootstrap mixed in) > > html tbsTable > beStriped; > beHover; > script: ((html jQuery new dataTable) bFilter: false; bPaginate: false; > bInfo: false); > class: 'table-responsive'; > with: [ > html tableHead with: [ > html tableHeading with: 'ID' seasideTranslated . > html tableHeading with: 'MAC' seasideTranslated . > html tableHeading with: 'IP' seasideTranslated . > html tableHeading with: 'Status' seasideTranslated > ]. > .... > > > > On Sat, Dec 5, 2015 at 9:09 AM, stepharo wrote: > >> You can use >> - Voyage to access MongoDB read the entreprise Pharo book >> - Garage for relational databases. >> >> http://pharo.org/news/garage-database >> Stef >> >> >> Le 4/12/15 15:58, Pablo R. Digonzelli a ?crit : >> >> Hi, I am interesting in using Datatables in a Seaside app. >> I know there is wrapper fot this in StHub. Is there is examples how to >> use it? >> >> >> TIA >> >> ------------------------------ >> *Ing. Pablo Digonzelli* >> Software Solutions >> IP-Solutiones SRL >> Metrotec SRL >> 25 de Mayo 521 >> San Miguel de Tucum?n >> Email: pdigonzelli@softsargentina.com >> pdigonzelli@gmail.com >> Cel: 5493815982714 >> >> >> > -- Mariano http://marianopeck.wordpress.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20151208/e23ce6cc/attachment-0001.htm From b.prior at ieee.org Thu Dec 10 19:21:04 2015 From: b.prior at ieee.org (Bruce Prior) Date: Thu Dec 10 19:21:08 2015 Subject: [Seaside] Setting Up Pharo and Seaside on the Digital Ocean ISP Message-ID: <5669D0A0.5000105@ieee.org> I am looking for a procedure that would load Pharo and Seaside into Digital Ocean. I have worked through Sven Van Caekenberghe's tutorial in setting up a simple website on Digital Ocean and that worked great. But I would like to run Seaside there, too. TIA, Bruce -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20151210/0faa5295/attachment.htm From marianopeck at gmail.com Thu Dec 10 19:25:32 2015 From: marianopeck at gmail.com (Mariano Martinez Peck) Date: Thu Dec 10 19:25:37 2015 Subject: [Seaside] Setting Up Pharo and Seaside on the Digital Ocean ISP In-Reply-To: <5669D0A0.5000105@ieee.org> References: <5669D0A0.5000105@ieee.org> Message-ID: I guess there aren't much needed things in order to run Seaside. Of course, you have to have Seaside loaded in Pharo. And then, you very much likely want an external web server for running in production (rather than the Pharo-based web servers like Zinc). For that, check the Seaside book, the deployment chapter. There is an example for Apache for example. http://book.seaside.st/book/table-of-contents On Thu, Dec 10, 2015 at 4:21 PM, Bruce Prior wrote: > I am looking for a procedure that would load Pharo and Seaside into > Digital Ocean. I have worked through Sven Van Caekenberghe's tutorial in > setting up a simple website on Digital Ocean and that worked great. But I > would like to run Seaside there, too. > > TIA, Bruce > > _______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > -- Mariano http://marianopeck.wordpress.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20151210/58b58077/attachment.htm From robert.w.withers at gmail.com Fri Dec 11 03:55:42 2015 From: robert.w.withers at gmail.com (Robert Withers) Date: Fri Dec 11 03:55:46 2015 Subject: [Seaside] Hi everyone Message-ID: <566A493E.8040801@gmail.com> So sorry for missing out on your progress. Best, Robert From robert.w.withers at gmail.com Fri Dec 11 05:29:24 2015 From: robert.w.withers at gmail.com (Robert Withers) Date: Fri Dec 11 05:29:39 2015 Subject: [Seaside] oops Message-ID: <566A5F34.6030102@gmail.com> -------------- next part -------------- Skipped content of type multipart/related From stephan at stack.nl Fri Dec 11 11:18:58 2015 From: stephan at stack.nl (Stephan Eggermont) Date: Fri Dec 11 11:19:12 2015 Subject: [Seaside] Re: Setting Up Pharo and Seaside on the Digital Ocean ISP In-Reply-To: <5669D0A0.5000105@ieee.org> References: <5669D0A0.5000105@ieee.org> Message-ID: On 10-12-15 20:21, Bruce Prior wrote: > I am looking for a procedure that would load Pharo and Seaside into > Digital Ocean. I have worked through Sven Van Caekenberghe's tutorial in > setting up a simple website on Digital Ocean and that worked great. But > I would like to run Seaside there, too. Here are some notes from a non-https server created droplet with my ssh keys remember droplet ip login ssh root@[ip address of droplet] apt-get update apt-get upgrade Y K(eep locally modified version of menu) Intrusion detection system apt-get installl fail2ban Y apt-get install vim Y useradd deploy mkdir /home/deploy mkdir /home/deploy/.ssh chmod 700 /home/deploy/.ssh vim /home/deploy/.ssh/authorized_keys add id_rsa.pub contents chmod 400 /home/deploy/.ssh/authorized_keys chown deploy:deploy /home/deploy -R In a new shell, try to login as deploy@[ip address of droplet] passwd deploy [enter your password for deploy user] passwd [enter your password for root] visudo root ALL=(ALL) ALL deploy ALL=(ALL) ALL vim /etc/ssh/sshd_config PermitRootLogin no PasswordAuthentication no AllowUsers deploy service ssh restart ufw allow 22 ufw allow 80 ufw allow 443 ufw enable temporary ufw allow 8080 to make sure the seaside app works without the nginx in front of it afterwards deny apt-get install unattended-upgrades vim /etc/apt/apt.conf.d/10periodic APT::Periodic::Update-Package-Lists "1"; APT::Periodic::Download-Upgradeable-Packages "1"; APT::Periodic::AutocleanInterval "7"; APT::Periodic::Unattended-Upgrade "1"; vim /etc/apt/apt.conf.d/50unattended-upgrades // Automatically upgrade packages from these (origin:archive) pairs Unattended-Upgrade::Allowed-Origins { "Ubuntu raring ringtail-security"; vi /etc/ufw/before.rules (on top) *nat :PREROUTING ACCEPT [0:0] -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8080 ufw enable zip Seaside.image,changes,sources to Archive.zip scp Archive.zip deploy@[ip address of droplet] unzip Archive.zip apt-get install xvfb apt-get install x11vncdu apt-get install nginx sudo service nginx start chown deploy /var/log/nginx/error.log chown deploy /var/log/nginx/access.log sudo vim /etc/nginx/sites-available/example worker_processes 1; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; server { server_name [ip address of droplet] yourdomain.tld www.yourdomain.tld *.yourdomain.tld; root /var/www/www.yourdomain.tld/; location / { proxy_pass http://127.0.0.1:8080; } } } repeat the server block for each extra image you want to run with a different domain, only have the numbers version once. port number increases for each following image. sudo ln -s /etc/nginx/sites-available/example /etc/nginx/sites-enabled/example sudo rm /etc/nginx/sites-enabled/default Cleanup seaside WADispatcher default unregister: (WADispatcher default handlers at: 'status') From stephan at stack.nl Fri Dec 11 11:24:13 2015 From: stephan at stack.nl (Stephan Eggermont) Date: Fri Dec 11 11:24:27 2015 Subject: [Seaside] Re: Setting Up Pharo and Seaside on the Digital Ocean ISP In-Reply-To: <5669D0A0.5000105@ieee.org> References: <5669D0A0.5000105@ieee.org> Message-ID: On 10-12-15 20:21, Bruce Prior wrote: > I am looking for a procedure that would load Pharo and Seaside into > Digital Ocean. I have worked through Sven Van Caekenberghe's tutorial in > setting up a simple website on Digital Ocean and that worked great. But > I would like to run Seaside there, too. Also, be aware that Sean implemented the DigitalOcean API. Combining that with OSProcess should make it possible to fully automate the deployment MCHttpRepository location: 'http://smalltalkhub.com/mc/SeanDeNigris/DigitalOcean/main' user: '' password: '' Stephan From estebanlm at gmail.com Wed Dec 23 07:40:18 2015 From: estebanlm at gmail.com (Esteban Lorenzano) Date: Wed Dec 23 07:40:26 2015 Subject: [Seaside] make WAWalkbackErrorHandler Message-ID: Hi, So, I?m in Togo teaching Pharo and Seaside to students, and part of the course is to make a small application (they have 3 days for doing it). The first blocking issue they have is that since default error handler is WAHtmlErrorHandler they are lost each time they made a simple mistake (WAHtmlErrorHandler eats rendering problems, for example? or just shows DNU without saying anything. And of course showing the students the configuration interfase is overkill :) Now, since the default registration includes the toolbar, meaning than by default we have a ?development app? (A correct approach, IMO), I wonder if we couldn?t put WAWalkbackErrorHandler as default as well? (I remember previous versions of Seaside had it, but it had changed since then). cheers, Esteban From heniart.thomas at gmail.com Wed Dec 23 10:02:57 2015 From: heniart.thomas at gmail.com (Thomas Heniart) Date: Wed Dec 23 10:02:59 2015 Subject: [Seaside] make WAWalkbackErrorHandler In-Reply-To: References: Message-ID: Hi Esteban, I do it by going to "localhost:YourPort/", then I click on Configure in the right panel just below Browse and then I check "Allow debugging of errors" and in this case all applications you will register use WAWalkbackErrorHandler Maybe there is an automatic way to do it but I didn't found :/ Cheers, Thomas 2015-12-23 8:40 GMT+01:00 Esteban Lorenzano : > Hi, > > So, I?m in Togo teaching Pharo and Seaside to students, and part of the > course is to make a small application (they have 3 days for doing it). The > first blocking issue they have is that since default error handler is > WAHtmlErrorHandler they are lost each time they made a simple mistake > (WAHtmlErrorHandler eats rendering problems, for example? or just shows DNU > without saying anything. > And of course showing the students the configuration interfase is overkill > :) > > Now, since the default registration includes the toolbar, meaning than by > default we have a ?development app? (A correct approach, IMO), I wonder if > we couldn?t put WAWalkbackErrorHandler as default as well? (I remember > previous versions of Seaside had it, but it had changed since then). > > cheers, > Esteban > > _______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20151223/af96b095/attachment.htm From estebanlm at gmail.com Wed Dec 23 19:56:04 2015 From: estebanlm at gmail.com (Esteban Lorenzano) Date: Wed Dec 23 19:56:14 2015 Subject: [Seaside] make WAWalkbackErrorHandler default In-Reply-To: References: Message-ID: <5FA0349A-859B-4E37-8FEF-DA78FDD06C47@gmail.com> Hi Thomas, I know how to do it :) I?m talking about students: *they* don?t know and is a pity. I want it to be default because then they can debug their programs without needing to learn the configuration interfase (which we all know is not very? easy to use). Also my argument is: default installation is already prepared for development (hence the toolbar at the bottom), so? why not to prepare it completely for development by making WAWalkbackErrorHandler default? Esteban ps: added ?default? in subject because I obviously forget that this morning :) > On 23 Dec 2015, at 10:02, Thomas Heniart wrote: > > Hi Esteban, > > I do it by going to "localhost:YourPort/", then I click on Configure in the right panel just below Browse and then I check > "Allow debugging of errors" and in this case all applications you will register use WAWalkbackErrorHandler > Maybe there is an automatic way to do it but I didn't found :/ > > Cheers, > Thomas > > 2015-12-23 8:40 GMT+01:00 Esteban Lorenzano >: > Hi, > > So, I?m in Togo teaching Pharo and Seaside to students, and part of the course is to make a small application (they have 3 days for doing it). The first blocking issue they have is that since default error handler is WAHtmlErrorHandler they are lost each time they made a simple mistake (WAHtmlErrorHandler eats rendering problems, for example? or just shows DNU without saying anything. > And of course showing the students the configuration interfase is overkill :) > > Now, since the default registration includes the toolbar, meaning than by default we have a ?development app? (A correct approach, IMO), I wonder if we couldn?t put WAWalkbackErrorHandler as default as well? (I remember previous versions of Seaside had it, but it had changed since then). > > cheers, > Esteban > > _______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > _______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20151223/9d7d2719/attachment.htm From johan at inceptive.be Thu Dec 24 07:48:47 2015 From: johan at inceptive.be (Johan Brichau) Date: Thu Dec 24 07:48:50 2015 Subject: [Seaside] make WAWalkbackErrorHandler In-Reply-To: References: Message-ID: <592970AE-DB4F-40E4-A05F-1E7BEADEA26C@inceptive.be> Yes, that?s indeed a sensible default. I changed it for 3.2.0 now. Mind that the Seaside Welcome >> Basic Configuration has an option to check: "Allow debugging of errors? So, no need to dive into the more advanced configuration for that. cheers Johan > On 23 Dec 2015, at 08:40, Esteban Lorenzano wrote: > > Hi, > > So, I?m in Togo teaching Pharo and Seaside to students, and part of the course is to make a small application (they have 3 days for doing it). The first blocking issue they have is that since default error handler is WAHtmlErrorHandler they are lost each time they made a simple mistake (WAHtmlErrorHandler eats rendering problems, for example? or just shows DNU without saying anything. > And of course showing the students the configuration interfase is overkill :) > > Now, since the default registration includes the toolbar, meaning than by default we have a ?development app? (A correct approach, IMO), I wonder if we couldn?t put WAWalkbackErrorHandler as default as well? (I remember previous versions of Seaside had it, but it had changed since then). > > cheers, > Esteban > > _______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside From hilaire at drgeo.eu Thu Dec 31 13:32:37 2015 From: hilaire at drgeo.eu (Hilaire) Date: Thu Dec 31 13:32:46 2015 Subject: [Seaside] TableReport slow down Message-ID: Hello, I am experiencing a slow down rendering a large table report: The table report is more than 240 lines. Reading at the source html, it is about 900 bytes per lines, so a bit more than 200kB for the report. Not much for the rest of the page. The page renders in a bit more 5s, on a local loop. Profiling shows most of time is spent in WideString>>at:put: For me 200KB is not that big and this slow down does not look normal. Seaisde is 3.1.3.2 Smalltalk is Pharo3 CPU is double core intel 800Mhz-2000Mhz VM is 3.9-7 The profiling tree is as shown in the screenshot. Thanks Hilaire -- Dr. Geo http://drgeo.eu http://google.com/+DrgeoEu -------------- next part -------------- A non-text attachment was scrubbed... Name: Tree.png Type: image/png Size: 29517 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/seaside/attachments/20151231/7c815112/Tree-0001.png From hilaire at drgeo.eu Thu Dec 31 14:02:43 2015 From: hilaire at drgeo.eu (Hilaire) Date: Thu Dec 31 14:02:46 2015 Subject: [Seaside] Re: TableReport slow down In-Reply-To: References: Message-ID: <56853583.6040800@drgeo.eu> Hello, Some investigation shows an issue while appending an ? symbol in the text representation of my money object (the one used by seaside for rendering) CGMoney>>printOn: aStream aStream << (amount asScaledDecimal: 2) greaseString << ' ' << '?' Replacing '?' by 'EUR' gives back normal rendering time. Indeed the '?' is encoded as WideString, so not sure what is happening. All content converted to WideString or what? But I really want to rendery euro symbol Thanks Hilaire Le 31/12/2015 14:32, Hilaire a ?crit : > Hello, > > I am experiencing a slow down rendering a large table report: > > The table report is more than 240 lines. Reading at the source html, it > is about 900 bytes per lines, so a bit more than 200kB for the report. > Not much for the rest of the page. The page renders in a bit more 5s, on > a local loop. > Profiling shows most of time is spent in WideString>>at:put: > > For me 200KB is not that big and this slow down does not look normal. > > Seaisde is 3.1.3.2 > Smalltalk is Pharo3 > CPU is double core intel 800Mhz-2000Mhz > VM is 3.9-7 > > The profiling tree is as shown in the screenshot. > > Thanks > > Hilaire > > > > _______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside -- Dr. Geo http://drgeo.eu http://google.com/+DrgeoEu -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20151231/33d68f5b/attachment.htm From sven at stfx.eu Thu Dec 31 14:42:18 2015 From: sven at stfx.eu (Sven Van Caekenberghe) Date: Thu Dec 31 14:42:21 2015 Subject: [Seaside] Re: TableReport slow down In-Reply-To: <56853583.6040800@drgeo.eu> References: <56853583.6040800@drgeo.eu> Message-ID: > On 31 Dec 2015, at 15:02, Hilaire wrote: > > Hello, > > Some investigation shows an issue while appending an ? symbol in the text representation of my money object (the one used by seaside for rendering) > > CGMoney>>printOn: aStream > aStream << (amount asScaledDecimal: 2) greaseString << ' ' << '?' > > Replacing '?' by 'EUR' gives back normal rendering time. > > Indeed the '?' is encoded as WideString, so not sure what is happening. All content converted to WideString or what? Yes, the string starts as a plain ByteString and once you add the ? it gets automagically converted to a WideString, but you pay a huge price in performance: it involves the usage of global #become: each time, which is dead slow (Spur will help IIUC). A possible solution is to somehow start with a WideString from the beginning (or force it before doing all elements one by one). > But I really want to rendery euro symbol > > Thanks > > Hilaire > > > Le 31/12/2015 14:32, Hilaire a ?crit : >> Hello, >> >> I am experiencing a slow down rendering a large table report: >> >> The table report is more than 240 lines. Reading at the source html, it >> is about 900 bytes per lines, so a bit more than 200kB for the report. >> Not much for the rest of the page. The page renders in a bit more 5s, on >> a local loop. >> Profiling shows most of time is spent in WideString>>at:put: >> >> For me 200KB is not that big and this slow down does not look normal. >> >> Seaisde is 3.1.3.2 >> Smalltalk is Pharo3 >> CPU is double core intel 800Mhz-2000Mhz >> VM is 3.9-7 >> >> The profiling tree is as shown in the screenshot. >> >> Thanks >> >> Hilaire >> >> >> >> >> _______________________________________________ >> seaside mailing list >> >> seaside@lists.squeakfoundation.org >> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > > -- > Dr. Geo > > http://drgeo.eu > http://google.com/+DrgeoEu > _______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside