seaside

Write helpers for wrapping HTML elements

℡╲_俬逩灬. 提交于 2019-12-24 10:46:15
问题 I am currently writing my own Component base class with a whole bunch of helper methods for using the Twitter Bootstrap CSS framework (and avoiding all the boilerplate code around it). They can be used very much like the existing form helpers (like html div ... ). E.g., the one for horizontal text fields (in a horizontal form) looks like this: horizontalTextField: aLabel | field | field := WATextInputTag new class: 'input-xlarge'; yourself. self html div class: 'control-group'; with: [ self

Any reason not to write my own HTML?

和自甴很熟 提交于 2019-12-24 07:10:26
问题 In Seaside, in all those renderContentOn: methods, I can use the HTML canvas object to assemble my DOM tree. I am writing a bunch of helpers for my components currently, because I'm using Twitter Bootstrap for the styling and don't want to write all that boilerplate code ( <div> s en mas) all the time. For the way this is setup, the easiest way for me is to simply (I want to avoid using with: aBlock in those helpers) write out the HTML for the wrapping DIVs like this: html html: '<div class=

What is the difference between Seaside programmming and other web programming

若如初见. 提交于 2019-12-22 03:44:11
问题 To me it seems the main point of Seaside is that it is more like normal "desktop" programming. The control flow looks much more like "traditional" programming instead of "web" programming. Is that a correct impression? I know it's about Web programming but it's does not looks like it from the programmers side. It looks much more than driving "desktop" applications. Does this clarify the question a bit? 回答1: Your impression is correct. Seaside is designed for what I call a tree-like control

How to save a html5 canvas.toDataURL as a png file on the server using Seaside

孤人 提交于 2019-12-13 00:48:46
问题 I have an image that users can annotate on the browser. I can access the image using canvas.toDataURL() ...I'd like to add a 'save' option for the user to save the image on the server. This question has been answered for php... file_put_contents('test.png', base64_decode(substr($data, strpos($data, ",")+1))); ...what I need is a Seaside callback with the PNG file content. Is there a way to do this in Seaside? Johan pointed out that the mine type declaration has to be removed from the value

What object to hold a large amount of text in?

无人久伴 提交于 2019-12-11 06:51:44
问题 I am planning a Seaside app to hold text, a single instance which may be up to, say, 5Mb. What kind of object is best for this? I would also like to do some iterations over this text. Thanks, Vince Edit: Thanks for your replies thus far. The file is a CSV file that takes ~40 minutes to generate from a legacy finance system, so it must be pre-generated and stored. Each line is a customer record and I need to pull each one out and use the values as and when the customer logs in. Customer access

Debugging in Pharo 5 headless mode

别来无恙 提交于 2019-12-11 03:34:26
问题 I'm running pharo 5 (seaside) in headless mode, with RFB: ./pharo -vm-display-null -vm-sound-null /app/pharo5/Pharo5.0.image --no-quit Locally works well (Ubuntu 14 with XFCE). In DigitalOcean (Ubuntu 14 without GUI) it works until the debugger is activated: then it closes. I can connect via VNC with no problem, but when I execute a Halt or an error it triggers the debugger, it leaves ... some clue of the problem? 回答1: This sounds like a case where remote debugging might be a reasonable

Performance differences between Swazoo and Komanche?

泪湿孤枕 提交于 2019-12-10 16:55:59
问题 I'd like to know what the performance differences between Swazoo and Komanche in general and for Seaside are. Especially why and in what situations I should prefer the one over the other? 回答1: The only major differences between the two are: Swazoo is licensed under the LGPL, while Komanche is licensed under the MIT license. Some people are very uncomfortable using LGPL software in Smalltalk, since the definition of whether something is a library in a Smalltalk is extremely ambiguous. If you

How to access the jQuery event object in a Seaside callback

时光怂恿深爱的人放手 提交于 2019-12-08 16:39:33
问题 Basically, I want to translate the following into Seaside Smalltalk: $(".myDiv").bind('click', function(e) { console.log(e); }); Besides that I don't want to console.log the event, but access it in my ajax callback. The most promising approach seemed to be something like html div onClick: (html jQuery ajax callback: [:v | self halt] value: (???); with: 'Foo'. But I couldn't find any way to access the event that caused the callback. Intuitively, I would try html jQuery this event for the ???

FileDirectory and ReferenceStream Class equivalents in Pharo?

北慕城南 提交于 2019-12-08 01:10:33
问题 I'm doing the persistance example at: http://book.seaside.st/book/advanced/persistency/image-based-persistency It involves creating a method that uses the FileDirectory class like this: SMFileDatabase class>>backupDirectory ^ (FileDirectory default directoryNamed: self name) assureExistence. Pharo seems to be unable to find the Class and the closest that comes out in search is FileDirectoryWrapper. Will this do? NB. I can't figure this out myself since I've never used FileDirectory or