From ma.chris.m at gmail.com Thu Oct 1 03:50:57 2015 From: ma.chris.m at gmail.com (Chris Muller) Date: Thu Oct 1 03:51:39 2015 Subject: [Seaside] accessing event information Message-ID: I am still learning. I want to make a desktop-like app in the browser. Seaside lets me use Ajax to respond to individual widget clicks and update my model in the server, as well as update the DOM in the client accordingly, all in one step: html button onClick: ((html jQuery: #idOfElementToReplace) load html: [ : resultOfClickHtml | model doTheAppropriateUpdates. resultOfClickHtml render: model ]); with: 'click to update the model'. I also tested onMouseOver: and onMouseOut:, they worked. It feels a little strange to be updating my model within html rendering, but it gives me near desktop-app-like development capability for the browser with efficient event / response transfer, using Seaside. Wonderful! I also need to handle onKeyUp and onKeyDown:, but I'm not sure the proper way to access the Event information by this approach. I couldn't find any examples I could learn from. How could I do it? From marianopeck at gmail.com Thu Oct 1 12:02:11 2015 From: marianopeck at gmail.com (Mariano Martinez Peck) Date: Thu Oct 1 12:02:14 2015 Subject: [Seaside] accessing event information In-Reply-To: References: Message-ID: Hi Chris, I did NOT test it but maybe something like this works? onKeyUp: (' alert(evt) ' asFunction: #('evt')) Basically, you can write whatever function (here I do a simple alert). Cheers, On Thu, Oct 1, 2015 at 12:50 AM, Chris Muller wrote: > I am still learning. I want to make a desktop-like app in the > browser. Seaside lets me use Ajax to respond to individual widget > clicks and update my model in the server, as well as update the DOM in > the client accordingly, all in one step: > > html button > onClick: ((html jQuery: #idOfElementToReplace) load > html: > [ : resultOfClickHtml | model doTheAppropriateUpdates. > resultOfClickHtml render: model ]); > with: 'click to update the model'. > > I also tested onMouseOver: and onMouseOut:, they worked. It feels a > little strange to be updating my model within html rendering, but it > gives me near desktop-app-like development capability for the browser > with efficient event / response transfer, using Seaside. Wonderful! > > I also need to handle onKeyUp and onKeyDown:, but I'm not sure the > proper way to access the Event information by this approach. I > couldn't find any examples I could learn from. How could I do it? > _______________________________________________ > 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/20151001/606eeb67/attachment.htm From johan at inceptive.be Thu Oct 1 12:16:08 2015 From: johan at inceptive.be (Johan Brichau) Date: Thu Oct 1 12:16:10 2015 Subject: [Seaside] How can I get _s in browser URL when using #initialRequest: / cookies / ajax In-Reply-To: References: Message-ID: <917C6D9F-AD55-420F-B962-CF13DA3622AE@inceptive.be> Hi Mariano, Did you try implementing that with the #updateUrl: on your app component? Johan > On 29 Sep 2015, at 20:24, Mariano Martinez Peck wrote: > > Hi guys, > > I am adding "Remember Me" kind of feature in my seaside app. I have my root seaside class that implements #initialRequest:. If there was a correct cookie, then I do not even render a login page and instead in the #go: of my root class I directly #call: my main app component. > > The problem I have is that when a user is logged in from a cookie, and my main app component is called (there is no click from the user, no callback) , the _s is not in the browser URL. And all my main menu and everything from my app is done with ajax. In the past, I found an issue that AJAX callabacks would not trigger #updateRoot:. So...you can click menus, do stuff, and still, no _s in browser URL. This is a problem because a user could, for example, do a CMD+R and then it gets the welcome page again loosing it's session. > > Of course, as soon as I click a button or something that does a normal callback (not ajax), then the URL gets the _s. But I need to do this from the very beginning. > > Also..the session does answer correct to #url. The problem is about refreshing the browser's URL. > > So... is there a way I can hack in order to re-render something so that _s is added to the browser URL? I have an idea in mind but it's a terrible hack... > > Thanks for any help, > > -- > 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/20151001/8caac6bc/attachment-0001.htm From marianopeck at gmail.com Thu Oct 1 13:20:50 2015 From: marianopeck at gmail.com (Mariano Martinez Peck) Date: Thu Oct 1 13:20:52 2015 Subject: [Seaside] Session tracking without URL field yet supporting "multi session" Message-ID: Hi guys, I am evaluating some improvements for an app, and I would like these 2 features: 1) Do not expose _s in URL 2) I want to be able to open multiple different seaside sessions from different tabs of the browser. I was checking the WACookieSessionTrackingStrategy subclasses but of course that is not gonna work because if I have multiple sessions opened in the browser, at #cookieFromContext:ifAbsent: there is no way I can guess which is the real session I must answer for that request. I am not against using cookies, but I cannot see how that could work. Anyone has a workaround? As a second thought, I saw WASslSessionTrackingStrategy (my site does run with HTTPS over nginx) which looked interesting. Has someone used this before? I have read a couple of problems with it: *" An interval that is too short can cause a premature termination of a session.* *Also, some Web browsers might have their own timers that affect the lifetime of the SSL session ID. These Web browsers may not leave the SSL session ID active long enough to serve as a useful mechanism for session tracking.* *"* I seems the timeout can be easily set in nginx. But I am wondering about what it says about browsers killing inactive SSL sessions IDs. Have anyone experienced this? Thanks in advance, -- Mariano http://marianopeck.wordpress.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20151001/8453f4eb/attachment.htm From marianopeck at gmail.com Thu Oct 1 14:58:54 2015 From: marianopeck at gmail.com (Mariano Martinez Peck) Date: Thu Oct 1 14:58:55 2015 Subject: [Seaside] How can I get _s in browser URL when using #initialRequest: / cookies / ajax In-Reply-To: <917C6D9F-AD55-420F-B962-CF13DA3622AE@inceptive.be> References: <917C6D9F-AD55-420F-B962-CF13DA3622AE@inceptive.be> Message-ID: On Thu, Oct 1, 2015 at 9:16 AM, Johan Brichau wrote: > Hi Mariano, > > Did you try implementing that with the #updateUrl: on your app component? > > Hi Johan, Thanks for the idea. At the end, I also needed a component for when a user was authenticated directly from "remember me" cookies. You know, a component showing "you will be logged with username XXX, continue or log with another user". So this component has the side effect of having a callback and hence displaying the _s in the browser URL for the following #call: which was my main app component. Thanks anyway! > Johan > > On 29 Sep 2015, at 20:24, Mariano Martinez Peck > wrote: > > Hi guys, > > I am adding "Remember Me" kind of feature in my seaside app. I have my > root seaside class that implements #initialRequest:. If there was a correct > cookie, then I do not even render a login page and instead in the #go: of > my root class I directly #call: my main app component. > > The problem I have is that when a user is logged in from a cookie, and my > main app component is called (there is no click from the user, no callback) > , the _s is not in the browser URL. And all my main menu and everything > from my app is done with ajax. In the past, I found an issue that AJAX > callabacks would not trigger #updateRoot:. So...you can click menus, do > stuff, and still, no _s in browser URL. This is a problem because a user > could, for example, do a CMD+R and then it gets the welcome page again > loosing it's session. > > Of course, as soon as I click a button or something that does a normal > callback (not ajax), then the URL gets the _s. But I need to do this from > the very beginning. > > Also..the session does answer correct to #url. The problem is about > refreshing the browser's URL. > > So... is there a way I can hack in order to re-render something so that _s > is added to the browser URL? I have an idea in mind but it's a terrible > hack... > > Thanks for any help, > > -- > Mariano > http://marianopeck.wordpress.com > _______________________________________________ > 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 > > -- Mariano http://marianopeck.wordpress.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20151001/0c097485/attachment.htm From marianopeck at gmail.com Thu Oct 1 19:37:59 2015 From: marianopeck at gmail.com (Mariano Martinez Peck) Date: Thu Oct 1 19:38:01 2015 Subject: [Seaside] How can I add things to path from session tracking or session itself? Message-ID: Hi guys, I am trying to code my own WAHandlerTrackingStrategy subclass. I am trying to implement #addKey:toUrl: in a way that it does some #addToPath: to the URL. Imagine like if I would like to store the session ID in this way *xxx/s/asdasdklahsfa* rather than *xxx/?_s=asdasdklahsfa* However, nothing is displayed in browser's URL bar. I also tried to add that in my WASession subclass (that is, implement #updateUrl: and add those paths). Yet, not luck. Any idea what I am doing wrong? Thanks in advance, -- Mariano http://marianopeck.wordpress.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20151001/dc0aa559/attachment.htm From marianopeck at gmail.com Fri Oct 2 13:55:59 2015 From: marianopeck at gmail.com (Mariano Martinez Peck) Date: Fri Oct 2 13:56:02 2015 Subject: [Seaside] Re: How can I add things to path from session tracking or session itself? In-Reply-To: References: Message-ID: On Thu, Oct 1, 2015 at 4:37 PM, Mariano Martinez Peck wrote: > Hi guys, > > I am trying to code my own WAHandlerTrackingStrategy subclass. I am trying > to implement #addKey:toUrl: in a way that it does some #addToPath: to the > URL. Imagine like if I would like to store the session ID in this way > *xxx/s/asdasdklahsfa* rather than *xxx/?_s=asdasdklahsfa* > However, nothing is displayed in browser's URL bar. > > I also tried to add that in my WASession subclass (that is, implement > #updateUrl: and add those paths). Yet, not luck. > > I tried everything and still no luck. What I want is to track seaside session ID as part of the path, NOT a field/parameter of the url. Some parts seem to work, but others don't. For example it seems callbacks URL ignore what I add to the path etc. Quite complicated. Any ideas how can I do it? -- Mariano http://marianopeck.wordpress.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20151002/c1a79dd4/attachment.htm From marianopeck at gmail.com Fri Oct 2 16:16:53 2015 From: marianopeck at gmail.com (Mariano Martinez Peck) Date: Fri Oct 2 16:16:55 2015 Subject: [Seaside] "expired session" vs "expired document halder" Message-ID: Hi guys, I am developing my own seaside session tracking subclass WAHandlerTrackingStrategy (which uses cookies but in a different way) but I am finding problems to understand a couple of comments and code I found around. For example: * "Don't delete the session cookie if we have an expired document halder.* * Only delete the session cookie if we actually have an expired session."* And: *As ususal care has to be taken that this is done only for expired sessions and not for expired document handlers* And: * Some tracking methods may not be appropriate for some kinds of handlers (eg. a WADocumentHandler should never be tracked using a cookie). Some requests may have multiple keys (eg. a query field for a WADocumentHandler and a cookie for a WASession).* So.. I am not sure what does mean. I am interested in tracking SESSIONS, not document handlers. And I must clean stuff at session expiration only. I don't know what the document handler expiration is about nor how to distinguish it from session expiration. So then I cannot know when to clean and when to not clean. Any clarification? -- Mariano http://marianopeck.wordpress.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20151002/48d4aeb8/attachment.htm From johan at inceptive.be Sat Oct 3 13:10:30 2015 From: johan at inceptive.be (Johan Brichau) Date: Sat Oct 3 13:10:37 2015 Subject: [Seaside] Session tracking without URL field yet supporting "multi session" In-Reply-To: References: Message-ID: <676551CF-F27A-4DCB-90C4-46DFAFC2EDF8@inceptive.be> They only way I can think of is to store a session id in the browser sessionStorage, which is unique to each tab. However, I do not think anyone has done so yet. The question that pops to my mind is: why do you want to hide the _s in the url? If this is about security, it?s probably because you do not want someone to copy/paste the url and hijack the session? You can prevent that by not using the session to track authentication, but a cookie. In other words: - use a cookie for authentication (i.e. always require the cookie to be present) - keep _s for session tracking -> a user will need both the session id in the url _and_ the cookie to work But perhaps there is another reason to keep the _s out of the url? cheers Johan > On 01 Oct 2015, at 15:20, Mariano Martinez Peck wrote: > > Hi guys, > > I am evaluating some improvements for an app, and I would like these 2 features: > > 1) Do not expose _s in URL > 2) I want to be able to open multiple different seaside sessions from different tabs of the browser. > > I was checking the WACookieSessionTrackingStrategy subclasses but of course that is not gonna work because if I have multiple sessions opened in the browser, at #cookieFromContext:ifAbsent: there is no way I can guess which is the real session I must answer for that request. > I am not against using cookies, but I cannot see how that could work. Anyone has a workaround? > > As a second thought, I saw WASslSessionTrackingStrategy (my site does run with HTTPS over nginx) which looked interesting. Has someone used this before? I have read a couple of problems with it: > > " An interval that is too short can cause a premature termination of a session. > Also, some Web browsers might have their own timers that affect the lifetime of the SSL session ID. These Web browsers may not leave the SSL session ID active long enough to serve as a useful mechanism for session tracking. > " > > I seems the timeout can be easily set in nginx. But I am wondering about what it says about browsers killing inactive SSL sessions IDs. Have anyone experienced this? > > Thanks in advance, > > -- > 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/20151003/bf9b98ea/attachment-0001.htm From marianopeck at gmail.com Sat Oct 3 15:35:53 2015 From: marianopeck at gmail.com (Mariano Martinez Peck) Date: Sat Oct 3 15:35:54 2015 Subject: [Seaside] Session tracking without URL field yet supporting "multi session" In-Reply-To: <676551CF-F27A-4DCB-90C4-46DFAFC2EDF8@inceptive.be> References: <676551CF-F27A-4DCB-90C4-46DFAFC2EDF8@inceptive.be> Message-ID: On Sat, Oct 3, 2015 at 10:10 AM, Johan Brichau wrote: > They only way I can think of is to store a session id in the browser > sessionStorage, which is unique to each tab. > However, I do not think anyone has done so yet. > Thanks for the idea, I wasn't aware of the sessionStorage. I will read about it. > > The question that pops to my mind is: why do you want to hide the _s in > the url? If this is about security, it?s probably because you do not want > someone to copy/paste the url and hijack the session? > Exactly. > You can prevent that by not using the session to track authentication, but > a cookie. In other words: > - use a cookie for authentication (i.e. always require the cookie to be > present) > - keep _s for session tracking > -> a user will need both the session id in the url _and_ the cookie to work > > That's exactly what I ended up doing. But I wanted to be able to have multiple sessions so the same cookie keeps a list of active sessions. Also, the session ID stored in the cookie are not the plain session ID because otherwise it would be very simple to hack. So when a new session ID is created I create another random token and I store that in a table at server side. And yes, I keep using _s for tracking. For this, I made a subclass of WAHandlerTrackingStrategy. Then I had to make a request filter that would get the session ID from the _s and check if there is a cookie that holds a correct "token" for that cookie. If someone else is interested in this code I can share it. Even more if a "seaside dev" guy could take a brief look since I suspect I may be missing scenarios (like document handler expiration vs session expiration). > But perhaps there is another reason to keep the _s out of the url? > > cheers > Johan > > On 01 Oct 2015, at 15:20, Mariano Martinez Peck > wrote: > > Hi guys, > > I am evaluating some improvements for an app, and I would like these 2 > features: > > 1) Do not expose _s in URL > 2) I want to be able to open multiple different seaside sessions from > different tabs of the browser. > > I was checking the WACookieSessionTrackingStrategy subclasses but of > course that is not gonna work because if I have multiple sessions opened in > the browser, at #cookieFromContext:ifAbsent: there is no way I can guess > which is the real session I must answer for that request. > I am not against using cookies, but I cannot see how that could work. > Anyone has a workaround? > > As a second thought, I saw WASslSessionTrackingStrategy (my site does run > with HTTPS over nginx) which looked interesting. Has someone used this > before? I have read a couple of problems with it: > > *" An interval that is too short can cause a premature termination of a > session.* > *Also, some Web browsers might have their own timers that affect the > lifetime of the SSL session ID. These Web browsers may not leave the SSL > session ID active long enough to serve as a useful mechanism for session > tracking.* > *"* > > I seems the timeout can be easily set in nginx. But I am wondering about > what it says about browsers killing inactive SSL sessions IDs. Have anyone > experienced this? > > Thanks in advance, > > -- > Mariano > http://marianopeck.wordpress.com > _______________________________________________ > 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 > > -- Mariano http://marianopeck.wordpress.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20151003/79a89116/attachment.htm From emaringolo at gmail.com Sat Oct 3 15:44:50 2015 From: emaringolo at gmail.com (Esteban A. Maringolo) Date: Sat Oct 3 15:45:32 2015 Subject: [Seaside] Session tracking without URL field yet supporting "multi session" In-Reply-To: References: <676551CF-F27A-4DCB-90C4-46DFAFC2EDF8@inceptive.be> Message-ID: 2015-10-03 12:35 GMT-03:00 Mariano Martinez Peck : > On Sat, Oct 3, 2015 at 10:10 AM, Johan Brichau wrote: >> >> They only way I can think of is to store a session id in the browser >> sessionStorage, which is unique to each tab. >> However, I do not think anyone has done so yet. > Thanks for the idea, I wasn't aware of the sessionStorage. I will read about > it. The problem with this is how you add the session parameter to requests (both full and xhr ones) >> The question that pops to my mind is: why do you want to hide the _s in >> the url? If this is about security, it?s probably because you do not want >> someone to copy/paste the url and hijack the session? > Exactly. >> You can prevent that by not using the session to track authentication, but >> a cookie. In other words: >> - use a cookie for authentication (i.e. always require the cookie to be >> present) >> - keep _s for session tracking >> -> a user will need both the session id in the url _and_ the cookie to >> work > That's exactly what I ended up doing. But I wanted to be able to have > multiple sessions so the same cookie keeps a list of active sessions. Also, > the session ID stored in the cookie are not the plain session ID because > otherwise it would be very simple to hack. So when a new session ID is > created I create another random token and I store that in a table at server > side. And yes, I keep using _s for tracking. For this, I made a subclass of > WAHandlerTrackingStrategy. > Then I had to make a request filter that would get the session ID from the > _s and check if there is a cookie that holds a correct "token" for that > cookie. > > If someone else is interested in this code I can share it. Even more if a > "seaside dev" guy could take a brief look since I suspect I may be missing > scenarios (like document handler expiration vs session expiration). Not a Seaside Dev guy, but if you share it I'll take a look at it. I think that for preventing session hijacking you don't need to remove the _s parameter from the query arguments, but instead *add* new information about the particular client to the session tracking in the server, like IP, some sort of UA fingerprint, etc. So if somebody hijacks the session ID, it will be rejected by the server because it's coming from a different client other than the one that initiated the session. Esteban A. Maringolo From marianopeck at gmail.com Sat Oct 3 15:55:51 2015 From: marianopeck at gmail.com (Mariano Martinez Peck) Date: Sat Oct 3 15:55:53 2015 Subject: [Seaside] Session tracking without URL field yet supporting "multi session" In-Reply-To: References: <676551CF-F27A-4DCB-90C4-46DFAFC2EDF8@inceptive.be> Message-ID: On Sat, Oct 3, 2015 at 12:44 PM, Esteban A. Maringolo wrote: > 2015-10-03 12:35 GMT-03:00 Mariano Martinez Peck : > > On Sat, Oct 3, 2015 at 10:10 AM, Johan Brichau > wrote: > >> > >> They only way I can think of is to store a session id in the browser > >> sessionStorage, which is unique to each tab. > >> However, I do not think anyone has done so yet. > > > Thanks for the idea, I wasn't aware of the sessionStorage. I will read > about > > it. > > The problem with this is how you add the session parameter to requests > (both full and xhr ones) > > > >> The question that pops to my mind is: why do you want to hide the _s in > >> the url? If this is about security, it?s probably because you do not > want > >> someone to copy/paste the url and hijack the session? > > > Exactly. > > > >> You can prevent that by not using the session to track authentication, > but > >> a cookie. In other words: > >> - use a cookie for authentication (i.e. always require the cookie to be > >> present) > >> - keep _s for session tracking > >> -> a user will need both the session id in the url _and_ the cookie to > >> work > > > That's exactly what I ended up doing. But I wanted to be able to have > > multiple sessions so the same cookie keeps a list of active sessions. > Also, > > the session ID stored in the cookie are not the plain session ID because > > otherwise it would be very simple to hack. So when a new session ID is > > created I create another random token and I store that in a table at > server > > side. And yes, I keep using _s for tracking. For this, I made a subclass > of > > WAHandlerTrackingStrategy. > > > Then I had to make a request filter that would get the session ID from > the > > _s and check if there is a cookie that holds a correct "token" for that > > cookie. > > > > If someone else is interested in this code I can share it. Even more if a > > "seaside dev" guy could take a brief look since I suspect I may be > missing > > scenarios (like document handler expiration vs session expiration). > > Not a Seaside Dev guy, but if you share it I'll take a look at it. > Great, I will package it a bit better and do a "cleaning" pass since I made it work Friday afternoon ;) > > I think that for preventing session hijacking you don't need to remove > the _s parameter from the query arguments, but instead *add* new > information about the particular client to the session tracking in the > server, like IP, some sort of UA fingerprint, etc. > > Exactly. Note that I discarded the IP filter (WAProtectionFilter) because it would be a pain for users. Imagine they move to another network, they move from house to work, they connect / disconnect from VPN, ISP assigning new IP, etc..and you loose sessions. At least for my app a session may contains LOTS of tabs for lots of current work. And my session expirations are about 2 hours. So... for MY usecase, adding IP filter is not worth. What I indeed was thinking BESIDES adding that cookie thingy we are discussing here, is to add a WAUserAgentFilter (very very very easy to code), which would also make sure about user agent. From what I thought, it will only "loose" sessions in case the user updates the browser, which happens every in a while. But I am still not 100% convinced. I thought this could be cool if someone could still the cookies from a stolen machine or whatever. But... what I think is that if someone can have access to cookies of another machine, he could likely browse the app from there. Not sure. Thoughts? > So if somebody hijacks the session ID, it will be rejected by the > server because it's coming from a different client other than the one > that initiated the session. > > Exactly, that's what my cookie filter does. -- Mariano http://marianopeck.wordpress.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20151003/7dd51479/attachment-0001.htm From emaringolo at gmail.com Sat Oct 3 16:14:25 2015 From: emaringolo at gmail.com (Esteban A. Maringolo) Date: Sat Oct 3 16:15:07 2015 Subject: [Seaside] Session tracking without URL field yet supporting "multi session" In-Reply-To: References: <676551CF-F27A-4DCB-90C4-46DFAFC2EDF8@inceptive.be> Message-ID: 2015-10-03 12:55 GMT-03:00 Mariano Martinez Peck : >> I think that for preventing session hijacking you don't need to remove >> the _s parameter from the query arguments, but instead *add* new >> information about the particular client to the session tracking in the >> server, like IP, some sort of UA fingerprint, etc. >> > > Exactly. Note that I discarded the IP filter (WAProtectionFilter) because it > would be a pain for users. Imagine they move to another network, they move > from house to work, they connect / disconnect from VPN, ISP assigning new > IP, etc..and you loose sessions. At least for my app a session may contains > LOTS of tabs for lots of current work. And my session expirations are about > 2 hours. So... for MY usecase, adding IP filter is not worth. Roaming users are a problem for IP filtering. > What I indeed was thinking BESIDES adding that cookie thingy we are > discussing here, is to add a WAUserAgentFilter (very very very easy to > code), which would also make sure about user agent. From what I thought, it > will only "loose" sessions in case the user updates the browser, which > happens every in a while. But I am still not 100% convinced. I thought this > could be cool if someone could still the cookies from a stolen machine or > whatever. But... what I think is that if someone can have access to cookies > of another machine, he could likely browse the app from there. Not sure. > Thoughts? UA is very easy to spoof, so not realiable at all to be used as the only part in an auth token (together with _s, of course). I think there is no way to have it both ways, it is... being able to have "one session per tab" in your browser, and also having a single session token that survives the browser session. Local storage is just a dictionary, and it will be readable by ANY user of the browser, so it is very much like Cookies in this sense, with the added part of requiring to recover the session token from it before performing any HTTP request, and being recoverable not only by your site, but with anybody with access to the browser. Session storage is localStorage but just for the tab session, so it isn't available when you want to restart the session. It's challenging, and maybe there is a trick to overcome this, but you have to decide whether it is worth chasing it. >> So if somebody hijacks the session ID, it will be rejected by the >> server because it's coming from a different client other than the one >> that initiated the session. > Exactly, that's what my cookie filter does. And that's what most websites does. Ever tried to access Facebook from the Tor network? :) Regards! -- Esteban. ps: I love authentication as domain, so I'll help think about this if you decide to go for it :D From emaringolo at gmail.com Sat Oct 3 16:17:57 2015 From: emaringolo at gmail.com (Esteban A. Maringolo) Date: Sat Oct 3 16:18:38 2015 Subject: [Seaside] Session tracking without URL field yet supporting "multi session" In-Reply-To: References: <676551CF-F27A-4DCB-90C4-46DFAFC2EDF8@inceptive.be> Message-ID: 2015-10-03 13:14 GMT-03:00 Esteban A. Maringolo : > Local storage is just a dictionary, and it will be readable by ANY > user of the browser, so it is very much like Cookies in this sense, > with the added part of requiring to recover the session token from it > before performing any HTTP request, and being recoverable not only by > your site, but with anybody > with access to the browser. I meant, via XSS. Cookies and localStorage are secured by origin. From marianopeck at gmail.com Sat Oct 3 16:48:20 2015 From: marianopeck at gmail.com (Mariano Martinez Peck) Date: Sat Oct 3 16:48:23 2015 Subject: [Seaside] Session tracking without URL field yet supporting "multi session" In-Reply-To: References: <676551CF-F27A-4DCB-90C4-46DFAFC2EDF8@inceptive.be> Message-ID: Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: WAQueryFieldAndCookieTrackingStrategy.st Type: application/octet-stream Size: 6978 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/seaside/attachments/20151003/81362d1a/WAQueryFieldAndCookieTrackingStrategy.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: WASessionCookieProtectionFilter.st Type: application/octet-stream Size: 1967 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/seaside/attachments/20151003/81362d1a/WASessionCookieProtectionFilter.obj From philippe.marschall at gmail.com Sun Oct 4 16:02:12 2015 From: philippe.marschall at gmail.com (Philippe Marschall) Date: Sun Oct 4 16:02:15 2015 Subject: [Seaside] "expired session" vs "expired document halder" In-Reply-To: References: Message-ID: On Fri, Oct 2, 2015 at 6:16 PM, Mariano Martinez Peck wrote: > Hi guys, > > I am developing my own seaside session tracking subclass > WAHandlerTrackingStrategy (which uses cookies but in a different way) but I > am finding problems to understand a couple of comments and code I found > around. For example: > > "Don't delete the session cookie if we have an expired document halder. > Only delete the session cookie if we actually have an expired session." > > And: > > As ususal care has to be taken that this is done only for expired sessions > and not for expired document handlers > > And: > > Some tracking methods may not be appropriate for some kinds of handlers > (eg. a WADocumentHandler should never be tracked using a cookie). Some > requests may have multiple keys (eg. a query field for a WADocumentHandler > and a cookie for a WASession). > > > So.. I am not sure what does mean. I am interested in tracking SESSIONS, not > document handlers. And I must clean stuff at session expiration only. I > don't know what the document handler expiration is about nor how to > distinguish it from session expiration. So then I cannot know when to clean > and when to not clean. > > > Any clarification? Document handlers are dynamically created document handlers are dynamically created request handlers whenever you send one of the #document: messages to an anchor or image. Since Seaside 3.1 this is very much simplified because document handlers are no longer tracked within WAApplication alongside session but are now tracked by the session itself. Therefore in Seaside 3.1 a tracking strategy on WAApplication only deals with session. Cheers Philippe From marianopeck at gmail.com Mon Oct 5 13:28:34 2015 From: marianopeck at gmail.com (Mariano Martinez Peck) Date: Mon Oct 5 13:28:36 2015 Subject: [Seaside] Session tracking without URL field yet supporting "multi session" In-Reply-To: References: <676551CF-F27A-4DCB-90C4-46DFAFC2EDF8@inceptive.be> Message-ID: Hi Esteban, OK the "problem" I told you in below email is easily changing WAQueryFieldAndCookieTrackingStrategy >> sessionsSeparator to use $& instead. Now Philip answered me that in 3.1 WAHandlerTrackingStrategy is only used for session tracking, which "solves" another of my questions. So... I think you are ready to take a look if you want to. Feedback is welcome! On Sat, Oct 3, 2015 at 1:48 PM, Mariano Martinez Peck wrote: > Hi Esteban, > > OK.... I did a VERY QUICK pass on the code in order to send it. Note that > it hasn't been tested much, I still have a couple of questions to > solve/discuss, etc. Also, for some reason I did not have yet the time to > debug, it seems that sometimes at login time, the filter tells you are > forbidden (the validation failed), but then you try again and it > works...should be something simple to fix. Anyway, I am attaching the code > now as is if you want to take an early view. Otherwise by Monday/Thuesday I > hope I could have something better. > > Note also that this is the first time I deal with authentication, cookies, > etc, so it may not be the best code ;) > > Improvements and feedback is welcome! Please read the class comment of > both classes attached. > > Thanks, > > > > On Sat, Oct 3, 2015 at 1:17 PM, Esteban A. Maringolo > wrote: > >> 2015-10-03 13:14 GMT-03:00 Esteban A. Maringolo : >> > Local storage is just a dictionary, and it will be readable by ANY >> > user of the browser, so it is very much like Cookies in this sense, >> > with the added part of requiring to recover the session token from it >> > before performing any HTTP request, and being recoverable not only by >> > your site, but with anybody >> > with access to the browser. >> >> I meant, via XSS. Cookies and localStorage are secured by origin. >> _______________________________________________ >> seaside mailing list >> seaside@lists.squeakfoundation.org >> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside >> > > > > -- > 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/20151005/a63a8921/attachment.htm From ma.chris.m at gmail.com Thu Oct 8 21:48:43 2015 From: ma.chris.m at gmail.com (Chris Muller) Date: Thu Oct 8 21:49:25 2015 Subject: [Seaside] how to render access to a JS argument variable? Message-ID: Hi all, by using a process of "simplifying until it works" I think I'm slowly "getting it". However, now I've arrived at something very simple which isn't working, and I don't know what I'm doing wrong. Can someone tell me whats wrong with this Javascript that I'm getting the message "Uncaught SyntaxError: Unexpected token ("? my content Here's the code I'm using to render the above: html span class: 'PufMessageWidget' ; id: (self assureHtmlIdUsing: html) ; onClick: ((html javascript logger call: 'log' with: 'event') asFunction: #('event')). And, this leads to my second question. Even if the script above didn't cause a SyntaxError, I want to log the event *variable* in the console, not the string "event". Any help is greatly appreciated.. PS -- Okay, I just noticed if I don't pass the #asFunction: #('event'), I get 'event' in the console without any SyntaxErrors. But, clearly, what I'm wanting to do should work should't it? From asqueaker at gmail.com Fri Oct 9 01:46:12 2015 From: asqueaker at gmail.com (Chris Muller) Date: Fri Oct 9 01:46:13 2015 Subject: [Seaside] how to render access to a JS argument variable? In-Reply-To: References: Message-ID: Found something. JSAlias. > html span > class: 'PufMessageWidget' ; > id: (self assureHtmlIdUsing: html) ; > onClick: ((html javascript logger call: 'log' with: 'event') > asFunction: #('event')). I gave up on onClick: since I guess its better to set up event bindings through jQuery's API. This binding does what I want, no syntax error. html script defer with: ((html jQuery id: (self assureHtmlIdUsing: html)) onClick: ((html javascript logger call: 'log' with: (html javascript alias: 'event')) asFunction: #('event'))). It seems like a pretty wordy way to write console.log(event), but the intent reads clearly so, that's good.. From johan at inceptive.be Fri Oct 9 07:25:24 2015 From: johan at inceptive.be (Johan Brichau) Date: Fri Oct 9 07:25:28 2015 Subject: [Seaside] how to render access to a JS argument variable? In-Reply-To: References: Message-ID: Hi Chris, I notice you figured out the use of #alias: Use the JS generation facilities only when you need to *generate* code. For example, to embed a server-side callback or, in general, when the code can only be dynamically constructed. In your case, I would do the following: (JSStream on: ?console.log(event)?) Just because you can write it in Smalltalk does not mean you should :) Johan ps: your contributions are in my inbox, I will process them asap > On 09 Oct 2015, at 03:46, Chris Muller wrote: > > Found something. JSAlias. > >> html span >> class: 'PufMessageWidget' ; >> id: (self assureHtmlIdUsing: html) ; >> onClick: ((html javascript logger call: 'log' with: 'event') >> asFunction: #('event')). > > I gave up on onClick: since I guess its better to set up event > bindings through jQuery's API. This binding does what I want, no > syntax error. > > html script defer with: > ((html jQuery id: (self assureHtmlIdUsing: html)) onClick: > ((html javascript logger call: 'log' with: (html > javascript alias: 'event')) asFunction: #('event'))). > > It seems like a pretty wordy way to write console.log(event), but the > intent reads clearly so, that's good.. > _______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside From asqueaker at gmail.com Fri Oct 9 21:52:40 2015 From: asqueaker at gmail.com (Chris Muller) Date: Fri Oct 9 21:52:42 2015 Subject: [Seaside] how to render access to a JS argument variable? In-Reply-To: References: Message-ID: Thanks Johan, that's the kind of advice I need, as there are many ways to do things. Now, I am stumped (for hours!) on another very similar problem, except instead of a single variable, I simply want to pass an argument of type "jQuery" into jQuery's replaceWith() function, called within a onClick handler method. So, in my renderContentOn:, I wrote: | ajaxRequest | ajaxRequest := (html jQuery post url: html actionUrl; dataType: 'html') html: [ : replaceHtml | self invoke. replaceHtml render: resultWidget ]. .... html script defer with: ((html jQuery id: buttonId) onClick: ((html jQuery id: replacementId) replaceWith: ajaxRequest asJavascript) asFunction). However, as before, the argument to replaceWith() is being rendered as a Javascript string literal instead of the code itself. (See red quotes, below, I want it to stop rendering those quotes!). $("#id3").click(function(){$("#id4").replaceWith(*"* $.post("/puf",["_s=C8vA8l5UNoUsGTpf","_k=B_Wk6EYdovACqAgV","2"].join("&"),"html") *"*)}) I tried many different variations, no success. This must be something simple... Thank you. On Fri, Oct 9, 2015 at 2:25 AM, Johan Brichau wrote: > Hi Chris, > > I notice you figured out the use of #alias: > > Use the JS generation facilities only when you need to *generate* code. > For example, to embed a server-side callback or, in general, when the code > can only be dynamically constructed. > In your case, I would do the following: > > (JSStream on: ?console.log(event)?) > > Just because you can write it in Smalltalk does not mean you should :) > > Johan > > ps: your contributions are in my inbox, I will process them asap > > > On 09 Oct 2015, at 03:46, Chris Muller wrote: > > > > Found something. JSAlias. > > > >> html span > >> class: 'PufMessageWidget' ; > >> id: (self assureHtmlIdUsing: html) ; > >> onClick: ((html javascript logger call: 'log' with: 'event') > >> asFunction: #('event')). > > > > I gave up on onClick: since I guess its better to set up event > > bindings through jQuery's API. This binding does what I want, no > > syntax error. > > > > html script defer with: > > ((html jQuery id: (self assureHtmlIdUsing: html)) onClick: > > ((html javascript logger call: 'log' with: (html > > javascript alias: 'event')) asFunction: #('event'))). > > > > It seems like a pretty wordy way to write console.log(event), but the > > intent reads clearly so, that's good.. > > _______________________________________________ > > 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/20151009/dd7c77cd/attachment-0001.htm From asqueaker at gmail.com Fri Oct 9 22:14:53 2015 From: asqueaker at gmail.com (Chris Muller) Date: Fri Oct 9 22:14:55 2015 Subject: [Seaside] how to render access to a JS argument variable? In-Reply-To: References: Message-ID: Wow, all I need to do is work up an email question, and it seems to lead myself to a solution! :-) In this case, I can't use JQueryInstance>>#replaceWith: only lets the user pass a String argument, not a jQuery argument. Because the version of JSObject>>#render: always returns a String no matter what, which will never let a JSObject subclass render its code onto the stream. Strange! And, so, the solution was to #call: 'replaceWith' with: myJQPost myself. Here is the code, for comparison to the original: html script defer with: ((html jQuery id: buttonId) onClick: ((html jQuery id: replacementId) call: 'replaceWith' with: ajaxRequest) asFunction). I think this is slowing my learning of Seaside -- the thought that I should be able to use all the convenience methods and get all the power of JQuery, but, in fact, some of these methods provide no way to render the other versions of the jQuery calls which take different argument types. Only the string types are supported. Am I right about this? Another example is the "data" argument of a $.ajax(...) request. Seaside renders a Javascript array, but then calls .join("&") on it! Strings only.... :( On Fri, Oct 9, 2015 at 4:52 PM, Chris Muller wrote: > Thanks Johan, that's the kind of advice I need, as there are many ways to > do things. > > Now, I am stumped (for hours!) on another very similar problem, except > instead of a single variable, I simply want to pass an argument of type > "jQuery" into jQuery's replaceWith() function, called within a onClick > handler method. So, in my renderContentOn:, I wrote: > > | ajaxRequest | > ajaxRequest := (html jQuery post > url: html actionUrl; > dataType: 'html') html: [ : replaceHtml | self invoke. > replaceHtml render: resultWidget ]. > .... > html script defer with: > ((html jQuery id: buttonId) onClick: > ((html jQuery id: replacementId) replaceWith: ajaxRequest > asJavascript) asFunction). > > However, as before, the argument to replaceWith() is being rendered as a > Javascript string literal instead of the code itself. (See red quotes, > below, I want it to stop rendering those quotes!). > > $("#id3").click(function(){$("#id4").replaceWith(*"* > $.post("/puf",["_s=C8vA8l5UNoUsGTpf","_k=B_Wk6EYdovACqAgV","2"].join("&"),"html") > *"*)}) > > I tried many different variations, no success. This must be something > simple... > > Thank you. > > On Fri, Oct 9, 2015 at 2:25 AM, Johan Brichau wrote: > >> Hi Chris, >> >> I notice you figured out the use of #alias: >> >> Use the JS generation facilities only when you need to *generate* code. >> For example, to embed a server-side callback or, in general, when the code >> can only be dynamically constructed. >> In your case, I would do the following: >> >> (JSStream on: ?console.log(event)?) >> >> Just because you can write it in Smalltalk does not mean you should :) >> >> Johan >> >> ps: your contributions are in my inbox, I will process them asap >> >> > On 09 Oct 2015, at 03:46, Chris Muller wrote: >> > >> > Found something. JSAlias. >> > >> >> html span >> >> class: 'PufMessageWidget' ; >> >> id: (self assureHtmlIdUsing: html) ; >> >> onClick: ((html javascript logger call: 'log' with: 'event') >> >> asFunction: #('event')). >> > >> > I gave up on onClick: since I guess its better to set up event >> > bindings through jQuery's API. This binding does what I want, no >> > syntax error. >> > >> > html script defer with: >> > ((html jQuery id: (self assureHtmlIdUsing: html)) onClick: >> > ((html javascript logger call: 'log' with: (html >> > javascript alias: 'event')) asFunction: #('event'))). >> > >> > It seems like a pretty wordy way to write console.log(event), but the >> > intent reads clearly so, that's good.. >> > _______________________________________________ >> > 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/20151009/00403652/attachment.htm From johan at inceptive.be Mon Oct 12 07:49:05 2015 From: johan at inceptive.be (Johan Brichau) Date: Mon Oct 12 07:49:00 2015 Subject: [Seaside] how to render access to a JS argument variable? In-Reply-To: References: Message-ID: <945A71C8-2FC8-4FA5-9D6B-ADACA359439D@inceptive.be> Hi Chris, jQuery?s replaceWith accepts either an html string or a javascript function. I believe this is also true for the Seaside binding implementation. Does the following code not do what you want? html script defer with: ((html jQuery id: buttonId) onClick: ((html jQuery id: replacementId) call: 'replaceWith' with: ajaxRequest asFunction)). The JSObject>>render: method should always produce a string, as it is called when the object needs to be rendered on a stream. It does not produce a ?javascript string?. What you want is to construct a function and give it as an argument to the replaceWith function (see code above). Imho, that should work. Johan > On 10 Oct 2015, at 00:14, Chris Muller wrote: > > Wow, all I need to do is work up an email question, and it seems to lead myself to a solution! :-) In this case, I can't use JQueryInstance>>#replaceWith: only lets the user pass a String argument, not a jQuery argument. Because the version of JSObject>>#render: always returns a String no matter what, which will never let a JSObject subclass render its code onto the stream. Strange! > > And, so, the solution was to #call: 'replaceWith' with: myJQPost myself. Here is the code, for comparison to the original: > > html script defer with: > ((html jQuery id: buttonId) onClick: > ((html jQuery id: replacementId) call: 'replaceWith' with: ajaxRequest) asFunction). > > I think this is slowing my learning of Seaside -- the thought that I should be able to use all the convenience methods and get all the power of JQuery, but, in fact, some of these methods provide no way to render the other versions of the jQuery calls which take different argument types. Only the string types are supported. Am I right about this? > > Another example is the "data" argument of a $.ajax(...) request. Seaside renders a Javascript array, but then calls .join("&") on it! Strings only.... :( > > > On Fri, Oct 9, 2015 at 4:52 PM, Chris Muller > wrote: > Thanks Johan, that's the kind of advice I need, as there are many ways to do things. > > Now, I am stumped (for hours!) on another very similar problem, except instead of a single variable, I simply want to pass an argument of type "jQuery" into jQuery's replaceWith() function, called within a onClick handler method. So, in my renderContentOn:, I wrote: > > | ajaxRequest | > ajaxRequest := (html jQuery post > url: html actionUrl; > dataType: 'html') html: [ : replaceHtml | self invoke. replaceHtml render: resultWidget ]. > .... > html script defer with: > ((html jQuery id: buttonId) onClick: > ((html jQuery id: replacementId) replaceWith: ajaxRequest asJavascript) asFunction). > > However, as before, the argument to replaceWith() is being rendered as a Javascript string literal instead of the code itself. (See red quotes, below, I want it to stop rendering those quotes!). > > $("#id3").click(function(){$("#id4").replaceWith("$.post("/puf",["_s=C8vA8l5UNoUsGTpf","_k=B_Wk6EYdovACqAgV","2"].join("&"),"html")")}) > > I tried many different variations, no success. This must be something simple... > > Thank you. > > On Fri, Oct 9, 2015 at 2:25 AM, Johan Brichau > wrote: > Hi Chris, > > I notice you figured out the use of #alias: > > Use the JS generation facilities only when you need to *generate* code. For example, to embed a server-side callback or, in general, when the code can only be dynamically constructed. > In your case, I would do the following: > > (JSStream on: ?console.log(event)?) > > Just because you can write it in Smalltalk does not mean you should :) > > Johan > > ps: your contributions are in my inbox, I will process them asap > > > On 09 Oct 2015, at 03:46, Chris Muller > wrote: > > > > Found something. JSAlias. > > > >> html span > >> class: 'PufMessageWidget' ; > >> id: (self assureHtmlIdUsing: html) ; > >> onClick: ((html javascript logger call: 'log' with: 'event') > >> asFunction: #('event')). > > > > I gave up on onClick: since I guess its better to set up event > > bindings through jQuery's API. This binding does what I want, no > > syntax error. > > > > html script defer with: > > ((html jQuery id: (self assureHtmlIdUsing: html)) onClick: > > ((html javascript logger call: 'log' with: (html > > javascript alias: 'event')) asFunction: #('event'))). > > > > It seems like a pretty wordy way to write console.log(event), but the > > intent reads clearly so, that's good.. > > _______________________________________________ > > 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/20151012/14b29422/attachment-0001.htm From damien.cassou at inria.fr Tue Oct 13 04:32:44 2015 From: damien.cassou at inria.fr (Damien Cassou) Date: Tue Oct 13 04:32:48 2015 Subject: [Seaside] The SushiShop Message-ID: <87bnc3bd77.fsf@inria.fr> Hi, is the SushiShop Seaside example application still available anywhere? Is there a modern version somewhere? Thanks -- Damien Cassou http://damiencassou.seasidehosting.st "Success is the ability to go from one failure to another without losing enthusiasm." --Winston Churchill From philippe.marschall at gmail.com Tue Oct 13 14:37:39 2015 From: philippe.marschall at gmail.com (Philippe Marschall) Date: Tue Oct 13 14:38:00 2015 Subject: [Seaside] The SushiShop In-Reply-To: <87bnc3bd77.fsf@inria.fr> References: <87bnc3bd77.fsf@inria.fr> Message-ID: On Tue, Oct 13, 2015 at 6:32 AM, Damien Cassou wrote: > Hi, > > is the SushiShop Seaside example application still available anywhere? Sure, the store project from [1] > Is there a modern version somewhere? I don't know. It looks as if some people have been working on it. [1] http://www.squeaksource.com/SeasideExamples.html Cheers Philippe From ma.chris.m at gmail.com Tue Oct 13 19:04:04 2015 From: ma.chris.m at gmail.com (Chris Muller) Date: Tue Oct 13 19:04:46 2015 Subject: [Seaside] how to render access to a JS argument variable? In-Reply-To: <945A71C8-2FC8-4FA5-9D6B-ADACA359439D@inceptive.be> References: <945A71C8-2FC8-4FA5-9D6B-ADACA359439D@inceptive.be> Message-ID: Hi, > jQuery?s replaceWith accepts either an html string or a javascript function. I was looking at the JQuery API at http://api.jquery.com/replaceWith which says it can take a "htmlString or Element or Array or jQuery", OR a Function. I mistakenly thought Seasides helper methods could support all the types. They don't. > I believe this is also true for the Seaside binding implementation. > Does the following code not do what you want? > > html script defer with: > ((html jQuery id: buttonId) onClick: > ((html jQuery id: replacementId) call: 'replaceWith' with: > ajaxRequest asFunction)). Yes, call:with: does. I was just suprised that Seaside's helper method, JQueryInstance>>#replaceWith: can only support the htmlString argument variation, not Element nor Array nor jQuery nor Function. For those, one must write the #call:with: variation. Given all the other ways Seaside lets me write terse code, I was fooled for an entire afternoon into thinking I could shoe-horn it in via replaceWith: helper method. :/ > The JSObject>>render: method should always produce a string, as it is called > when the object needs to be rendered on a stream. It does not produce a > ?javascript string?. Hm, looking closely, it seems like replaceWith: does only ever produce a javascript string. By the implementation passing in a String from render:: self call: 'someFunction' with: (self render: aRenderable) and by call:with: implemented as: self call: aString withArguments: (Array with: anObject) then what we get for the withArguments: is always an Array of one String, which is rendered in double-quotes as a javascript "string". It seems like if the replaceWith: were implemented as: self call 'replaceWith' with: aRenderable then maybe they could support all the argument variations specified at api.jquery.com, and not only the String variations. And, indeed, the *vast majority* of senders of call:with: simply pass the argument directly, thus truly providing merely the syntactic sugar and nothing more.. But, for some reason, #after:, #append:, #before:, #html:, #prepend:, #replaceWith:, #wrap:, #wrapAll:, #wrapInner: all have that (self render: aRenderable) which forces the String arg... From johan at inceptive.be Wed Oct 14 11:40:31 2015 From: johan at inceptive.be (Johan Brichau) Date: Wed Oct 14 11:40:34 2015 Subject: [Seaside] how to render access to a JS argument variable? In-Reply-To: References: <945A71C8-2FC8-4FA5-9D6B-ADACA359439D@inceptive.be> Message-ID: <612D1A38-9BDA-411C-8FB6-E0CC466E11ED@inceptive.be> Hi Chris, You are right, I was looking at the wrong places and responded too quickly. > It seems like if the replaceWith: were implemented as: > > self call 'replaceWith' with: aRenderable > > then maybe they could support all the argument variations specified at > api.jquery.com, and not only the String variations. True, but that will break the most common use of those methods: passing in a Smalltalk block or a Seaside component (i.e. any Renderable). Somehow, your use case has never popped up before, but it?s interesting to see if we could make that work. The JSObject>>render:on: is used when the script is actually rendered in the html, so it seems difficult to change it there. Instead of ommitting the call to #render: from #replaceWith:, I?m guessing a different method needs to be introduced which renders any renderable but does nothing with a JSObject. We can try... > And, indeed, the *vast majority* of senders of call:with: simply pass > the argument directly, thus truly providing merely the syntactic sugar > and nothing more.. But, for some reason, #after:, #append:, #before:, > #html:, #prepend:, #replaceWith:, #wrap:, #wrapAll:, #wrapInner: all > have that (self render: aRenderable) which forces the String arg... If I understand what you are trying to do in the example snippets, the typical way we would write this in the Seaside binding is like this: (html jQuery id: buttonId) onClick: (html jQuery ajax script: [:s | s << ((s jQuery id: replacementId) replaceWith: resultWidget) ]) cheers Johan From dtrussardi at tiscali.it Thu Oct 15 12:23:48 2015 From: dtrussardi at tiscali.it (dtrussardi@tiscali.it) Date: Thu Oct 15 12:23:50 2015 Subject: [Seaside] Progress bar for database query Message-ID: Ciao, i have a seaside application with some user interface. Now i have one specific user request for query the database. This request required some long time on the server before answer. My goal is to : a) display a progress bar when the user submit this query b) block the web user request until the server answer the data query result How i can implemented this solution? Thank for any considerations. Dario From philippe.marschall at gmail.com Thu Oct 15 12:39:14 2015 From: philippe.marschall at gmail.com (Philippe Marschall) Date: Thu Oct 15 12:39:16 2015 Subject: [Seaside] Progress bar for database query In-Reply-To: References: Message-ID: On Thu, Oct 15, 2015 at 2:23 PM, dtrussardi@tiscali.it wrote: > Ciao, > > i have a seaside application with some user interface. > > Now i have one specific user request for query the database. > > This request required some long time on the server before answer. > > My goal is to : > > a) display a progress bar when the user submit this query > > b) block the web user request until the server answer the data query result > > > How i can implemented this solution? This is quite tricky, I would rather try to speed up the database query ;-) First there's the question of how you get the progress of the query itself. If you don't know in advance how may rows you expect or it's a query that doesn't return a result (like an update) this can get tricky. You could try to run and parse an EXPLAIN to get a guesstimate of how many rows you will get. Or some databases allow you to check to progress of a query in a different session. Then there's the question of sending the progress updates to the client. If you're on Zinc you can use it's WebSockets support. If you're not and your sever adaptor supports flushing you can try to implement Sever Sent Events. Cheers Philippe From dtrussardi at tiscali.it Thu Oct 15 13:11:04 2015 From: dtrussardi at tiscali.it (dtrussardi@tiscali.it) Date: Thu Oct 15 13:11:09 2015 Subject: [Seaside] Progress bar for database query In-Reply-To: References: Message-ID: <0F3AF34A-0D78-4AC3-8171-86EAE17C4366@tiscali.it> Thanks Philippe, > On Thu, Oct 15, 2015 at 2:23 PM, dtrussardi@tiscali.it > wrote: >> Ciao, >> >> i have a seaside application with some user interface. >> >> Now i have one specific user request for query the database. >> >> This request required some long time on the server before answer. >> >> My goal is to : >> >> a) display a progress bar when the user submit this query >> >> b) block the web user request until the server answer the data query result >> >> >> How i can implemented this solution? > > This is quite tricky, I would rather try to speed up the database query ;-) In any case, when the data to elaborate is very big, i have the problem. > > First there's the question of how you get the progress of the query > itself. If you don't know in advance how may rows you expect or it's a > query that doesn't return a result (like an update) this can get > tricky. You could try to run and parse an EXPLAIN to get a guesstimate > of how many rows you will get. Or some databases allow you to check to > progress of a query in a different session. > Then there's the question of sending the progress updates to the > client. If you're on Zinc you can use it's WebSockets support. If > you're not and your sever adaptor supports flushing you can try to > implement Sever Sent Events. I don't need to display the progress bar status of the elaborations. I wrong my request. I need to display the 'elaborations - processing' , that processing is in progress on the server. Something that informs the user about the processing on the server until the answer. Without informations about the specific progress of processing. I hope to explained well. Thanks, Dario -------------- next part -------------- Skipped content of type multipart/related From dale.henrichs at gemtalksystems.com Thu Oct 15 17:06:16 2015 From: dale.henrichs at gemtalksystems.com (Dale Henrichs) Date: Thu Oct 15 17:06:19 2015 Subject: [Seaside] Progress bar for database query In-Reply-To: References: Message-ID: <561FDD08.8070503@gemtalksystems.com> Dario, You should not be blocking the web request while the long running query runs ... this would be an application for a service vm [1] to execute the long running query and then have your browser poll back for progress ... I think the readme for the project explains things pretty clearly ... but you can ask questions on the glass list for more information -- check in the tode directory for some service vm scripts Dale [1] https://github.com/GsDevKit/ServiceVM#servicevm On 10/15/2015 05:23 AM, dtrussardi@tiscali.it wrote: > Ciao, > > i have a seaside application with some user interface. > > Now i have one specific user request for query the database. > > This request required some long time on the server before answer. > > My goal is to : > > a) display a progress bar when the user submit this query > > b) block the web user request until the server answer the data query result > > > How i can implemented this solution? > > Thank for any considerations. > > > Dario > > _______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside From marianopeck at gmail.com Thu Oct 15 19:26:53 2015 From: marianopeck at gmail.com (Mariano Martinez Peck) Date: Thu Oct 15 19:26:56 2015 Subject: [Seaside] Re: Cannot load Seaside anymore in a just-migrated GemStone [WAS] Re: [Glass] Zinc 2.4.3 on Gemstone In-Reply-To: References: Message-ID: On Thu, Oct 15, 2015 at 4:25 PM, Mariano Martinez Peck < marianopeck@gmail.com> wrote: > Hi guys, > > I have a weird scenario I cannot solve. I am trying to load my app code > (together with all it's dependencies) in a just migrated stone (from > GemStone 3.1.0.4 to GemStone 3.2.9). I performed all the steps of the > migration. Yet, I have an error, pasted below. However, if I run the same > code to load my app in a fresh 3.2.9 extent, that works perfectly. It only > fails in my migrated (from 3.1.0.4) stone. > > The problem is in > > WAWalkbackErrorHandler class >> initialize > WAAdmin applicationExceptionHandlingDefaults at: #exceptionHandler put: > self > > It fails because the > > WAConfiguration >> attributeAt: aSymbol > ^ self attributeAt: aSymbol ifAbsent: [ WAAttributeNotFound signalWithKey: > aSymbol ] > > gives a key not found. > > I did a search in the mailing list and found related threads: > > http://forum.world.st/Glass-Zinc-2-4-3-on-Gemstone-td4759789.html#a4759875 > https://github.com/seasidest/seaside/issues/643 > > But none show a solution. > > And yes, it is obvious it will fail because: > > WAAdmin applicationExceptionHandlingDefaults allAttributes -> > anIdentityDictionary( ) > > Also, as you can see, the result of WAAdmin > applicationExceptionHandlingDefaults has no parent or anything: > > Inspect aWASharedConfiguration/ > -------------------- > . -> aWASharedConfiguration > (class)@ -> WASharedConfiguration > (oop)@ -> 1169561601 > (committed)@ -> true > cachedSearchContexts@ -> anIdentityDictionary( > #'exceptionHandler'->aWAAttributeSearchContext) > expressions@ -> aDictionary( ) > name@ -> 'Application Exception Handling Defaults' > parents@ -> anOrderedCollection( ) > > > I even tried the re-initialization of Seaside as provided by Bruno the > other day: > > WAAdmin unregister: 'reps'. > WAAdmin unregister: 'advisors'. > WAAdmin unregister: 'clients'. > > WAGemStoneProductionErrorHandler initialize. > WAWalkbackErrorHandler initialize. > WARemoteDebuggingWalkbackErrorHandler initialize. > > [ > WADispatcher default. > WASystemConfiguration allSubclasses > do: [ :each | each instance buildDescription ] ] > ensure: [ System commitTransaction ] . > > > Still, same error. > > > Any clues? Is there way I can re-initialize all Seaside? > > > This is the stack: > > aTDDebugger > -------------------- > 1. WAAttributeNotFound(AbstractException)>>_signalWith: @6 line 25 > 2. WAAttributeNotFound(AbstractException)>>signal @2 line 47 > 3. WAAttributeNotFound class>>signalWithKey: @4 line 4 > 4. [] in ExecBlock0(WAConfiguration)>>attributeAt: @2 line 2 > 5. IdentityDictionary>>at:ifAbsent: @5 line 8 > 6. WASharedConfiguration(WAConfiguration)>>attributeAt:ifAbsent: @3 line 2 > 7. WASharedConfiguration(WAConfiguration)>>attributeAt: @2 line 2 > 8. WASharedConfiguration(WAUserConfiguration)>>at:put: @2 line 7 > 9. WAWalkbackErrorHandler class>>initialize @3 line 2 > 10. MCMethodDefinition>>postload @11 line 6 > 11. MCMethodDefinition(MCDefinition)>>postloadOver: @2 line 2 > 12. [] in MCPackageLoader>>basicLoad @3 line 48 > 13. OrderedCollection(Collection)>>do: @5 line 10 > 14. OrderedCollection(Collection)>>do:displayingProgress: @2 line 3 > 15. [] in MCPackageLoader>>basicLoad @15 line 48 > 16. MCPackageLoader(ExecBlock)>>on:do: @3 line 42 > 17. [] in MCPackageLoader>>basicLoad @2 line 49 > 18. MCPackageLoader(ExecBlock)>>ensure: @2 line 12 > 19. MCPackageLoader>>basicLoad @11 line 51 > 20. [] in MCPackageLoader>>loadWithNameLike: @2 line 4 > 21. [] in ExecBlock0(MCPackageLoader)>>useChangeSetNamed:during: @2 line 9 > 22. ExecBlock0(ExecBlock)>>ensure: @2 line 12 > 23. MCPackageLoader>>useChangeSetNamed:during: @9 line 9 > 24. MCPackageLoader>>useNewChangeSetNamedLike:during: @3 line 2 > 25. MCPackageLoader>>loadWithNameLike: @6 line 4 > 26. MCVersionLoader>>load @9 line 6 > 27. MetacelloGoferLoad(GoferLoad)>>execute @6 line 3 > 28. [] in > MetacelloLoadingMCSpecLoader(MetacelloCommonMCSpecLoader)>>loadPackageDirective:gofer: > @5 line 17 > 29. [] in > MetacelloLoadingMCSpecLoader(MetacelloCommonMCSpecLoader)>>loadPackageDirective:gofer: > @14 line 21 > 30. MetacelloGemStonePlatform(MetacelloPlatform)>>do:displaying: @2 line 3 > 31. > MetacelloLoadingMCSpecLoader(MetacelloCommonMCSpecLoader)>>loadPackageDirective:gofer: > @7 line 5 > 32. > MetacelloLinearLoadDirective(MetacelloVersionLoadDirective)>>loadPackageDirective:gofer: > @4 line 4 > 33. MetacelloPackageLoadDirective>>loadUsing:gofer: @2 line 3 > 34. [] in > ExecBlock1(MetacelloVersionLoadDirective)>>loadLinearLoadDirective:gofer: > @2 line 3 > 35. OrderedCollection(Collection)>>do: @5 line 10 > 36. > MetacelloLinearLoadDirective(MetacelloVersionLoadDirective)>>loadLinearLoadDirective:gofer: > @3 line 3 > 37. MetacelloLinearLoadDirective>>loadUsing:gofer: @6 line 4 > 38. [] in > ExecBlock1(MetacelloVersionLoadDirective)>>loadLinearLoadDirective:gofer: > @2 line 3 > 39. OrderedCollection(Collection)>>do: @5 line 10 > 40. > MetacelloLinearLoadDirective(MetacelloVersionLoadDirective)>>loadLinearLoadDirective:gofer: > @3 line 3 > 41. MetacelloLinearLoadDirective>>loadUsing:gofer: @6 line 4 > 42. [] in > ExecBlock1(MetacelloVersionLoadDirective)>>loadLinearLoadDirective:gofer: > @2 line 3 > 43. OrderedCollection(Collection)>>do: @5 line 10 > 44. > MetacelloLinearLoadDirective(MetacelloVersionLoadDirective)>>loadLinearLoadDirective:gofer: > @3 line 3 > 45. MetacelloLinearLoadDirective>>loadUsing:gofer: @6 line 4 > 46. [] in > ExecBlock1(MetacelloVersionLoadDirective)>>loadLinearLoadDirective:gofer: > @2 line 3 > 47. OrderedCollection(Collection)>>do: @5 line 10 > 48. > MetacelloLinearLoadDirective(MetacelloVersionLoadDirective)>>loadLinearLoadDirective:gofer: > @3 line 3 > 49. MetacelloLinearLoadDirective>>loadUsing:gofer: @6 line 4 > 50. [] in > ExecBlock1(MetacelloVersionLoadDirective)>>loadLinearLoadDirective:gofer: > @2 line 3 > 51. OrderedCollection(Collection)>>do: @5 line 10 > 52. > MetacelloLinearLoadDirective(MetacelloVersionLoadDirective)>>loadLinearLoadDirective:gofer: > @3 line 3 > 53. MetacelloLinearLoadDirective>>loadUsing:gofer: @6 line 4 > 54. > MetacelloLinearLoadDirective(MetacelloVersionLoadDirective)>>loadWithPolicy: > @7 line 7 > 55. MetacelloLoaderPolicy>>load @6 line 4 > 56. MetacelloFetchingMCSpecLoader>>doLoad @4 line 3 > 57. [] in ExecBlock0(MetacelloMCVersion)>>doLoadRequiredFromArray: @2 line > 12 > 58. MetacelloGemStonePlatform(MetacelloPlatform)>>do:displaying: @2 line 3 > 59. [] in MetacelloMCVersion>>doLoadRequiredFromArray: @7 line 12 > 60. MetacelloMCVersion(ExecBlock)>>ensure: @2 line 12 > 61. MetacelloMCVersion>>doLoadRequiredFromArray: @22 line 16 > 62. Array(Collection)>>loadRequiredForMetacelloMCVersion: @2 line 3 > 63. MetacelloMCVersion>>load: @2 line 3 > 64. [] in MetacelloScriptEngine>>load:onProjectDownGrade:onProjectUpgrade: > @10 line 16 > 65. MetacelloScriptEngine(ExecBlock)>>on:do: @3 line 42 > 66. [] in MetacelloScriptEngine>>handleNotificationsForAction: @6 line 6 > 67. MetacelloScriptEngine(ExecBlock)>>on:do: @3 line 42 > 68. [] in MetacelloScriptEngine>>handleNotificationsForAction: @4 line 14 > 69. MetacelloScriptEngine(ExecBlock)>>on:do: @3 line 42 > 70. [] in MetacelloScriptEngine>>handleNotificationsForAction: @2 line 20 > 71. MetacelloScriptEngine(ExecBlock)>>on:do: @3 line 42 > 72. MetacelloScriptEngine>>handleNotificationsForAction: @2 line 24 > 73. [] in MetacelloScriptEngine>>load:onProjectDownGrade:onProjectUpgrade: > @2 line 5 > 74. MetacelloScriptEngine(ExecBlock)>>ensure: @2 line 12 > 75. MetacelloProjectRegistration class>>copyRegistryRestoreOnErrorWhile: > @8 line 14 > 76. MetacelloScriptEngine>>load:onProjectDownGrade:onProjectUpgrade: @2 > line 3 > 77. MetacelloScriptEngine>>load: @2 line 3 > 78. [] in MetacelloScriptApiExecutor(MetacelloScriptExecutor)>>execute: > @11 line 15 > 79. [] in MetacelloScriptApiExecutor>>executeString:do: @5 line 6 > 80. Array(Collection)>>do: @5 line 10 > 81. MetacelloScriptApiExecutor>>executeString:do: @6 line 4 > 82. String>>execute:against: @2 line 2 > 83. MetacelloScriptApiExecutor(MetacelloScriptExecutor)>>execute: @6 line 9 > 84. Metacello>>execute:args: @8 line 5 > 85. Metacello>>load: @2 line 2 > 86. [] in Executed Code > 87. ExecBlock0(ExecBlock)>>ensure: @2 line 12 > 88. Executed Code > 89. String(CharacterCollection)>>evaluateIn:symbolList:literalVars: @4 > line 13 > 90. > TDWorkspaceClientElementBuilder(TDClientSourceElementBuilder)>>evaluateString: > @5 line 3 > 91. > TDWorkspaceClientElementBuilder(TDClientSourceElementBuilder)>>doItMenuAction:selectedText: > @2 line 2 > 92. > TDWorkspaceClientElementBuilder(TDWindowBuilder)>>handleMenuActions:listElement:actionArg: > @12 line 10 > 93. [] in > TDWorkspaceClientElementBuilder(TDClientSourceElementBuilder)>>menuActionBlock > @6 line 8 > 94. > TDWorkspaceClientElementBuilder(ExecBlock)>>value:value:value:value:value: > @2 line 11 > 95. GsNMethod class>>_gsReturnToC @1 line 1 > > > Thanks in advance for any help. > > On Thu, Oct 15, 2015 at 1:40 PM, Gerhard Obermann > wrote: > >> Hi, >> >> Not really, i only found the following in my notes. >> >> HTH >> Gerhard >> >> >> >> - >> >> Load Seaside 3.1.x but don?t initialize Seaside Classes >> >> >> | performInitialization | >> >> performInitialization := #(). >> >> [ >> >> GsDeployer deploy: [ Metacello new >> >> baseline: 'Seaside3'; >> >> repository: 'github://glassdb/Seaside31:gemstone3.1/repository'; >> >> load: 'CI']. >> >> ] on: MCPerformPostloadNotification do: [:ex | >> >> (performInitialization includes: ex postloadClass >> theNonMetaClass name) >> >> ifTrue: [ >> >> "perform initialization" >> >> ex resume: true ] >> >> ifFalse: [ >> >> GsFile gciLogServer: ' Skip ', ex postloadClass name >> asString, ' initialization.'. >> >> ex resume: false ] ] >> >> >> On Thu, Oct 15, 2015 at 5:47 PM, Mariano Martinez Peck < >> marianopeck@gmail.com> wrote: >> >>> Hi Gerhard, >>> >>> I am getting the exact same issue. Do you remember what you did to fix >>> it? >>> >>> Thanks, >>> >>> On Wed, May 21, 2014 at 10:39 AM, Gerhard Obermann >>> wrote: >>> >>>> Hi Dale! >>>> >>>> I think as soon as I can load the stuff in my upgraded 3.2. DB, i can >>>> test and contribute to zink and/or Glass / Seaside 3.1. >>>> If it wont work until tomorrow i have to stay on 3.1.0.5 for the next >>>> few months at least. >>>> >>>> At the moment i am trying to load Seaside 3.1.1 with >>>> PS: To be able to load this i have loaded the Baseline packages BaselineOfGLASS1, >>>> BaselineOfSeaside3 , BaselineOfZinc manually from my forked GIT clone. >>>> >>>> GsDeployer deploy: [ >>>> Metacello new >>>> configuration: 'Grease'; >>>> repository: ' >>>> http://www.smalltalkhub.com/mc/Seaside/MetacelloConfigurations/main'; >>>> get. >>>> >>>> "Load Seaside31" >>>> GsDeployer deploy: [ >>>> Metacello new >>>> baseline: 'Seaside3'; >>>> repository: 'github://glassdb/Seaside31:gemstone3.1/repository'; >>>> load: 'CI']. >>>> >>>> >>>> Not sure if i need to load Metacello new >>>> baseline: 'GLASS1'; >>>> repository: 'github://glassdb/glass:master/repository'; >>>> load. >>>> after the upgrade. >>>> >>>> What is the difference between >>>> (ConfigurationOfGLASS project version: '1.0-beta.9.1') load >>>> and >>>> Metacello new >>>> baseline: 'GLASS1'; >>>> repository: 'github://glassdb/glass:master/repository'; >>>> load. >>>> >>>> *The load of the Seaside package failed with the init of * >>>> *WAWalkbackErrorHandler => initialize* >>>> * WAAdmin applicationExceptionHandlingDefaults at: #exceptionHandler >>>> put: self* >>>> >>>> [1] WAAttributeNotFound (AbstractException) >> _signalWith: >>>> inCextensionArg: nil >>>> res: nil >>>> .t1: a WAAttributeNotFound occurred (error 2710) >>>> receiver: a WAAttributeNotFound occurred (error 2710) >>>> [2] WAAttributeNotFound (AbstractException) >> signal >>>> receiver: a WAAttributeNotFound occurred (error 2710) >>>> [3] WAAttributeNotFound class >> signalWithKey: >>>> aSymbol: #'exceptionHandler' >>>> receiver: WAAttributeNotFound >>>> [4] [] in ExecBlock0 (WAConfiguration) >> attributeAt: >>>> aSymbol: #'exceptionHandler' >>>> receiver: nil >>>> [5] IdentityDictionary >> at:ifAbsent: >>>> aKey: #'exceptionHandler' >>>> aBlock: anExecBlock0 >>>> anAssoc: nil >>>> .t1: anExecBlock0 >>>> receiver: anIdentityDictionary( ) >>>> [6] WASharedConfiguration (WAConfiguration) >> attributeAt:ifAbsent: >>>> aSymbol: #'exceptionHandler' >>>> aBlock: anExecBlock0 >>>> receiver: aWASharedConfiguration >>>> [7] WASharedConfiguration (WAConfiguration) >> attributeAt: >>>> aSymbol: #'exceptionHandler' >>>> aSymbol: #'exceptionHandler' >>>> receiver: aWASharedConfiguration >>>> [8] WASharedConfiguration (WAUserConfiguration) >> at:put: >>>> aSymbol: #'exceptionHandler' >>>> anObject: WAWalkbackErrorHandler >>>> receiver: aWASharedConfiguration >>>> [9] WAWalkbackErrorHandler class >> initialize >>>> receiver: WAWalkbackErrorHandler >>>> [10] MCMethodDefinition >> postload >>>> receiver: aMCMethodDefinition(WAWalkbackErrorHandler class>>initialize) >>>> >>>> >>>> Transcript: >>>> Fetched -> FastCGIPool-dkh.2 --- http://seaside.gemstone.com/ss/fastcgi >>>> --- http://seaside.gemstone.com/ss/fastcgiredirecting to >>>> http://seaside.gemtalksystems.com/ss/fastcgi/FastCGI-dkh.33.mcz >>>> >>>> Fetched -> FastCGI-dkh.33 --- http://seaside.gemstone.com/ss/fastcgi >>>> --- http://seaside.gemstone.com/ss/fastcgi >>>> Fetched -> Seaside-Adaptors-FastCGI-dkh.26 --- >>>> github://glassdb/Seaside31:gemstone3.1/repository --- >>>> github://glassdb/Seaside31:gemstone3.1/repository >>>> Loaded -> Grease-Core-JohanBrichau.86 --- >>>> http://www.smalltalkhub.com/mc/Seaside/Grease11/main --- cache >>>> Loaded -> Grease-GemStone-Core-JohanBrichau.52 --- >>>> http://www.smalltalkhub.com/mc/Seaside/Grease11/main --- cache >>>> Evaluated -> Grease-GemStone-Core >> initializeTransactionMutex1051 >>>> Loaded -> Seaside-Core.gemstone-JohanBrichau.815 --- >>>> github://glassdb/Seaside31:gemstone3.1/repository --- cache >>>> Loaded -> Seaside-GemStone300-Core-DaleHenrichs.4 --- >>>> github://glassdb/Seaside31:gemstone3.1/repository --- cache >>>> Loaded -> Seaside-GemStone-Core-JohanBrichau.66 --- >>>> github://glassdb/Seaside31:gemstone3.1/repository --- cache >>>> Loaded -> Seaside-GemStone-Basic-Development-JohanBrichau.29 --- >>>> github://glassdb/Seaside31:gemstone3.1/repository --- cache >>>> Loaded -> Grease-Tests-Core-JohanBrichau.95 --- >>>> http://www.smalltalkhub.com/mc/Seaside/Grease11/main --- cache >>>> Loaded -> Grease-Tests-GemStone-Core-dkh.14 --- >>>> http://www.smalltalkhub.com/mc/Seaside/Grease11/main --- cache >>>> Loaded -> Seaside-Component-pmm.101 --- >>>> github://glassdb/Seaside31:gemstone3.1/repository --- cache >>>> Loaded -> Seaside-Canvas-pmm.127 --- >>>> github://glassdb/Seaside31:gemstone3.1/repository --- cache >>>> Loaded -> Seaside-Email-pmm.25 --- >>>> github://glassdb/Seaside31:gemstone3.1/repository --- cache >>>> Loaded -> Seaside-GemStone-Email-JohanBrichau.14 --- >>>> github://glassdb/Seaside31:gemstone3.1/repository --- cache >>>> Loaded -> Seaside-InternetExplorer-pmm.7 --- >>>> github://glassdb/Seaside31:gemstone3.1/repository --- cache >>>> Loaded -> Seaside-Session.gemstone-JohanBrichau.169 --- >>>> github://glassdb/Seaside31:gemstone3.1/repository --- cache >>>> Loaded -> Seaside-GemStone-Session-DaleHenrichs.3 --- >>>> github://glassdb/Seaside31:gemstone3.1/repository --- cache >>>> Loaded -> Seaside-RenderLoop-pmm.96 --- >>>> github://glassdb/Seaside31:gemstone3.1/repository --- cache >>>> Loaded -> Seaside-Tools-Core.gemstone-dkh.23 --- >>>> github://glassdb/Seaside31:gemstone3.1/repository --- cache >>>> Loaded -> Seaside-Flow-pmm.24 --- >>>> github://glassdb/Seaside31:gemstone3.1/repository --- cache >>>> Loaded -> Seaside-Examples-pmm.24 --- >>>> github://glassdb/Seaside31:gemstone3.1/repository --- cache >>>> Loaded -> Seaside-Widgets-StephanEggermont.35 --- >>>> github://glassdb/Seaside31:gemstone3.1/repository --- cache >>>> Loaded -> Seaside-GemStone-Tools-Production-JohanBrichau.15 --- >>>> github://glassdb/Seaside31:gemstone3.1/repository --- cache >>>> Loaded -> Seaside-Tools-Web-pmm.119 --- >>>> github://glassdb/Seaside31:gemstone3.1/repository --- cache >>>> Loaded -> Seaside-GemStone-Tools-Web-DaleHenrichs.4 --- >>>> github://glassdb/Seaside31:gemstone3.1/repository --- cache >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> On Wed, May 21, 2014 at 3:06 PM, Dale Henrichs < >>>> dale.henrichs@gemtalksystems.com> wrote: >>>> >>>>> Marching Orders! Very good ... >>>>> >>>>> Johan, Gerhard, et. al., I want to follow your lead and fill in where >>>>> the work is needed ... >>>>> >>>>> Do you guys think that getting Seaside/Zinc/etc. ported to GemStone3.2 >>>>> takes precedence over getting Zinc running on GemStone3.1? >>>>> >>>>> I can take a crack at solving Gerhard's Seaside3.1 loading error, but >>>>> Zinc has been on the brink for so long, maybe I should hit it hard and get >>>>> the tests passing in GemStone 3.1 (encoding issues are right up my alley:)? >>>>> >>>>> If there are other outstanding problems that folks are looking at they >>>>> can be added into the mix... >>>>> >>>>> Dale >>>>> >>>>> >>>>> On Tue, May 20, 2014 at 10:42 PM, Johan Brichau >>>>> wrote: >>>>> >>>>>> Hi all, >>>>>> >>>>>> I have been tampering off and on over the last few months to make >>>>>> Zinc 2.4.3 work in Gemstone. >>>>>> >>>>>> I made a pull request [1] with my changes, though not all tests are >>>>>> passing and since most of the changes had to do with encoding, byte arrays >>>>>> vs strings, multibyte strings, etc... I really need someone to take a look >>>>>> at them. Also, the pace is quite slow by myself ;-) >>>>>> >>>>>> This email is just to make sure that the pull request does not go >>>>>> unnoticed for someone wanting to take up work on the port. >>>>>> >>>>>> cheers! >>>>>> Johan >>>>>> >>>>>> [1] https://github.com/glassdb/zinc/pull/48 >>>>>> _______________________________________________ >>>>>> Glass mailing list >>>>>> Glass@lists.gemtalksystems.com >>>>>> http://lists.gemtalksystems.com/mailman/listinfo/glass >>>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> Glass mailing list >>>>> Glass@lists.gemtalksystems.com >>>>> http://lists.gemtalksystems.com/mailman/listinfo/glass >>>>> >>>>> >>>> >>>> _______________________________________________ >>>> Glass mailing list >>>> Glass@lists.gemtalksystems.com >>>> http://lists.gemtalksystems.com/mailman/listinfo/glass >>>> >>>> >>> >>> >>> -- >>> 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/20151015/7df085e1/attachment-0001.htm From laheadle at gmail.com Thu Oct 15 19:42:04 2015 From: laheadle at gmail.com (Lyn Headley) Date: Thu Oct 15 19:42:06 2015 Subject: [Seaside] Loading Seaside in fresh pharo 4 Message-ID: Hello, I am trying to load seaside into a fresh pharo4 image. If I load ConfigurationOfSeaside3 from the configuration browser, and then execute the following code: (ConfigurationOfSeaside3 project version: #stable) load: 'ALL'. It runs for a while, and then says, This package depends on the following classes: WAServerAdaptorBrowser OBCommand You must resolve these dependencies before you will be able to load these definitions: cmdWebServerEnableSSLHandler WAWebServerSSLCommand addItemToMenu: execute group isActive isEnabled label I proceed, to: This package depends on the following classes: BlockContext ContextPart You must resolve these dependencies before you will be able to load these definitions: processHttpRequest: stackDo: , and then I get an error which I have not captured (sorry)... Any ideas what I am doing wrong? Lyn -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20151015/7c19f6dc/attachment.htm From sven at stfx.eu Thu Oct 15 20:22:58 2015 From: sven at stfx.eu (Sven Van Caekenberghe) Date: Thu Oct 15 20:23:02 2015 Subject: [Seaside] Loading Seaside in fresh pharo 4 In-Reply-To: References: Message-ID: <7F33573C-25D5-4AEC-9DDD-1CF6F6D4DEA5@stfx.eu> Lyn, That is not right, it should work out of the box. You can find some prebuilt CI images here: https://ci.inria.fr/pharo-contribution/job/Seaside/ I think you should not try to #load: 'ALL', try to just #load (for #load: 'default'). HTH, Sven > On 15 Oct 2015, at 21:42, Lyn Headley wrote: > > Hello, > > I am trying to load seaside into a fresh pharo4 image. If I load > ConfigurationOfSeaside3 from the configuration browser, and then > execute the following code: > > (ConfigurationOfSeaside3 project version: #stable) load: 'ALL'. > > It runs for a while, and then says, > > This package depends on the following classes: > WAServerAdaptorBrowser > OBCommand > You must resolve these dependencies before you will be able to load these definitions: > cmdWebServerEnableSSLHandler > WAWebServerSSLCommand > addItemToMenu: > execute > group > isActive > isEnabled > label > > I proceed, to: > > This package depends on the following classes: > BlockContext > ContextPart > You must resolve these dependencies before you will be able to load these definitions: > processHttpRequest: > stackDo: > > > , > > and then I get an error which I have not captured (sorry)... > > Any ideas what I am doing wrong? > > Lyn > > _______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside From laheadle at gmail.com Fri Oct 16 04:05:33 2015 From: laheadle at gmail.com (Lyn Headley) Date: Fri Oct 16 04:05:35 2015 Subject: [Seaside] Loading Seaside in fresh pharo 4 In-Reply-To: <7F33573C-25D5-4AEC-9DDD-1CF6F6D4DEA5@stfx.eu> References: <7F33573C-25D5-4AEC-9DDD-1CF6F6D4DEA5@stfx.eu> Message-ID: Thank you Sven, load: 'default' worked. On Thu, Oct 15, 2015 at 1:22 PM, Sven Van Caekenberghe wrote: > Lyn, > > That is not right, it should work out of the box. > > You can find some prebuilt CI images here: > > https://ci.inria.fr/pharo-contribution/job/Seaside/ > > I think you should not try to #load: 'ALL', try to just #load (for #load: > 'default'). > > HTH, > > Sven > > > On 15 Oct 2015, at 21:42, Lyn Headley wrote: > > > > Hello, > > > > I am trying to load seaside into a fresh pharo4 image. If I load > > ConfigurationOfSeaside3 from the configuration browser, and then > > execute the following code: > > > > (ConfigurationOfSeaside3 project version: #stable) load: 'ALL'. > > > > It runs for a while, and then says, > > > > This package depends on the following classes: > > WAServerAdaptorBrowser > > OBCommand > > You must resolve these dependencies before you will be able to load > these definitions: > > cmdWebServerEnableSSLHandler > > WAWebServerSSLCommand > > addItemToMenu: > > execute > > group > > isActive > > isEnabled > > label > > > > I proceed, to: > > > > This package depends on the following classes: > > BlockContext > > ContextPart > > You must resolve these dependencies before you will be able to load > these definitions: > > processHttpRequest: > > stackDo: > > > > > > , > > > > and then I get an error which I have not captured (sorry)... > > > > Any ideas what I am doing wrong? > > > > Lyn > > > > _______________________________________________ > > 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/20151015/ef4850c9/attachment.htm From johan at inceptive.be Fri Oct 16 07:14:53 2015 From: johan at inceptive.be (Johan Brichau) Date: Fri Oct 16 07:14:57 2015 Subject: [Seaside] Loading Seaside in fresh pharo 4 In-Reply-To: References: <7F33573C-25D5-4AEC-9DDD-1CF6F6D4DEA5@stfx.eu> Message-ID: Mind that ?default? is a very small set for Seaside 3.1 See the configuration?s groups for more packages. > On 16 Oct 2015, at 06:05, Lyn Headley wrote: > > Thank you Sven, > > load: 'default' worked. > > On Thu, Oct 15, 2015 at 1:22 PM, Sven Van Caekenberghe > wrote: > Lyn, > > That is not right, it should work out of the box. > > You can find some prebuilt CI images here: > > https://ci.inria.fr/pharo-contribution/job/Seaside/ > > I think you should not try to #load: 'ALL', try to just #load (for #load: 'default'). > > HTH, > > Sven > > > On 15 Oct 2015, at 21:42, Lyn Headley > wrote: > > > > Hello, > > > > I am trying to load seaside into a fresh pharo4 image. If I load > > ConfigurationOfSeaside3 from the configuration browser, and then > > execute the following code: > > > > (ConfigurationOfSeaside3 project version: #stable) load: 'ALL'. > > > > It runs for a while, and then says, > > > > This package depends on the following classes: > > WAServerAdaptorBrowser > > OBCommand > > You must resolve these dependencies before you will be able to load these definitions: > > cmdWebServerEnableSSLHandler > > WAWebServerSSLCommand > > addItemToMenu: > > execute > > group > > isActive > > isEnabled > > label > > > > I proceed, to: > > > > This package depends on the following classes: > > BlockContext > > ContextPart > > You must resolve these dependencies before you will be able to load these definitions: > > processHttpRequest: > > stackDo: > > > > > > , > > > > and then I get an error which I have not captured (sorry)... > > > > Any ideas what I am doing wrong? > > > > Lyn > > > > _______________________________________________ > > 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/20151016/d0b9d7d4/attachment.htm From sven at stfx.eu Fri Oct 16 08:33:26 2015 From: sven at stfx.eu (Sven Van Caekenberghe) Date: Fri Oct 16 08:33:31 2015 Subject: [Seaside] Loading Seaside in fresh pharo 4 In-Reply-To: References: <7F33573C-25D5-4AEC-9DDD-1CF6F6D4DEA5@stfx.eu> Message-ID: <51378A92-9303-4E4B-B5A9-DFDCB902C040@stfx.eu> > On 16 Oct 2015, at 09:14, Johan Brichau wrote: > > Mind that ?default? is a very small set for Seaside 3.1 > > See the configuration?s groups for more packages. What is the recommended group for beginners then ? >> On 16 Oct 2015, at 06:05, Lyn Headley wrote: >> >> Thank you Sven, >> >> load: 'default' worked. >> >> On Thu, Oct 15, 2015 at 1:22 PM, Sven Van Caekenberghe wrote: >> Lyn, >> >> That is not right, it should work out of the box. >> >> You can find some prebuilt CI images here: >> >> https://ci.inria.fr/pharo-contribution/job/Seaside/ >> >> I think you should not try to #load: 'ALL', try to just #load (for #load: 'default'). >> >> HTH, >> >> Sven >> >> > On 15 Oct 2015, at 21:42, Lyn Headley wrote: >> > >> > Hello, >> > >> > I am trying to load seaside into a fresh pharo4 image. If I load >> > ConfigurationOfSeaside3 from the configuration browser, and then >> > execute the following code: >> > >> > (ConfigurationOfSeaside3 project version: #stable) load: 'ALL'. >> > >> > It runs for a while, and then says, >> > >> > This package depends on the following classes: >> > WAServerAdaptorBrowser >> > OBCommand >> > You must resolve these dependencies before you will be able to load these definitions: >> > cmdWebServerEnableSSLHandler >> > WAWebServerSSLCommand >> > addItemToMenu: >> > execute >> > group >> > isActive >> > isEnabled >> > label >> > >> > I proceed, to: >> > >> > This package depends on the following classes: >> > BlockContext >> > ContextPart >> > You must resolve these dependencies before you will be able to load these definitions: >> > processHttpRequest: >> > stackDo: >> > >> > >> > , >> > >> > and then I get an error which I have not captured (sorry)... >> > >> > Any ideas what I am doing wrong? >> > >> > Lyn >> > >> > _______________________________________________ >> > 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 > > _______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside From johan at inceptive.be Fri Oct 16 14:16:11 2015 From: johan at inceptive.be (Johan Brichau) Date: Fri Oct 16 14:16:15 2015 Subject: [Seaside] Loading Seaside in fresh pharo 4 In-Reply-To: <51378A92-9303-4E4B-B5A9-DFDCB902C040@stfx.eu> References: <7F33573C-25D5-4AEC-9DDD-1CF6F6D4DEA5@stfx.eu> <51378A92-9303-4E4B-B5A9-DFDCB902C040@stfx.eu> Message-ID: <218CD23D-4909-4362-B400-E17DACC3315E@inceptive.be> > On 16 Oct 2015, at 10:33, Sven Van Caekenberghe wrote: > >> >> On 16 Oct 2015, at 09:14, Johan Brichau > wrote: >> >> Mind that ?default? is a very small set for Seaside 3.1 >> >> See the configuration?s groups for more packages. > > What is the recommended group for beginners then ? I just published a new ConfigurationOfSeaside3 with a ?OneClick? group for current Seaside 3.1 Should have thought about that question before though?. cheers Johan -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20151016/dad16a29/attachment.htm From laheadle at gmail.com Fri Oct 16 18:09:07 2015 From: laheadle at gmail.com (Lyn Headley) Date: Fri Oct 16 18:09:08 2015 Subject: [Seaside] Loading Seaside in fresh pharo 4 In-Reply-To: <218CD23D-4909-4362-B400-E17DACC3315E@inceptive.be> References: <7F33573C-25D5-4AEC-9DDD-1CF6F6D4DEA5@stfx.eu> <51378A92-9303-4E4B-B5A9-DFDCB902C040@stfx.eu> <218CD23D-4909-4362-B400-E17DACC3315E@inceptive.be> Message-ID: Still on this topic, sort of. My real goal is to create a nice Metacello configuration for my project so I can easily load it into a fresh pharo or Gemstone install. Currently getting a _different_ stack trace (looks like a lower level one, not a regular debugger) when I try to load the configuration into a fresh pharo 4 image. Do you see anything wrong with this piece where I define project 'Seaside3'? spec project: 'Seaside3' with: [ spec className: 'ConfigurationOfSeaside3'; versionString: #stable; loads: #('default'); repository: 'http://smalltalkhub.com/mc/Seaside/MetacelloConfigurations/main' ]. Or perhaps something else is wrong with my Configuration? I have enclosed the complete Metacello Configuration I am building as well as the stack trace. baseline02: spec " (ConfigurationOfZDialog project version: '0.2-baseline') load. " spec for: #common do: [ spec blessing: #baseline. spec repository: 'filetree:///home/laheadle/smalltalk/zdialog'. spec project: 'Seaside3' with: [ spec className: 'ConfigurationOfSeaside3'; versionString: #stable; loads: #('default'); repository: 'http://smalltalkhub.com/mc/Seaside/MetacelloConfigurations/main' ]. spec project: 'PetitParser' with: [ spec className: 'ConfigurationOfPetitParser'; versionString: #stable; loads: #('default'); repository: 'http://source.lukas-renggli.ch/petit' ]. spec package: 'ZDialog-Core'; package: 'ZDialog-CAD'; package: 'ZDialog-Parser' with: [ spec requires: 'PetitParser' ]; package: 'ZDialog-Core-Tests' with: [ spec requires: 'ZDialog-Core' ]; package: 'ZDialog-Web' with: [ spec requires: #('Seaside3' 'ZDialog-Core') ] ] ------ MessageNotUnderstood: Array>>nsWriteStream Array(Object)>>doesNotUnderstand: #nsWriteStream Array(Collection)>>flatCollect: Array(Collection)>>gather: ProtocolOrganizer>>allMethods AllProtocol>>methods AllProtocol>>name ProtocolOrganizer>>classify:inProtocolNamed: ProtocolOrganizer>>classify:inProtocolNamed:suppressIfDefault: ClassOrganization>>classify:under:suppressIfDefault: ClassOrganization>>classify:under: [ myClass organization classify: selector under: category ] in MethodAddition>>notifyObservers in Block: [ myClass organization classify: selector under: c...etc... BlockClosure>>ensure: SystemAnnouncer>>suspendAllWhile: MethodAddition>>notifyObservers [ :each | each notifyObservers ] in MCMultiPackageLoader(MCPackageLoader)>>basicLoadDefinitions in Block: [ :each | each notifyObservers ] OrderedCollection>>do: MCMultiPackageLoader(MCPackageLoader)>>basicLoadDefinitions [ self basicLoadDefinitions ] in [ self handleLoadErrorsDuring: [ self basicLoadDefinitions ] ] in MCMultiPackageLoader(MCPackageLoader)>>basicLoad in Block: [ self basicLoadDefinitions ] BlockClosure>>on:do: [ aBlock on: InMidstOfFileinNotification do: [ :notification | notification resume: true ] ] in MCMultiPackageLoader(MCPackageLoader)>>handleLoadErrorsDuring: in Block: [ ... BlockClosure>>on:do: MCMultiPackageLoader(MCPackageLoader)>>handleLoadErrorsDuring: [ self handleLoadErrorsDuring: [ self basicLoadDefinitions ] ] in MCMultiPackageLoader(MCPackageLoader)>>basicLoad in Block: [ self handleLoadErrorsDuring: [ self basicLoadDef...etc... BlockClosure>>ensure: MCMultiPackageLoader(MCPackageLoader)>>basicLoad [ self basicLoad ] in MCMultiPackageLoader(MCPackageLoader)>>loadWithNameLike: in Block: [ self basicLoad ] BlockClosure>>ensure: MCMultiPackageLoader(MCPackageLoader)>>useChangeSetNamed:during: MCMultiPackageLoader(MCPackageLoader)>>useNewChangeSetNamedLike:during: MCMultiPackageLoader(MCPackageLoader)>>loadWithNameLike: On Fri, Oct 16, 2015 at 7:16 AM, Johan Brichau wrote: > > On 16 Oct 2015, at 10:33, Sven Van Caekenberghe wrote: > > > On 16 Oct 2015, at 09:14, Johan Brichau wrote: > > Mind that ?default? is a very small set for Seaside 3.1 > > See the configuration?s groups for more packages. > > > What is the recommended group for beginners then ? > > > I just published a new ConfigurationOfSeaside3 with a ?OneClick? group for > current Seaside 3.1 > > Should have thought about that question before though?. > > cheers > Johan > > _______________________________________________ > 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/20151016/ff22bcc5/attachment.htm From stephan at stack.nl Fri Oct 16 18:50:48 2015 From: stephan at stack.nl (Stephan Eggermont) Date: Fri Oct 16 18:51:05 2015 Subject: [Seaside] Re: Loading Seaside in fresh pharo 4 In-Reply-To: References: <7F33573C-25D5-4AEC-9DDD-1CF6F6D4DEA5@stfx.eu> <51378A92-9303-4E4B-B5A9-DFDCB902C040@stfx.eu> <218CD23D-4909-4362-B400-E17DACC3315E@inceptive.be> Message-ID: On 16-10-15 20:09, Lyn Headley wrote: > Or perhaps something else is wrong with my Configuration? I have enclosed > the complete Metacello Configuration I am building as well as the stack > trace. > project: 'PetitParser' > with: [ > spec > className: 'ConfigurationOfPetitParser'; > versionString: #stable; > loads: #('default'); > repository: 'http://source.lukas-renggli.ch/petit' ]. The current repository for petitparser is http://smalltalkhub.com/mc/Moose/PetitParser/main Stephan From laheadle at gmail.com Fri Oct 16 20:28:17 2015 From: laheadle at gmail.com (Lyn Headley) Date: Fri Oct 16 20:28:19 2015 Subject: [Seaside] Re: Loading Seaside in fresh pharo 4 In-Reply-To: References: <7F33573C-25D5-4AEC-9DDD-1CF6F6D4DEA5@stfx.eu> <51378A92-9303-4E4B-B5A9-DFDCB902C040@stfx.eu> <218CD23D-4909-4362-B400-E17DACC3315E@inceptive.be> Message-ID: Thank you Stephan. Looks like that was it! On Fri, Oct 16, 2015 at 11:50 AM, Stephan Eggermont wrote: > On 16-10-15 20:09, Lyn Headley wrote: > >> Or perhaps something else is wrong with my Configuration? I have enclosed >> the complete Metacello Configuration I am building as well as the stack >> trace. >> > > project: 'PetitParser' >> with: [ >> spec >> className: 'ConfigurationOfPetitParser'; >> versionString: #stable; >> loads: #('default'); >> repository: 'http://source.lukas-renggli.ch/petit' ]. >> > > The current repository for petitparser is > http://smalltalkhub.com/mc/Moose/PetitParser/main > > Stephan > > > _______________________________________________ > 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/20151016/6fcd0597/attachment-0001.htm From lasmiste at gmail.com Sat Oct 17 08:27:37 2015 From: lasmiste at gmail.com (Dave) Date: Sat Oct 17 08:38:39 2015 Subject: [Seaside] Encoding on saving html file Message-ID: <1445070457483-4856116.post@n4.nabble.com> Hi folks, I've an encoding issue when saving an html page. The page has some strings with accented letters like: ? or ? and so on. I save the page retrieving the stream doing: html context document stream contents but every accented char is wrong encoded. Can you help me? Thanks Dave -- View this message in context: http://forum.world.st/Encoding-on-saving-html-file-tp4856116.html Sent from the Seaside General mailing list archive at Nabble.com. From stephan at stack.nl Sat Oct 17 10:50:13 2015 From: stephan at stack.nl (Stephan Eggermont) Date: Sat Oct 17 10:50:37 2015 Subject: [Seaside] Re: Encoding on saving html file In-Reply-To: <1445070457483-4856116.post@n4.nabble.com> References: <1445070457483-4856116.post@n4.nabble.com> Message-ID: On 17-10-15 10:27, Dave wrote: > html context document stream Inspect the stream to see what kind of encoder/codec/converter is used Stephan From lasmiste at gmail.com Sat Oct 17 12:32:18 2015 From: lasmiste at gmail.com (Dave) Date: Sat Oct 17 12:43:22 2015 Subject: [Seaside] Re: Encoding on saving html file In-Reply-To: References: <1445070457483-4856116.post@n4.nabble.com> Message-ID: <1445085138464-4856168.post@n4.nabble.com> Hi Stephan The stream is: You can see the last line contains "perch??" instead of "perch?" Thanks Dave Stephan Eggermont wrote > On 17-10-15 10:27, Dave wrote: >> html context document stream > > Inspect the stream to see what kind of encoder/codec/converter is used > > Stephan > > _______________________________________________ > seaside mailing list > seaside@.squeakfoundation > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside -- View this message in context: http://forum.world.st/Encoding-on-saving-html-file-tp4856116p4856168.html Sent from the Seaside General mailing list archive at Nabble.com. From stephan at stack.nl Sat Oct 17 13:42:34 2015 From: stephan at stack.nl (Stephan Eggermont) Date: Sat Oct 17 13:42:41 2015 Subject: [Seaside] Re: Encoding on saving html file In-Reply-To: <1445085138464-4856168.post@n4.nabble.com> References: <1445070457483-4856116.post@n4.nabble.com> <1445085138464-4856168.post@n4.nabble.com> Message-ID: On 17/10/15 14:32, Dave wrote: > Hi Stephan > > The stream is: > > > You can see the last line contains "perch??" instead of "perch?" So that's fine then. That's the UTF8 representation Stephan From lasmiste at gmail.com Sat Oct 17 13:46:26 2015 From: lasmiste at gmail.com (Dave) Date: Sat Oct 17 13:57:30 2015 Subject: [Seaside] Re: Encoding on saving html file In-Reply-To: References: <1445070457483-4856116.post@n4.nabble.com> <1445085138464-4856168.post@n4.nabble.com> Message-ID: <1445089586186-4856185.post@n4.nabble.com> But if you save the text of my previous email to an html file and open it, it shows "perch??" instead of "perch?" :-( Dave Stephan Eggermont wrote > On 17/10/15 14:32, Dave wrote: >> Hi Stephan >> >> The stream is: >> >> >> You can see the last line contains "perch??" instead of "perch?" > > So that's fine then. That's the UTF8 representation > > Stephan > > > _______________________________________________ > seaside mailing list > seaside@.squeakfoundation > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside -- View this message in context: http://forum.world.st/Encoding-on-saving-html-file-tp4856116p4856185.html Sent from the Seaside General mailing list archive at Nabble.com. From stephan at stack.nl Sat Oct 17 14:44:47 2015 From: stephan at stack.nl (Stephan Eggermont) Date: Sat Oct 17 14:44:58 2015 Subject: [Seaside] Re: Encoding on saving html file In-Reply-To: <1445089586186-4856185.post@n4.nabble.com> References: <1445070457483-4856116.post@n4.nabble.com> <1445085138464-4856168.post@n4.nabble.com> <1445089586186-4856185.post@n4.nabble.com> Message-ID: On 17/10/15 15:46, Dave wrote: > But if you save the text of my previous email to an html file and open it, it > shows "perch??" instead of "perch?" That depends on how you save it. You probably want to use an UTF8TextConverter somewhere It is used in MultiByteBinaryOrTextStream class>>on:encoding: Stephan From johan at inceptive.be Sat Oct 17 15:26:19 2015 From: johan at inceptive.be (Johan Brichau) Date: Sat Oct 17 15:26:22 2015 Subject: [Seaside] Encoding on saving html file In-Reply-To: References: <1445070457483-4856116.post@n4.nabble.com> <1445085138464-4856168.post@n4.nabble.com> <1445089586186-4856185.post@n4.nabble.com> Message-ID: You might want to look at [1] for a related discussion about this issue. Instead of getting the stream contents from your context and saving that, try the following: | fullDocument | fullDocument := WAHtmlCanvas builder fullDocument: true; rootBlock: [:root | root meta contentType: (WAMimeType textHtml charset:'utf-8') ]; render: [ :html | html text: '?u?oa' ]. '/tmp/test.html' asFileReference writeStreamDo: [ :out | out << fullDocument ]. If you really want to create a text file, how are you saving and viewing that text file once you get the contents from a Seaside document? Johan > On 17 Oct 2015, at 16:44, Stephan Eggermont wrote: > > On 17/10/15 15:46, Dave wrote: >> But if you save the text of my previous email to an html file and open it, it >> shows "perch??" instead of "perch?" > > That depends on how you save it. > You probably want to use an UTF8TextConverter somewhere > It is used in MultiByteBinaryOrTextStream class>>on:encoding: > > Stephan > > > _______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside From lasmiste at gmail.com Sat Oct 17 20:37:50 2015 From: lasmiste at gmail.com (Dave) Date: Sat Oct 17 20:48:58 2015 Subject: [Seaside] Re: Encoding on saving html file In-Reply-To: References: <1445070457483-4856116.post@n4.nabble.com> <1445085138464-4856168.post@n4.nabble.com> <1445089586186-4856185.post@n4.nabble.com> Message-ID: <1445114270993-4856229.post@n4.nabble.com> Hi Stephan, I don't find a hint on MultiByteBinaryOrTextStream but I found a help from a thread of mine (from time to time I have some encoding issue :-) ) http://forum.world.st/File-upload-encoding-issue-tp4783446p4783615.html and Sven's reply helps me again, I decoded the document using this method: (GRCodec forEncoding: 'utf-8') decode: html context document stream contents. Anyway if there is a better solution I'll gladly try it Dave Stephan Eggermont wrote > On 17/10/15 15:46, Dave wrote: >> But if you save the text of my previous email to an html file and open >> it, it >> shows "perch??" instead of "perch?" > > That depends on how you save it. > You probably want to use an UTF8TextConverter somewhere > It is used in MultiByteBinaryOrTextStream class>>on:encoding: > > Stephan > > > _______________________________________________ > seaside mailing list > seaside@.squeakfoundation > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside -- View this message in context: http://forum.world.st/Encoding-on-saving-html-file-tp4856116p4856229.html Sent from the Seaside General mailing list archive at Nabble.com. From lasmiste at gmail.com Sat Oct 17 20:46:16 2015 From: lasmiste at gmail.com (Dave) Date: Sat Oct 17 20:57:23 2015 Subject: [Seaside] Re: Encoding on saving html file In-Reply-To: References: <1445070457483-4856116.post@n4.nabble.com> <1445085138464-4856168.post@n4.nabble.com> <1445089586186-4856185.post@n4.nabble.com> Message-ID: <1445114776790-4856230.post@n4.nabble.com> Hi Johan, With [1] I guess you are linking to this: http://forum.world.st/Accent-in-generated-pages-tp4832873p4832910.html I tried to change with and save it as you suggest, but it doesn't work, text contains perch?? I tried something different as Sven suggested some time ago: http://forum.world.st/File-upload-encoding-issue-tp4783446p4783615.html i.e and it works, but if you can explain how to make your example working I'll be glad. Thanks Dave Johan Brichau-2 wrote > You might want to look at [1] for a related discussion about this issue. > > Instead of getting the stream contents from your context and saving that, > try the following: > > | fullDocument | > fullDocument := WAHtmlCanvas builder > fullDocument: true; > rootBlock: [:root | root meta contentType: (WAMimeType textHtml > charset:'utf-8') ]; > render: [ :html | html text: '?u?oa' ]. > > '/tmp/test.html' asFileReference writeStreamDo: [ :out | out << > fullDocument ]. > > If you really want to create a text file, how are you saving and viewing > that text file once you get the contents from a Seaside document? > > Johan > >> On 17 Oct 2015, at 16:44, Stephan Eggermont < > stephan@ > > wrote: >> >> On 17/10/15 15:46, Dave wrote: >>> But if you save the text of my previous email to an html file and open >>> it, it >>> shows "perch??" instead of "perch?" >> >> That depends on how you save it. >> You probably want to use an UTF8TextConverter somewhere >> It is used in MultiByteBinaryOrTextStream class>>on:encoding: >> >> Stephan >> >> >> _______________________________________________ >> seaside mailing list >> > seaside@.squeakfoundation >> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > _______________________________________________ > seaside mailing list > seaside@.squeakfoundation > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside Johan Brichau-2 wrote > You might want to look at [1] for a related discussion about this issue. > > Instead of getting the stream contents from your context and saving that, > try the following: > > | fullDocument | > fullDocument := WAHtmlCanvas builder > fullDocument: true; > rootBlock: [:root | root meta contentType: (WAMimeType textHtml > charset:'utf-8') ]; > render: [ :html | html text: '?u?oa' ]. > > '/tmp/test.html' asFileReference writeStreamDo: [ :out | out << > fullDocument ]. > > If you really want to create a text file, how are you saving and viewing > that text file once you get the contents from a Seaside document? > > Johan > >> On 17 Oct 2015, at 16:44, Stephan Eggermont < > stephan@ > > wrote: >> >> On 17/10/15 15:46, Dave wrote: >>> But if you save the text of my previous email to an html file and open >>> it, it >>> shows "perch??" instead of "perch?" >> >> That depends on how you save it. >> You probably want to use an UTF8TextConverter somewhere >> It is used in MultiByteBinaryOrTextStream class>>on:encoding: >> >> Stephan >> >> >> _______________________________________________ >> seaside mailing list >> > seaside@.squeakfoundation >> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > _______________________________________________ > seaside mailing list > seaside@.squeakfoundation > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside -- View this message in context: http://forum.world.st/Encoding-on-saving-html-file-tp4856116p4856230.html Sent from the Seaside General mailing list archive at Nabble.com. From johan at inceptive.be Sun Oct 18 13:07:28 2015 From: johan at inceptive.be (Johan Brichau) Date: Sun Oct 18 13:15:39 2015 Subject: [Seaside] Encoding on saving html file In-Reply-To: <1445114776790-4856230.post@n4.nabble.com> References: <1445070457483-4856116.post@n4.nabble.com> <1445085138464-4856168.post@n4.nabble.com> <1445089586186-4856185.post@n4.nabble.com> <1445114776790-4856230.post@n4.nabble.com> Message-ID: <5B54C92F-4B9F-48C3-A7DC-3F9FBA67BAFF@inceptive.be> > On 17 Oct 2015, at 22:46, Dave wrote: > > With [1] I guess you are linking to this: > http://forum.world.st/Accent-in-generated-pages-tp4832873p4832910.html Sorry, forgot to include the link :/ > I tried to change with and save it as you suggest, but it doesn't work, > text contains perch?? Which, as Stephan noted, is the UTF8 encoding for ?perch??. You can test it: (GRCodec forEncoding: 'utf8') decode: 'perch??? So, how our opening the text file? And how are you saving it to disk? Because if you save it as bytes to a file, it will be correctly utf8 encoded. Johan > > I tried something different as Sven suggested some time ago: > http://forum.world.st/File-upload-encoding-issue-tp4783446p4783615.html i.e > and it works, but if you can explain how to make your example working I'll > be glad. > > Thanks > Dave > > > > Johan Brichau-2 wrote >> You might want to look at [1] for a related discussion about this issue. >> >> Instead of getting the stream contents from your context and saving that, >> try the following: >> >> | fullDocument | >> fullDocument := WAHtmlCanvas builder >> fullDocument: true; >> rootBlock: [:root | root meta contentType: (WAMimeType textHtml >> charset:'utf-8') ]; >> render: [ :html | html text: '?u?oa' ]. >> >> '/tmp/test.html' asFileReference writeStreamDo: [ :out | out << >> fullDocument ]. >> >> If you really want to create a text file, how are you saving and viewing >> that text file once you get the contents from a Seaside document? >> >> Johan >> >>> On 17 Oct 2015, at 16:44, Stephan Eggermont < > >> stephan@ > >> > wrote: >>> >>> On 17/10/15 15:46, Dave wrote: >>>> But if you save the text of my previous email to an html file and open >>>> it, it >>>> shows "perch??" instead of "perch?" >>> >>> That depends on how you save it. >>> You probably want to use an UTF8TextConverter somewhere >>> It is used in MultiByteBinaryOrTextStream class>>on:encoding: >>> >>> Stephan >>> >>> >>> _______________________________________________ >>> seaside mailing list >>> > >> seaside@.squeakfoundation > >>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside >> >> _______________________________________________ >> seaside mailing list > >> seaside@.squeakfoundation > >> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > > Johan Brichau-2 wrote >> You might want to look at [1] for a related discussion about this issue. >> >> Instead of getting the stream contents from your context and saving that, >> try the following: >> >> | fullDocument | >> fullDocument := WAHtmlCanvas builder >> fullDocument: true; >> rootBlock: [:root | root meta contentType: (WAMimeType textHtml >> charset:'utf-8') ]; >> render: [ :html | html text: '?u?oa' ]. >> >> '/tmp/test.html' asFileReference writeStreamDo: [ :out | out << >> fullDocument ]. >> >> If you really want to create a text file, how are you saving and viewing >> that text file once you get the contents from a Seaside document? >> >> Johan >> >>> On 17 Oct 2015, at 16:44, Stephan Eggermont < > >> stephan@ > >> > wrote: >>> >>> On 17/10/15 15:46, Dave wrote: >>>> But if you save the text of my previous email to an html file and open >>>> it, it >>>> shows "perch??" instead of "perch?" >>> >>> That depends on how you save it. >>> You probably want to use an UTF8TextConverter somewhere >>> It is used in MultiByteBinaryOrTextStream class>>on:encoding: >>> >>> Stephan >>> >>> >>> _______________________________________________ >>> seaside mailing list >>> > >> seaside@.squeakfoundation > >>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside >> >> _______________________________________________ >> seaside mailing list > >> seaside@.squeakfoundation > >> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > > > > > -- > View this message in context: http://forum.world.st/Encoding-on-saving-html-file-tp4856116p4856230.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 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20151018/c8938bae/attachment-0001.htm From johan at inceptive.be Sun Oct 18 13:07:28 2015 From: johan at inceptive.be (Johan Brichau) Date: Sun Oct 18 13:15:44 2015 Subject: [Seaside] Encoding on saving html file In-Reply-To: <1445114776790-4856230.post@n4.nabble.com> References: <1445070457483-4856116.post@n4.nabble.com> <1445085138464-4856168.post@n4.nabble.com> <1445089586186-4856185.post@n4.nabble.com> <1445114776790-4856230.post@n4.nabble.com> Message-ID: <5B54C92F-4B9F-48C3-A7DC-3F9FBA67BAFF@inceptive.be> > On 17 Oct 2015, at 22:46, Dave wrote: > > With [1] I guess you are linking to this: > http://forum.world.st/Accent-in-generated-pages-tp4832873p4832910.html Sorry, forgot to include the link :/ > I tried to change with and save it as you suggest, but it doesn't work, > text contains perch?? Which, as Stephan noted, is the UTF8 encoding for ?perch??. You can test it: (GRCodec forEncoding: 'utf8') decode: 'perch??? So, how our opening the text file? And how are you saving it to disk? Because if you save it as bytes to a file, it will be correctly utf8 encoded. Johan > > I tried something different as Sven suggested some time ago: > http://forum.world.st/File-upload-encoding-issue-tp4783446p4783615.html i.e > and it works, but if you can explain how to make your example working I'll > be glad. > > Thanks > Dave > > > > Johan Brichau-2 wrote >> You might want to look at [1] for a related discussion about this issue. >> >> Instead of getting the stream contents from your context and saving that, >> try the following: >> >> | fullDocument | >> fullDocument := WAHtmlCanvas builder >> fullDocument: true; >> rootBlock: [:root | root meta contentType: (WAMimeType textHtml >> charset:'utf-8') ]; >> render: [ :html | html text: '?u?oa' ]. >> >> '/tmp/test.html' asFileReference writeStreamDo: [ :out | out << >> fullDocument ]. >> >> If you really want to create a text file, how are you saving and viewing >> that text file once you get the contents from a Seaside document? >> >> Johan >> >>> On 17 Oct 2015, at 16:44, Stephan Eggermont < > >> stephan@ > >> > wrote: >>> >>> On 17/10/15 15:46, Dave wrote: >>>> But if you save the text of my previous email to an html file and open >>>> it, it >>>> shows "perch??" instead of "perch?" >>> >>> That depends on how you save it. >>> You probably want to use an UTF8TextConverter somewhere >>> It is used in MultiByteBinaryOrTextStream class>>on:encoding: >>> >>> Stephan >>> >>> >>> _______________________________________________ >>> seaside mailing list >>> > >> seaside@.squeakfoundation > >>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside >> >> _______________________________________________ >> seaside mailing list > >> seaside@.squeakfoundation > >> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > > Johan Brichau-2 wrote >> You might want to look at [1] for a related discussion about this issue. >> >> Instead of getting the stream contents from your context and saving that, >> try the following: >> >> | fullDocument | >> fullDocument := WAHtmlCanvas builder >> fullDocument: true; >> rootBlock: [:root | root meta contentType: (WAMimeType textHtml >> charset:'utf-8') ]; >> render: [ :html | html text: '?u?oa' ]. >> >> '/tmp/test.html' asFileReference writeStreamDo: [ :out | out << >> fullDocument ]. >> >> If you really want to create a text file, how are you saving and viewing >> that text file once you get the contents from a Seaside document? >> >> Johan >> >>> On 17 Oct 2015, at 16:44, Stephan Eggermont < > >> stephan@ > >> > wrote: >>> >>> On 17/10/15 15:46, Dave wrote: >>>> But if you save the text of my previous email to an html file and open >>>> it, it >>>> shows "perch??" instead of "perch?" >>> >>> That depends on how you save it. >>> You probably want to use an UTF8TextConverter somewhere >>> It is used in MultiByteBinaryOrTextStream class>>on:encoding: >>> >>> Stephan >>> >>> >>> _______________________________________________ >>> seaside mailing list >>> > >> seaside@.squeakfoundation > >>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside >> >> _______________________________________________ >> seaside mailing list > >> seaside@.squeakfoundation > >> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > > > > > -- > View this message in context: http://forum.world.st/Encoding-on-saving-html-file-tp4856116p4856230.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 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20151018/c8938bae/attachment-0003.htm From lasmiste at gmail.com Tue Oct 20 09:40:16 2015 From: lasmiste at gmail.com (Dave) Date: Tue Oct 20 09:51:41 2015 Subject: [Seaside] Re: Encoding on saving html file In-Reply-To: <5B54C92F-4B9F-48C3-A7DC-3F9FBA67BAFF@inceptive.be> References: <1445070457483-4856116.post@n4.nabble.com> <1445085138464-4856168.post@n4.nabble.com> <1445089586186-4856185.post@n4.nabble.com> <1445114776790-4856230.post@n4.nabble.com> <5B54C92F-4B9F-48C3-A7DC-3F9FBA67BAFF@inceptive.be> Message-ID: <1445334016733-4856718.post@n4.nabble.com> Hi Johan, You are right, if I save the file as binary everything is fine. When I tried your snipped it didn't work out because it didn't save as binary (or at least I couldn't convert it to binary) look here: Dave Johan Brichau-2 wrote >> On 17 Oct 2015, at 22:46, Dave < > lasmiste@ > > wrote: >> >> With [1] I guess you are linking to this: >> http://forum.world.st/Accent-in-generated-pages-tp4832873p4832910.html >> <http://forum.world.st/Accent-in-generated-pages-tp4832873p4832910.html> > > Sorry, forgot to include the link :/ > >> I tried to change with and save it as you suggest, but it doesn't >> work, >> text contains perch?? > > Which, as Stephan noted, is the UTF8 encoding for ?perch??. You can test > it: > > (GRCodec forEncoding: 'utf8') decode: 'perch??? > > So, how our opening the text file? And how are you saving it to disk? > Because if you save it as bytes to a file, it will be correctly utf8 > encoded. > > Johan > >> >> I tried something different as Sven suggested some time ago: >> http://forum.world.st/File-upload-encoding-issue-tp4783446p4783615.html >> <http://forum.world.st/File-upload-encoding-issue-tp4783446p4783615.html> >> i.e >> and it works, but if you can explain how to make your example working >> I'll >> be glad. >> >> Thanks >> Dave >> >> >> >> Johan Brichau-2 wrote >>> You might want to look at [1] for a related discussion about this issue. >>> >>> Instead of getting the stream contents from your context and saving >>> that, >>> try the following: >>> >>> | fullDocument | >>> fullDocument := WAHtmlCanvas builder >>> fullDocument: true; >>> rootBlock: [:root | root meta contentType: (WAMimeType textHtml >>> charset:'utf-8') ]; >>> render: [ :html | html text: '?u?oa' ]. >>> >>> '/tmp/test.html' asFileReference writeStreamDo: [ :out | out << >>> fullDocument ]. >>> >>> If you really want to create a text file, how are you saving and viewing >>> that text file once you get the contents from a Seaside document? >>> >>> Johan >>> >>>> On 17 Oct 2015, at 16:44, Stephan Eggermont < >> >>> stephan@ >> >>> > wrote: >>>> >>>> On 17/10/15 15:46, Dave wrote: >>>>> But if you save the text of my previous email to an html file and open >>>>> it, it >>>>> shows "perch??" instead of "perch?" >>>> >>>> That depends on how you save it. >>>> You probably want to use an UTF8TextConverter somewhere >>>> It is used in MultiByteBinaryOrTextStream class>>on:encoding: >>>> >>>> Stephan >>>> >>>> >>>> _______________________________________________ >>>> seaside mailing list >>>> >> >>> seaside@.squeakfoundation >> >>>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside >>>> <http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside> >>> >>> _______________________________________________ >>> seaside mailing list >> >>> seaside@.squeakfoundation >> >>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside >>> <http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside> >> >> >> Johan Brichau-2 wrote >>> You might want to look at [1] for a related discussion about this issue. >>> >>> Instead of getting the stream contents from your context and saving >>> that, >>> try the following: >>> >>> | fullDocument | >>> fullDocument := WAHtmlCanvas builder >>> fullDocument: true; >>> rootBlock: [:root | root meta contentType: (WAMimeType textHtml >>> charset:'utf-8') ]; >>> render: [ :html | html text: '?u?oa' ]. >>> >>> '/tmp/test.html' asFileReference writeStreamDo: [ :out | out << >>> fullDocument ]. >>> >>> If you really want to create a text file, how are you saving and viewing >>> that text file once you get the contents from a Seaside document? >>> >>> Johan >>> >>>> On 17 Oct 2015, at 16:44, Stephan Eggermont < >> >>> stephan@ >> >>> > wrote: >>>> >>>> On 17/10/15 15:46, Dave wrote: >>>>> But if you save the text of my previous email to an html file and open >>>>> it, it >>>>> shows "perch??" instead of "perch?" >>>> >>>> That depends on how you save it. >>>> You probably want to use an UTF8TextConverter somewhere >>>> It is used in MultiByteBinaryOrTextStream class>>on:encoding: >>>> >>>> Stephan >>>> >>>> >>>> _______________________________________________ >>>> seaside mailing list >>>> >> >>> seaside@.squeakfoundation >> >>>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside >>>> <http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside> >>> >>> _______________________________________________ >>> seaside mailing list >> >>> seaside@.squeakfoundation >> >>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside >>> <http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside> >> >> >> >> >> >> -- >> View this message in context: >> http://forum.world.st/Encoding-on-saving-html-file-tp4856116p4856230.html >> <http://forum.world.st/Encoding-on-saving-html-file-tp4856116p4856230.html> >> Sent from the Seaside General mailing list archive at Nabble.com >> <http://nabble.com/>. >> _______________________________________________ >> seaside mailing list >> > seaside@.squeakfoundation > <mailto: > seaside@.squeakfoundation > > >> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside >> <http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside> > > _______________________________________________ > seaside mailing list > seaside@.squeakfoundation > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside -- View this message in context: http://forum.world.st/Encoding-on-saving-html-file-tp4856116p4856718.html Sent from the Seaside General mailing list archive at Nabble.com. From sebastian_heidbrink at yahoo.de Wed Oct 21 18:26:26 2015 From: sebastian_heidbrink at yahoo.de (Sebastian Heidbrink) Date: Wed Oct 21 18:26:28 2015 Subject: [Seaside] Seaside, JWT and REST Message-ID: <5627D8D2.6070204@yahoo.de> Hi! I have a working JWT (JsonWebToken) protected Zinc based REST server. I do also have a Seaside server as a user platform. Now I would like to integrate some results of the REST interfaces of the Zinc based server into my seaside frontend. How would I define an ajax call including a JWT token in Seaside that populates a table rendered by seaside on/after page load? Thank you for any ideas! Sebastian From sebastian_heidbrink at yahoo.de Wed Oct 21 20:44:01 2015 From: sebastian_heidbrink at yahoo.de (Sebastian Heidbrink) Date: Wed Oct 21 20:44:01 2015 Subject: [Seaside] Seaside, JWT and REST In-Reply-To: <5627D8D2.6070204@yahoo.de> References: <5627D8D2.6070204@yahoo.de> Message-ID: <5627F911.3070905@yahoo.de> Okay, I found some information that would at least give me a chance to not add additional load to my seaside server. But unfortunately I can not find any documentation on the "ajax beforeSend" topic in Seaside's history. How do I implement the "beforeSend" part of this script in Seaside? Thank you! Sebastian Am 21.10.2015 um 11:26 schrieb Sebastian Heidbrink: > Hi! > > I have a working JWT (JsonWebToken) protected Zinc based REST server. > I do also have a Seaside server as a user platform. > > Now I would like to integrate some results of the REST interfaces of > the Zinc based server into my seaside frontend. > How would I define an ajax call including a JWT token in Seaside that > populates a table rendered by seaside on/after page load? > > Thank you for any ideas! > Sebastian > _______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > From pdebruic at gmail.com Wed Oct 21 20:44:53 2015 From: pdebruic at gmail.com (Paul DeBruicker) Date: Wed Oct 21 20:56:28 2015 Subject: [Seaside] Re: Seaside, JWT and REST In-Reply-To: <5627F911.3070905@yahoo.de> References: <5627D8D2.6070204@yahoo.de> <5627F911.3070905@yahoo.de> Message-ID: <1445460293396-4857153.post@n4.nabble.com> There is the JQAjaxSetup>>#onBeforeSend: method and you'd use it like: html anchor url:'javascript(0);', onClick: (html jQuery ajax callback: [self processCallBack]; onBeforeSend:(JSStream on: ('if ($window.sessionStorage.token) { xhr.setRequestHeader("Authorization", "Bearer " + $window.sessionStorage.token);} ' asFunction: #('xhr'))); with: 'do the thing'. Beware that's in email client code so may not work exactly but you get the gist of it I think. SebastianHC wrote > Okay, > > I found some information that would at least give me a chance to not add > additional load to my seaside server. > But unfortunately I can not find any documentation on the "ajax > beforeSend" topic in Seaside's history. > > How do I implement the "beforeSend" part of this script in Seaside? > > > Thank you! > Sebastian > > > > > Am 21.10.2015 um 11:26 schrieb Sebastian Heidbrink: >> Hi! >> >> I have a working JWT (JsonWebToken) protected Zinc based REST server. >> I do also have a Seaside server as a user platform. >> >> Now I would like to integrate some results of the REST interfaces of >> the Zinc based server into my seaside frontend. >> How would I define an ajax call including a JWT token in Seaside that >> populates a table rendered by seaside on/after page load? >> >> Thank you for any ideas! >> Sebastian >> _______________________________________________ >> seaside mailing list >> > seaside@.squeakfoundation >> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside >> > > _______________________________________________ > seaside mailing list > seaside@.squeakfoundation > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside -- View this message in context: http://forum.world.st/Seaside-JWT-and-REST-tp4857137p4857153.html Sent from the Seaside General mailing list archive at Nabble.com. From sebastian_heidbrink at yahoo.de Wed Oct 21 21:31:22 2015 From: sebastian_heidbrink at yahoo.de (Sebastian Heidbrink) Date: Wed Oct 21 21:31:21 2015 Subject: [Bulk] [Seaside] Re: Seaside, JWT and REST In-Reply-To: <1445460293396-4857153.post@n4.nabble.com> References: <5627D8D2.6070204@yahoo.de> <5627F911.3070905@yahoo.de> <1445460293396-4857153.post@n4.nabble.com> Message-ID: <5628042A.90602@yahoo.de> asFunction: ?!?! That easy? I was expecting a Block fore the whole onBeforeSend as parameter.... Oh boy! Thank you very much Paul! I will implement my test and then I'll let the list know if it worked.... Sebastian Am 21.10.2015 um 13:44 schrieb Paul DeBruicker: > There is the JQAjaxSetup>>#onBeforeSend: method and you'd use it like: > > > html anchor > url:'javascript(0);', > onClick: (html jQuery ajax > callback: [self processCallBack]; > onBeforeSend:(JSStream on: ('if > ($window.sessionStorage.token) { > xhr.setRequestHeader("Authorization", "Bearer " + > $window.sessionStorage.token);} ' asFunction: #('xhr'))); > with: 'do the thing'. > > > Beware that's in email client code so may not work exactly but you get the > gist of it I think. > > > > SebastianHC wrote >> Okay, >> >> I found some information that would at least give me a chance to not add >> additional load to my seaside server. >> But unfortunately I can not find any documentation on the "ajax >> beforeSend" topic in Seaside's history. >> >> How do I implement the "beforeSend" part of this script in Seaside? >> >> Thank you! >> Sebastian >> >> >> >> >> Am 21.10.2015 um 11:26 schrieb Sebastian Heidbrink: >>> Hi! >>> >>> I have a working JWT (JsonWebToken) protected Zinc based REST server. >>> I do also have a Seaside server as a user platform. >>> >>> Now I would like to integrate some results of the REST interfaces of >>> the Zinc based server into my seaside frontend. >>> How would I define an ajax call including a JWT token in Seaside that >>> populates a table rendered by seaside on/after page load? >>> >>> Thank you for any ideas! >>> Sebastian >>> _______________________________________________ >>> seaside mailing list >>> >> seaside@.squeakfoundation >>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside >>> >> _______________________________________________ >> seaside mailing list >> seaside@.squeakfoundation >> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > > > > -- > View this message in context: http://forum.world.st/Seaside-JWT-and-REST-tp4857137p4857153.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 hilaire at drgeo.eu Thu Oct 22 13:56:28 2015 From: hilaire at drgeo.eu (Hilaire) Date: Thu Oct 22 13:56:55 2015 Subject: [Seaside] WAComponent to PDF Message-ID: Hello, I would like to render WAComponents as PDF documents. I took at look at Artefact, but it is an important work to render again the data as PDF with Artefact, not to mention I feel it is a duplicated work. Moreover, I have quite long documents spanning over several pages, some of my tables are complex with some columns spanning over 2 or 3 columns and I have about 50 different documents to turn as PDF file. Now I am think about rendering these components on dedicated pages, then using wkhtmltopdf. What I would do is get these components rendered at dedicated urls, then call wkhtmltopdf with these urls as arguments. Practically how will you do that? How to forge an URL for a page rendering the component with a dedicated decoration for PDF conversion (dedicated css, header, footer)? My initial though is REST. Is it the right direction? Or are there other options? Thanks for tips, enlightenment or thought on the matter. Hilaire -- Dr. Geo http://drgeo.eu http://google.com/+DrgeoEu From damien.cassou at inria.fr Sat Oct 24 10:13:04 2015 From: damien.cassou at inria.fr (Damien Cassou) Date: Sat Oct 24 13:35:00 2015 Subject: [Seaside] The SushiShop In-Reply-To: References: <87bnc3bd77.fsf@inria.fr> Message-ID: <87io5w1snj.fsf@inria.fr> Philippe Marschall writes: > On Tue, Oct 13, 2015 at 6:32 AM, Damien Cassou wrote: >> is the SushiShop Seaside example application still available anywhere? > > Sure, the store project from [1] > >> Is there a modern version somewhere? > > I don't know. It looks as if some people have been working on it. > > [1] http://www.squeaksource.com/SeasideExamples.html thanks Philippe. The code is using #isolate:, IIRC that was to prevent the use of the back button. But this method does not exist anymore. go | shipping billing creditCard | cart := WAStoreCart new. self isolate: [[self fillCart. self confirmContentsOfCart] whileFalse]. self isolate: [shipping := self getShippingAddress. billing := (self useAsBillingAddress: shipping) ifFalse: [self getBillingAddress] ifTrue: [shipping]. creditCard := self getPaymentInfo. self shipTo: shipping billTo: billing payWith: creditCard]. self displayConfirmation. -- Damien Cassou http://damiencassou.seasidehosting.st "Success is the ability to go from one failure to another without losing enthusiasm." --Winston Churchill From pdebruic at gmail.com Thu Oct 22 17:49:32 2015 From: pdebruic at gmail.com (Paul DeBruicker) Date: Sat Oct 24 14:27:35 2015 Subject: [Seaside] Re: WAComponent to PDF In-Reply-To: References: Message-ID: <1445536172815-4857393.post@n4.nabble.com> This probably has more of what you're after: http://smalltalkhub.com/#!/~TorstenBergmann/WKHTML2PDF If you're not on linux there is a was to access wkhtmltopdf via OSProcess in there as well I think. If not I can send you what I'm doing. Which is basically rendering the component to a file, having wkhtmltopdf do the conversion, and serving the pdf as a download in a tab that opens after some polling code posts a link to the PDF. HilaireFernandes wrote > Hello, > > I would like to render WAComponents as PDF documents. > I took at look at Artefact, but it is an important work to render again > the data as PDF with Artefact, not to mention I feel it is a duplicated > work. Moreover, I have quite long documents spanning over several pages, > some of my tables are complex with some columns spanning over 2 or 3 > columns and I have about 50 different documents to turn as PDF file. > > Now I am think about rendering these components on dedicated pages, then > using wkhtmltopdf. > What I would do is get these components rendered at dedicated urls, then > call wkhtmltopdf with these urls as arguments. > Practically how will you do that? How to forge an URL for a page > rendering the component with a dedicated decoration for PDF conversion > (dedicated css, header, footer)? > My initial though is REST. Is it the right direction? Or are there other > options? > > Thanks for tips, enlightenment or thought on the matter. > > Hilaire > > -- > Dr. Geo > http://drgeo.eu > http://google.com/+DrgeoEu > > > _______________________________________________ > seaside mailing list > seaside@.squeakfoundation > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside -- View this message in context: http://forum.world.st/WAComponent-to-PDF-tp4857328p4857393.html Sent from the Seaside General mailing list archive at Nabble.com. From johan at inceptive.be Thu Oct 22 14:08:00 2015 From: johan at inceptive.be (Johan Brichau) Date: Sat Oct 24 15:37:52 2015 Subject: [Seaside] WAComponent to PDF In-Reply-To: References: Message-ID: <9CAA0F24-4169-4EB6-B461-927FEB559935@inceptive.be> Hilaire, Have you considered generating the pdf in the browser using a javascript library? I recently stumbled upon this: http://www.cloudformatter.com/css2pdf If you only want to generate pdf with tables, see datatables.net ?buttons? plugin. cheers Johan > On 22 Oct 2015, at 15:56, Hilaire wrote: > > Hello, > > I would like to render WAComponents as PDF documents. > I took at look at Artefact, but it is an important work to render again > the data as PDF with Artefact, not to mention I feel it is a duplicated > work. Moreover, I have quite long documents spanning over several pages, > some of my tables are complex with some columns spanning over 2 or 3 > columns and I have about 50 different documents to turn as PDF file. > > Now I am think about rendering these components on dedicated pages, then > using wkhtmltopdf. > What I would do is get these components rendered at dedicated urls, then > call wkhtmltopdf with these urls as arguments. > Practically how will you do that? How to forge an URL for a page > rendering the component with a dedicated decoration for PDF conversion > (dedicated css, header, footer)? > My initial though is REST. Is it the right direction? Or are there other > options? > > Thanks for tips, enlightenment or thought on the matter. > > Hilaire > > -- > 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20151022/b77007b8/attachment.htm From otto at finworks.biz Thu Oct 22 16:38:21 2015 From: otto at finworks.biz (Otto Behrens) Date: Sat Oct 24 17:58:39 2015 Subject: [Seaside] WAComponent to PDF In-Reply-To: References: Message-ID: Hi, We have been producing PDF documents for quite a while now with this approach. We like the approach of using seaside because we write the code once (to see it in the browser) and then trust that the look in the PDF is good. We render html and write it to a file; then call a program on the command line and read the resultant PDF back or email it as an attachment. We reference the CSS URL in the html header. This is quite important because we want the tool to render the PDF correctly with the CSS. We have a single CSS url (file) per site and use this same one for PDF. We've used prince (www.princexml.com) for many years now and it has been reliable. We also used chart director to generate charts / graphs by producing an image which we reference in the html file and produce a PDF with. We've now moved graphs and things to HighCharts, which uses a lot of JavaScript to render the graphs. Many tools have problems with executing JS and producing correct PDF. So we are in the process of moving to wxhtmltopdf. We found that it uses the CSS properly and that it works well with HighCharts. Below is a method that may help. Our stuff is not that nicely packaged. We also have diverse documents and several span a number of pages, depending on data and various things. We had to do a bit of work to handle widows & orphans, which we did in Seaside (WAHtmlCanvas builder fullDocument: true) rootBlock: [ :root | root context visitor: (WARenderingGuide client: root context visitor). root title: 'Form'. root meta contentType: (WAMimeType textHtml charset: 'utf-8'). root stylesheet url: self stylesheetFileFullPath. self addAdditionalBookmarksForRowsToRootIfNecessary: root ]; yourself HTH Let me know if you need more. Otto On Thu, Oct 22, 2015 at 3:56 PM, Hilaire wrote: > Hello, > > I would like to render WAComponents as PDF documents. > I took at look at Artefact, but it is an important work to render again > the data as PDF with Artefact, not to mention I feel it is a duplicated > work. Moreover, I have quite long documents spanning over several pages, > some of my tables are complex with some columns spanning over 2 or 3 > columns and I have about 50 different documents to turn as PDF file. > > Now I am think about rendering these components on dedicated pages, then > using wkhtmltopdf. > What I would do is get these components rendered at dedicated urls, then > call wkhtmltopdf with these urls as arguments. > Practically how will you do that? How to forge an URL for a page > rendering the component with a dedicated decoration for PDF conversion > (dedicated css, header, footer)? > My initial though is REST. Is it the right direction? Or are there other > options? > > Thanks for tips, enlightenment or thought on the matter. > > Hilaire > > -- > 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 stephan at stack.nl Fri Oct 23 14:52:29 2015 From: stephan at stack.nl (Stephan Eggermont) Date: Sat Oct 24 19:06:04 2015 Subject: [Seaside] Re: WAComponent to PDF In-Reply-To: References: Message-ID: On 22/10/15 15:56, Hilaire wrote: > I would like to render WAComponents as PDF documents. > I took at look at Artefact, but it is an important work to render again > the data as PDF with Artefact, not to mention I feel it is a duplicated > work. Moreover, I have quite long documents spanning over several pages, > some of my tables are complex with some columns spanning over 2 or 3 > columns and I have about 50 different documents to turn as PDF file. What are you trying to achieve and how complex are the pages? The output quality of html to pdf solutions has always been a bit disappointing to me, but I'm used to Framemaker/LaTeX. Line breaking, kerning, micro typography are all worse. But that might not be relevant for your documents. You could add a canvas subclass that generates what you need (LaTeX, rtf, etc) instead, or make an iText based webservice. iText offers better paragraph support than Artefact currently. Extending Artefact would of course be very welcome, but I understand the reluctance to spend that much time. Stephan From Lou at Keystone-Software.com Thu Oct 22 14:54:04 2015 From: Lou at Keystone-Software.com (Louis LaBrunda) Date: Sat Oct 24 19:06:06 2015 Subject: [Seaside] WAComponent to PDF References: Message-ID: Hi Hilaire, It has been a while since I used wkhtmltopdf to create PDF files from HTML pages but I liked the way it worked when I did it. I used a WARenderer builder (actually it was WARenderCanvas builder at the time but things have changed and I think WARenderer builder should work but haven't tried it) to create the page as a full document HTML string and save it as a file. I would then execute wkhtmltopdf, pointing it to the file, to create the PDF file. I could then do what I wanted to with the PDF file, like let the use download it. I'm pretty sure wkhtmltopdf was able to do all the CSS stuff from URLs in the generated HTML file. I can look up more details if you need them. Lou On Thu, 22 Oct 2015 15:56:28 +0200, Hilaire wrote: >Hello, > >I would like to render WAComponents as PDF documents. >I took at look at Artefact, but it is an important work to render again >the data as PDF with Artefact, not to mention I feel it is a duplicated >work. Moreover, I have quite long documents spanning over several pages, >some of my tables are complex with some columns spanning over 2 or 3 >columns and I have about 50 different documents to turn as PDF file. > >Now I am think about rendering these components on dedicated pages, then >using wkhtmltopdf. >What I would do is get these components rendered at dedicated urls, then >call wkhtmltopdf with these urls as arguments. >Practically how will you do that? How to forge an URL for a page >rendering the component with a dedicated decoration for PDF conversion >(dedicated css, header, footer)? >My initial though is REST. Is it the right direction? Or are there other >options? > >Thanks for tips, enlightenment or thought on the matter. > >Hilaire ----------------------------------------------------------- Louis LaBrunda Keystone Software Corp. SkypeMe callto://PhotonDemon mailto:Lou@Keystone-Software.com http://www.Keystone-Software.com From Lou at Keystone-Software.com Fri Oct 23 13:16:24 2015 From: Lou at Keystone-Software.com (Louis LaBrunda) Date: Sat Oct 24 19:06:06 2015 Subject: [Seaside] Re: WAComponent to PDF References: Message-ID: Hi Hilaire, It has been a while since I used wkhtmltopdf to create PDF files from HTML pages but I liked the way it worked when I did it. I used a WARenderer builder (actually it was WARenderCanvas builder at the time but things have changed and I think WARenderer builder should work but haven't tried it) to create the page as a full document HTML string and save it as a file. I would then execute wkhtmltopdf, pointing it to the file, to create the PDF file. I could then do what I wanted to with the PDF file, like let the use download it. I'm pretty sure wkhtmltopdf was able to do all the CSS stuff from URLs in the generated HTML file. I can look up more details if you need them. Lou On Thu, 22 Oct 2015 15:56:28 +0200, Hilaire wrote: >Hello, > >I would like to render WAComponents as PDF documents. >I took at look at Artefact, but it is an important work to render again >the data as PDF with Artefact, not to mention I feel it is a duplicated >work. Moreover, I have quite long documents spanning over several pages, >some of my tables are complex with some columns spanning over 2 or 3 >columns and I have about 50 different documents to turn as PDF file. > >Now I am think about rendering these components on dedicated pages, then >using wkhtmltopdf. >What I would do is get these components rendered at dedicated urls, then >call wkhtmltopdf with these urls as arguments. >Practically how will you do that? How to forge an URL for a page >rendering the component with a dedicated decoration for PDF conversion >(dedicated css, header, footer)? >My initial though is REST. Is it the right direction? Or are there other >options? > >Thanks for tips, enlightenment or thought on the matter. > >Hilaire ----------------------------------------------------------- Louis LaBrunda Keystone Software Corp. SkypeMe callto://PhotonDemon mailto:Lou@Keystone-Software.com http://www.Keystone-Software.com From hilaire at drgeo.eu Sun Oct 25 17:39:27 2015 From: hilaire at drgeo.eu (Hilaire) Date: Sun Oct 25 17:39:43 2015 Subject: [Seaside] Re: WAComponent to PDF In-Reply-To: References: Message-ID: Le 22/10/2015 15:56, Hilaire a ?crit : > Thanks for tips, enlightenment or thought on the matter. Thanks to all of you for your tips. Hilaire -- Dr. Geo http://drgeo.eu http://google.com/+DrgeoEu From oswallcr at yahoo.com Mon Oct 26 14:41:35 2015 From: oswallcr at yahoo.com (Oswall Verny Arguedas C.) Date: Mon Oct 26 14:41:39 2015 Subject: [Seaside] Objects on demand for big collections References: <70284075.3158331.1445870495677.JavaMail.yahoo@mail.yahoo.com> Message-ID: <70284075.3158331.1445870495677.JavaMail.yahoo@mail.yahoo.com> It will be possible to load objects on demand (for a list or html table) to avoid unnecessary objects and load ?.To page sending large lists of objects from the server to the client. I use Pharo 4 and Seaside 3.2 on linux ubuntu. ThanksOswall -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20151026/813a6090/attachment.htm From pdebruic at gmail.com Mon Oct 26 18:51:28 2015 From: pdebruic at gmail.com (Paul DeBruicker) Date: Mon Oct 26 19:03:37 2015 Subject: [Seaside] Re: Objects on demand for big collections In-Reply-To: <70284075.3158331.1445870495677.JavaMail.yahoo@mail.yahoo.com> References: <70284075.3158331.1445870495677.JavaMail.yahoo@mail.yahoo.com> Message-ID: <1445885488496-4858064.post@n4.nabble.com> You can use the JQuery Endless Scroll plugin to load new rows into an HTML table or list. It used to be available in the JQuery Widget Box on Smalltalkhub here: http://smalltalkhub.com/#!/~Seaside/JQueryWidgetBox But its not part of the configuration so you'll have to load the base packages and then the Smalltalk code. And includes the plugin file from https://github.com/fredwu/jQuery-Endless-Scroll And it might not even then work as I haven't used it in >5 years. But it used to work and things probably haven't changed that much. oswall wrote > It will be possible to load objects on demand (for a list or html table) > to avoid unnecessary objects and load ?.To page sending large lists of > objects from the server to the client. > I use Pharo 4 and Seaside 3.2 on linux ubuntu. > ThanksOswall > _______________________________________________ > seaside mailing list > seaside@.squeakfoundation > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside -- View this message in context: http://forum.world.st/Objects-on-demand-for-big-collections-tp4858032p4858064.html Sent from the Seaside General mailing list archive at Nabble.com. From hilaire at drgeo.eu Tue Oct 27 17:43:08 2015 From: hilaire at drgeo.eu (Hilaire) Date: Tue Oct 27 17:43:20 2015 Subject: [Seaside] Re: WAComponent to PDF In-Reply-To: References: Message-ID: Le 22/10/2015 18:38, Otto Behrens a ?crit : > (WAHtmlCanvas builder fullDocument: true) > rootBlock: [ :root | > root context visitor: (WARenderingGuide client: root context visitor). > root title: 'Form'. > root meta contentType: (WAMimeType textHtml charset: 'utf-8'). > root stylesheet url: self stylesheetFileFullPath. > self addAdditionalBookmarksForRowsToRootIfNecessary: root ]; > yourself > > > HTH > Let me know if you need more. Hi Otto, As the generated html file is read locally I get issue with the css path. It renders the path to the style file as /files/MyFileLibrary/style.css but it should look like http://myHost/pathToCss/style.css when you want to read the html file locally. The absolute path to style.css is purely constructed by Seaside, adding the host part does not make a valid url: http://myHost/files/MyFileLibrary/style.css is not valid. How did you manage it? Are you serving your static files with Apache? I am not there yet and would like to find a pure Seaside solution. Is there a way to have a valid url, to a resource, with the http part in? So far I did not find it, but Seaside is so big. Thanks Hilaire -- Dr. Geo http://drgeo.eu http://google.com/+DrgeoEu From otto at finworks.biz Tue Oct 27 19:25:38 2015 From: otto at finworks.biz (Otto Behrens) Date: Tue Oct 27 19:25:41 2015 Subject: [Seaside] Re: WAComponent to PDF In-Reply-To: References: Message-ID: Yes, we serve a static file (with nginx). You should be able to create a static URL to your seaside css as well, so I don't see why you'd have a problem. You cannot specify a relative URL in your HTML output as this will then probably be interpreted as relative to the file you wrote on disk. Unless you write the css out to a file in that relative path. We use the full url eg. "root stylesheet url: 'http://myHost/resources/style.css'", where this is the site's css path. Alternatively, try just a relative path like "root stylesheet url: 'style.css'" and write the css file next to the html one. I don't know why seaside would make the url absolute when you write it out. We took all our CSS out of Seaside and put it on disk. We use less and what not to "compile" it and get the web server to produce it. Mainly because 1. Seaside is too heavyweight to serve (dynamically created) CSS up as well as the HTML and 2. The tools are a but scrappy to deal with CSS properly (but would be nice if we had a Seaside-like library that helps with CSS). On Tue, Oct 27, 2015 at 7:43 PM, Hilaire wrote: > Le 22/10/2015 18:38, Otto Behrens a ?crit : >> (WAHtmlCanvas builder fullDocument: true) >> rootBlock: [ :root | >> root context visitor: (WARenderingGuide client: root context visitor). >> root title: 'Form'. >> root meta contentType: (WAMimeType textHtml charset: 'utf-8'). >> root stylesheet url: self stylesheetFileFullPath. >> self addAdditionalBookmarksForRowsToRootIfNecessary: root ]; >> yourself >> >> >> HTH >> Let me know if you need more. > > Hi Otto, > > As the generated html file is read locally I get issue with the css path. > > It renders the path to the style file as /files/MyFileLibrary/style.css > but it should look like http://myHost/pathToCss/style.css when you want > to read the html file locally. > > The absolute path to style.css is purely constructed by Seaside, adding > the host part does not make a valid url: > http://myHost/files/MyFileLibrary/style.css is not valid. > > How did you manage it? Are you serving your static files with Apache? I > am not there yet and would like to find a pure Seaside solution. Is > there a way to have a valid url, to a resource, with the http part in? > So far I did not find it, but Seaside is so big. > > Thanks > > Hilaire > > > -- > 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 Tue Oct 27 22:22:13 2015 From: hilaire at drgeo.eu (Hilaire) Date: Tue Oct 27 22:22:22 2015 Subject: [Seaside] Re: WAComponent to PDF In-Reply-To: References: Message-ID: Le 27/10/2015 20:25, Otto Behrens a ?crit : > Yes, we serve a static file (with nginx). You should be able to create > a static URL to your seaside css as well, so I don't see why you'd > have a problem. You cannot specify a relative URL in your HTML output > as this will then probably be interpreted as relative to the file you > wrote on disk. Unless you write the css out to a file in that relative > path. Got it. From the file library config web tool, I have to set up server hostname and server port to get a valid url as http://localhost:8080/files/FileLibrary/style.css Now I wonder how you can set up the hostname and port programmatically? Thanks Hilaire -- Dr. Geo http://drgeo.eu http://google.com/+DrgeoEu From pdebruic at gmail.com Tue Oct 27 23:04:06 2015 From: pdebruic at gmail.com (Paul DeBruicker) Date: Tue Oct 27 23:16:24 2015 Subject: [Seaside] Re: WAComponent to PDF In-Reply-To: References: Message-ID: <1445987046713-4858274.post@n4.nabble.com> Hi Hliaire, wkhtmltopdf has the --footer-url and --header-url options if you don't want to create a complete document and instead just want to render a component. Then you can save the component to a HTML file and have wkhtmltopdf prepend the header and append the footer to your content before doing the conversion. Since the header/footer likely change infrequently vs the content it may be an easier way to go. Hope this helps, Paul HilaireFernandes wrote > Le 22/10/2015 18:38, Otto Behrens a ?crit : >> (WAHtmlCanvas builder fullDocument: true) >> rootBlock: [ :root | >> root context visitor: (WARenderingGuide client: root context visitor). >> root title: 'Form'. >> root meta contentType: (WAMimeType textHtml charset: 'utf-8'). >> root stylesheet url: self stylesheetFileFullPath. >> self addAdditionalBookmarksForRowsToRootIfNecessary: root ]; >> yourself >> >> >> HTH >> Let me know if you need more. > > Hi Otto, > > As the generated html file is read locally I get issue with the css path. > > It renders the path to the style file as /files/MyFileLibrary/style.css > but it should look like http://myHost/pathToCss/style.css when you want > to read the html file locally. > > The absolute path to style.css is purely constructed by Seaside, adding > the host part does not make a valid url: > http://myHost/files/MyFileLibrary/style.css is not valid. > > How did you manage it? Are you serving your static files with Apache? I > am not there yet and would like to find a pure Seaside solution. Is > there a way to have a valid url, to a resource, with the http part in? > So far I did not find it, but Seaside is so big. > > Thanks > > Hilaire > > > -- > Dr. Geo > http://drgeo.eu > http://google.com/+DrgeoEu > > > _______________________________________________ > seaside mailing list > seaside@.squeakfoundation > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside -- View this message in context: http://forum.world.st/WAComponent-to-PDF-tp4857328p4858274.html Sent from the Seaside General mailing list archive at Nabble.com. From pdebruic at gmail.com Tue Oct 27 23:04:33 2015 From: pdebruic at gmail.com (Paul DeBruicker) Date: Tue Oct 27 23:16:50 2015 Subject: [Seaside] Re: WAComponent to PDF In-Reply-To: <1445987046713-4858274.post@n4.nabble.com> References: <1445987046713-4858274.post@n4.nabble.com> Message-ID: <1445987073201-4858275.post@n4.nabble.com> The options are described here: http://wkhtmltopdf.org/usage/wkhtmltopdf.txt Paul DeBruicker wrote > Hi Hliaire, > > wkhtmltopdf has the --footer-url and --header-url options if you don't > want to create a complete document and instead just want to render a > component. > > Then you can save the component to a HTML file and have wkhtmltopdf > prepend the header and append the footer to your content before doing the > conversion. > > Since the header/footer likely change infrequently vs the content it may > be an easier way to go. > > > Hope this helps, > > Paul > > HilaireFernandes wrote >> Le 22/10/2015 18:38, Otto Behrens a ?crit : >>> (WAHtmlCanvas builder fullDocument: true) >>> rootBlock: [ :root | >>> root context visitor: (WARenderingGuide client: root context visitor). >>> root title: 'Form'. >>> root meta contentType: (WAMimeType textHtml charset: 'utf-8'). >>> root stylesheet url: self stylesheetFileFullPath. >>> self addAdditionalBookmarksForRowsToRootIfNecessary: root ]; >>> yourself >>> >>> >>> HTH >>> Let me know if you need more. >> >> Hi Otto, >> >> As the generated html file is read locally I get issue with the css path. >> >> It renders the path to the style file as /files/MyFileLibrary/style.css >> but it should look like http://myHost/pathToCss/style.css when you want >> to read the html file locally. >> >> The absolute path to style.css is purely constructed by Seaside, adding >> the host part does not make a valid url: >> http://myHost/files/MyFileLibrary/style.css is not valid. >> >> How did you manage it? Are you serving your static files with Apache? I >> am not there yet and would like to find a pure Seaside solution. Is >> there a way to have a valid url, to a resource, with the http part in? >> So far I did not find it, but Seaside is so big. >> >> Thanks >> >> Hilaire >> >> >> -- >> Dr. Geo >> http://drgeo.eu >> http://google.com/+DrgeoEu >> >> >> _______________________________________________ >> seaside mailing list >> seaside@.squeakfoundation >> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside -- View this message in context: http://forum.world.st/WAComponent-to-PDF-tp4857328p4858275.html Sent from the Seaside General mailing list archive at Nabble.com. From astares at gmx.de Wed Oct 28 12:09:40 2015 From: astares at gmx.de (Torsten Bergmann) Date: Wed Oct 28 12:09:42 2015 Subject: [Seaside] Re: WAComponent to PDF Message-ID: Otto Behrens wrote: >We took all our CSS out of Seaside and put it on disk. We use less and >what not to "compile" it and get the web server to produce it. Mainly >because 1. Seaside is too heavyweight to serve (dynamically created) >CSS up as well as the HTML and 2. The tools are a but scrappy to deal >with CSS properly (but would be nice if we had a Seaside-like library >that helps with CSS). Did you check: http://gcotelli.github.io/RenoirSt for Pharo? Bye T. From sistecaq at gmail.com Thu Oct 29 01:32:31 2015 From: sistecaq at gmail.com (Oswall Verny Arguedas C.) Date: Thu Oct 29 01:32:34 2015 Subject: [Seaside] Re: Objects on demand for big collections In-Reply-To: <1445885488496-4858064.post@n4.nabble.com> References: <70284075.3158331.1445870495677.JavaMail.yahoo@mail.yahoo.com> <1445885488496-4858064.post@n4.nabble.com> Message-ID: Thanks Paul for your replay, I will check this plugin. It will be possible to do with WABatchedList or WABatchSelection. I am interested in paging on the server and only serve paged objects in groups. Thanks, Oswall 2015-10-26 12:51 GMT-06:00 Paul DeBruicker : > You can use the JQuery Endless Scroll plugin to load new rows into an HTML > table or list. It used to be available in the JQuery Widget Box on > Smalltalkhub here: > > > http://smalltalkhub.com/#!/~Seaside/JQueryWidgetBox > > > > But its not part of the configuration so you'll have to load the base > packages and then the Smalltalk code. And includes the plugin file from > https://github.com/fredwu/jQuery-Endless-Scroll > > > And it might not even then work as I haven't used it in >5 years. But it > used to work and things probably haven't changed that much. > > > > oswall wrote > > It will be possible to load objects on demand (for a list or html table) > > to avoid unnecessary objects and load ?.To page sending large lists of > > objects from the server to the client. > > I use Pharo 4 and Seaside 3.2 on linux ubuntu. > > ThanksOswall > > _______________________________________________ > > seaside mailing list > > > seaside@.squeakfoundation > > > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > > > > > -- > View this message in context: > http://forum.world.st/Objects-on-demand-for-big-collections-tp4858032p4858064.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 > -- Ing. Oswall Verny Arguedas C Intranets Corporativas M?viles: 8852 - 6773 y 7203 - 2531 Tel?fono: 2268 - 5659 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20151028/94480f40/attachment.htm From ma.chris.m at gmail.com Fri Oct 30 16:52:10 2015 From: ma.chris.m at gmail.com (Chris Muller) Date: Fri Oct 30 16:52:53 2015 Subject: [Seaside] still struggling with the confusing scripting API's Message-ID: I'm still trying to get my head around "what is the best way to write javascript in Seaside. I just spent an entire morning and still failed to write the simplest expression via an aggregation of Seaside's JSDecoration's. This is what I want to render: new MyJavascriptObject(document.getElementById("id1")) Using Seasides various brushes and canvas API, I could not even get the first two words right. I tried: html script with: (html javascript create access: 'MyJavascriptObject')) html script with: (html javascript create add: 'MyJavascriptObject')) html script with: (html javascript create alias: 'MyJavascriptObject')) html script with: (html javascript create assign: 'MyJavascriptObject')) None of those produce "new MyJavascriptObject", what am I missing? Its almost like there is a missing JSDecoration or capability missing from JSStatement..? After throwing up my hands with that, I decided to try "hard coding" the Javascript strings into my Seaside rendering methods: html script with: (html javascript script: [ : s | s add: 'new MyJavascriptObject(document.getElementById("', (aPufDomainComponent htmlId),'") ]) which produces: new MyJavascriptObject(document.getElementById(\"id1\") So that is pretty much what I want, but see that it is escaping the quote characters, which makes it hard to read in the browser. Are those necessary or is there some way to avoid that? I wanted to avoid having to put big chunks of hardcoded Javascript strings into my Smalltalk code. Any advice is appreciated. - Chris PS -- I think the inconsistency of the API is part of my struggle. JSObject script: can accept a Block, and WAHtmlCanvas>>#script: SAYS it takes "aBlock", but that HAS to be wrong, because WAScriptTag>>#with: ends up writing the Block's "greaseString" to the stream... thanks. From johan at inceptive.be Fri Oct 30 19:45:21 2015 From: johan at inceptive.be (Johan Brichau) Date: Fri Oct 30 19:45:26 2015 Subject: [Seaside] still struggling with the confusing scripting API's In-Reply-To: References: Message-ID: <1B1AA3F5-9284-469E-B547-B9494C571FFB@inceptive.be> Hi Chris, It is *possible*: html script with: ((html javascript alias: 'MyJavascriptObject') apply: { (html javascript alias: 'document') call: 'getElementById' with: #id1 }) create One important thing to know is that the Seaside script generation api does not cover all possible Javascript expressions. I believe it was never intended to cover the complete language either. We can, of course, always extend the possibilities. Our experience is that it does the job to glue Seaside-JQuery generated expressions to hand-written Javascript, or for small pieces of JS code. If it?s harder to write the JS code in Seaside, then you should not try to write it in Seaside ;) I mean: it?s not as succinct as the concrete syntax because we?re generating something like Javascript ASTs here. I would definitely opt for this version: html script with: (JSStream on: 'new MyJavascriptObject(document.getElementById(''#id1''))?) Alternatively, the following is possible by adding a simple convenience method: html script with: ((html javascript create: (html javascript alias: 'MyJavascriptObject') withArguments: { (html javascript alias: 'document') call: 'getElementById' with: #id1 })) With JSObject>>create:withArguments: implemented as: create: anObject withArguments: aCollection "new ()" ^ (anObject apply: aCollection) create Depending on your use case, the other options are: - use handwritten javascript functions and call those from generated scripts, limiting the constructs you need to be generated to those that can be done well in Seaside - generate javascript strings instead of ASTs, as in my final code snippet. - write a complete wrapper library like how it?s done for jQuery to work with your Javascript library. Hope this helps Johan > On 30 Oct 2015, at 17:52, Chris Muller wrote: > > I'm still trying to get my head around "what is the best way to write > javascript in Seaside. I just spent an entire morning and still > failed to write the simplest expression via an aggregation of > Seaside's JSDecoration's. This is what I want to render: > > new MyJavascriptObject(document.getElementById("id1")) > > Using Seasides various brushes and canvas API, I could not even get > the first two words right. I tried: > > html script with: (html javascript create access: 'MyJavascriptObject')) > html script with: (html javascript create add: 'MyJavascriptObject')) > html script with: (html javascript create alias: 'MyJavascriptObject')) > html script with: (html javascript create assign: 'MyJavascriptObject')) > > None of those produce "new MyJavascriptObject", what am I missing? > Its almost like there is a missing JSDecoration or capability missing > from JSStatement..? > > After throwing up my hands with that, I decided to try "hard coding" > the Javascript strings into my Seaside rendering methods: > > html script with: (html javascript script: [ : s | s add: 'new > MyJavascriptObject(document.getElementById("', (aPufDomainComponent > htmlId),'") ]) > > which produces: > > new MyJavascriptObject(document.getElementById(\"id1\") > > So that is pretty much what I want, but see that it is escaping the > quote characters, which makes it hard to read in the browser. Are > those necessary or is there some way to avoid that? > > I wanted to avoid having to put big chunks of hardcoded Javascript > strings into my Smalltalk code. Any advice is appreciated. > > - Chris > > PS -- I think the inconsistency of the API is part of my struggle. > JSObject script: can accept a Block, and WAHtmlCanvas>>#script: SAYS > it takes "aBlock", but that HAS to be wrong, because > WAScriptTag>>#with: ends up writing the Block's "greaseString" to the > stream... > > thanks. > _______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside From johan at inceptive.be Fri Oct 30 19:49:34 2015 From: johan at inceptive.be (Johan Brichau) Date: Fri Oct 30 19:49:38 2015 Subject: [Seaside] still struggling with the confusing scripting API's In-Reply-To: <1B1AA3F5-9284-469E-B547-B9494C571FFB@inceptive.be> References: <1B1AA3F5-9284-469E-B547-B9494C571FFB@inceptive.be> Message-ID: There?s a better version: html script with: ((html javascript alias: 'MyJavascriptObject') createWithArguments: { (html javascript alias: 'document') call: 'getElementById' with: #id1 }) with the implementation of JSObject>>createWithArguments as follows: createWithArguments: aCollection "new ()" (self apply: aCollection) create We could add these to Seaside 3.2 I think they make sense for generating those pieces of code in a more succinct way. Johan > On 30 Oct 2015, at 20:45, Johan Brichau wrote: > > Hi Chris, > > It is *possible*: > > html script with: ((html javascript alias: 'MyJavascriptObject') apply: { (html javascript alias: 'document') call: 'getElementById' with: #id1 }) create > > One important thing to know is that the Seaside script generation api does not cover all possible Javascript expressions. > I believe it was never intended to cover the complete language either. We can, of course, always extend the possibilities. > > Our experience is that it does the job to glue Seaside-JQuery generated expressions to hand-written Javascript, or for small pieces of JS code. > If it?s harder to write the JS code in Seaside, then you should not try to write it in Seaside ;) I mean: it?s not as succinct as the concrete syntax because we?re generating something like Javascript ASTs here. > I would definitely opt for this version: > > html script with: (JSStream on: 'new MyJavascriptObject(document.getElementById(''#id1''))?) > > Alternatively, the following is possible by adding a simple convenience method: > > html script with: ((html javascript create: (html javascript alias: 'MyJavascriptObject') withArguments: { (html javascript alias: 'document') call: 'getElementById' with: #id1 })) > > With JSObject>>create:withArguments: implemented as: > > create: anObject withArguments: aCollection > "new ()" > ^ (anObject apply: aCollection) create > > Depending on your use case, the other options are: > - use handwritten javascript functions and call those from generated scripts, limiting the constructs you need to be generated to those that can be done well in Seaside > - generate javascript strings instead of ASTs, as in my final code snippet. > - write a complete wrapper library like how it?s done for jQuery to work with your Javascript library. > > Hope this helps > Johan > >> On 30 Oct 2015, at 17:52, Chris Muller wrote: >> >> I'm still trying to get my head around "what is the best way to write >> javascript in Seaside. I just spent an entire morning and still >> failed to write the simplest expression via an aggregation of >> Seaside's JSDecoration's. This is what I want to render: >> >> new MyJavascriptObject(document.getElementById("id1")) >> >> Using Seasides various brushes and canvas API, I could not even get >> the first two words right. I tried: >> >> html script with: (html javascript create access: 'MyJavascriptObject')) >> html script with: (html javascript create add: 'MyJavascriptObject')) >> html script with: (html javascript create alias: 'MyJavascriptObject')) >> html script with: (html javascript create assign: 'MyJavascriptObject')) >> >> None of those produce "new MyJavascriptObject", what am I missing? >> Its almost like there is a missing JSDecoration or capability missing >> from JSStatement..? >> >> After throwing up my hands with that, I decided to try "hard coding" >> the Javascript strings into my Seaside rendering methods: >> >> html script with: (html javascript script: [ : s | s add: 'new >> MyJavascriptObject(document.getElementById("', (aPufDomainComponent >> htmlId),'") ]) >> >> which produces: >> >> new MyJavascriptObject(document.getElementById(\"id1\") >> >> So that is pretty much what I want, but see that it is escaping the >> quote characters, which makes it hard to read in the browser. Are >> those necessary or is there some way to avoid that? >> >> I wanted to avoid having to put big chunks of hardcoded Javascript >> strings into my Smalltalk code. Any advice is appreciated. >> >> - Chris >> >> PS -- I think the inconsistency of the API is part of my struggle. >> JSObject script: can accept a Block, and WAHtmlCanvas>>#script: SAYS >> it takes "aBlock", but that HAS to be wrong, because >> WAScriptTag>>#with: ends up writing the Block's "greaseString" to the >> stream... >> >> thanks. >> _______________________________________________ >> seaside mailing list >> seaside@lists.squeakfoundation.org >> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > From johan at inceptive.be Fri Oct 30 20:09:41 2015 From: johan at inceptive.be (Johan Brichau) Date: Fri Oct 30 20:09:46 2015 Subject: [Seaside] still struggling with the confusing scripting API's In-Reply-To: References: Message-ID: <5FE09AEB-ED28-4CF7-A1EA-2A4C08C3CE52@inceptive.be> > On 30 Oct 2015, at 17:52, Chris Muller wrote: > > PS -- I think the inconsistency of the API is part of my struggle. > JSObject script: can accept a Block, and WAHtmlCanvas>>#script: SAYS > it takes "aBlock", but that HAS to be wrong, because > WAScriptTag>>#with: ends up writing the Block's "greaseString" to the > stream... The argument name of WAHtmlCanvas>>script: is indeed wrong. I guess this was a copy/paste issue. Thanks for spotting. Will fix that. Johan -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20151030/32031968/attachment-0001.htm From johan at inceptive.be Fri Oct 30 20:19:28 2015 From: johan at inceptive.be (Johan Brichau) Date: Fri Oct 30 20:19:33 2015 Subject: [Seaside] The SushiShop In-Reply-To: <87io5w1snj.fsf@inria.fr> References: <87bnc3bd77.fsf@inria.fr> <87io5w1snj.fsf@inria.fr> Message-ID: <634B97DB-8377-4996-803B-98D3E1F45358@inceptive.be> Damien, I?m adding the Todo application example I used at ESUG in Cambridge to the Seaside-Examples package. I think it will be a more up-to-date example. It?s already in the repo for 3.2 but I intend to improve it since it was quickly written for the tutorial demos I did back then. So, I would not recommend to point beginners to it right now, but wait a little more. It should ship with the 3.2.0 version Johan > On 24 Oct 2015, at 12:13, Damien Cassou wrote: > > > Philippe Marschall writes: > >> On Tue, Oct 13, 2015 at 6:32 AM, Damien Cassou wrote: >>> is the SushiShop Seaside example application still available anywhere? >> >> Sure, the store project from [1] >> >>> Is there a modern version somewhere? >> >> I don't know. It looks as if some people have been working on it. >> >> [1] http://www.squeaksource.com/SeasideExamples.html > > > thanks Philippe. The code is using #isolate:, IIRC that was to prevent > the use of the back button. But this method does not exist anymore. > > go > | shipping billing creditCard | > cart := WAStoreCart new. > self isolate: > [[self fillCart. > self confirmContentsOfCart] > whileFalse]. > > self isolate: > [shipping := self getShippingAddress. > billing := (self useAsBillingAddress: shipping) > ifFalse: [self getBillingAddress] > ifTrue: [shipping]. > creditCard := self getPaymentInfo. > self shipTo: shipping billTo: billing payWith: creditCard]. > > self displayConfirmation. > > > > -- > Damien Cassou > http://damiencassou.seasidehosting.st > > "Success is the ability to go from one failure to another without > losing enthusiasm." --Winston Churchill > _______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside From gaston.dalloglio at gmail.com Fri Oct 30 22:34:15 2015 From: gaston.dalloglio at gmail.com (=?UTF-8?Q?Gast=C3=B3n_Dall=27_Oglio?=) Date: Fri Oct 30 22:34:37 2015 Subject: [Seaside] Re: WAComponent to PDF In-Reply-To: References: Message-ID: Hello. Torsten thanks for share RenoirSt link! I love it https://github.com/gcotelli/RenoirSt/blob/stable/docs/tutorial/Tutorial%20-%20Part%20I.md Will it be possible to integrate with your Bootstrap for pharo in any way? Cheers 2015-10-28 9:09 GMT-03:00 Torsten Bergmann : > Otto Behrens wrote: > >We took all our CSS out of Seaside and put it on disk. We use less and > >what not to "compile" it and get the web server to produce it. Mainly > >because 1. Seaside is too heavyweight to serve (dynamically created) > >CSS up as well as the HTML and 2. The tools are a but scrappy to deal > >with CSS properly (but would be nice if we had a Seaside-like library > >that helps with CSS). > > Did you check: http://gcotelli.github.io/RenoirSt > for Pharo? > > Bye > T. > _______________________________________________ > 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/20151030/826f700f/attachment.htm From asqueaker at gmail.com Sat Oct 31 16:04:18 2015 From: asqueaker at gmail.com (Chris Muller) Date: Sat Oct 31 16:04:19 2015 Subject: [Seaside] still struggling with the confusing scripting API's In-Reply-To: <1B1AA3F5-9284-469E-B547-B9494C571FFB@inceptive.be> References: <1B1AA3F5-9284-469E-B547-B9494C571FFB@inceptive.be> Message-ID: > One important thing to know is that the Seaside script generation api does not cover all possible Javascript expressions. I wasn't sure, good to know. > I believe it was never intended to cover the complete language either. We can, of course, always extend the possibilities. > > Our experience is that it does the job to glue Seaside-JQuery generated expressions to hand-written Javascript, or for small pieces of JS code. > If it?s harder to write the JS code in Seaside, then you should not try to write it in Seaside ;) I mean: it?s not as succinct as the concrete syntax because we?re generating something like Javascript ASTs here. True, but I am attracted to the idea of generating it via Smalltalk messages because (1) I think that approach provides me easier opportunities for factoring and reuse, plus (2) I don't end up with "two languages", each with their own syntax, in one method, which becomes VERY difficult to read and maintain because I can't use my IDE's capability to "select expressions" inside (parens), [brackets], 'quotes', etc. > I would definitely opt for this version: > > html script with: (JSStream on: 'new MyJavascriptObject(document.getElementById(''#id1''))?) One of my reservations about that is it bypasses the brush API, which is not only the prescribed way to use Seaside, it also sets up some state on the Canvas ('currentBrush') which might be needed..? So, can I do that going through the Brush api? Everything I try causes the various HTML characters to be escaped... > Alternatively, the following is possible by adding a simple convenience method: > > html script with: ((html javascript create: (html javascript alias: 'MyJavascriptObject') withArguments: { (html javascript alias: 'document') call: 'getElementById' with: #id1 })) > > With JSObject>>create:withArguments: implemented as: > > create: anObject withArguments: aCollection > "new ()" > ^ (anObject apply: aCollection) create I think I like that.. > Depending on your use case, the other options are: > - use handwritten javascript functions and call those from generated scripts, limiting the constructs you need to be generated to those that can be done well in Seaside > - generate javascript strings instead of ASTs, as in my final code snippet. > - write a complete wrapper library like how it?s done for jQuery to work with your Javascript library. > > Hope this helps Indeed, thanks.