smalltalk

Packages for developing static web sites in Smalltalk?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-06 11:27:46
What would be good (cross Smalltalk, mantained, documented) web frameworks or packages (in terms of fewer things to learn/adapt) to use for implementing a static web site with really few forms? .i.e. : a search box and a contact form. I have no "model" or application behind, so I'm not searching for CMS or web application capabilities. There is any example or simple script of a static web site developed in any web frameworks? please I'm NOT interested in counter or 'Hello World' examples. The examples I've seen from Seaside looks too complicated, too many nested blocks with the "programmatic

Squeak SMTPs on Linux

眉间皱痕 提交于 2019-12-06 10:00:14
问题 I am using the Squeak 5 class SecureSMTPClient to send e-Mails over SSL/TLS. It works fine on my Windows machine (thanks to the answer to that question). However, on Linux i get: Error: primitiveSSLCreate failed And it prints in a console (but only the first time the image attempts to send the mail): # ioLoadModule(/home/squeak5vm/SqueakSSL): /home/squeak5vm/SqueakSSL: undefined symbol: clock_gettime Squeak "primitives" are functions that talk to the platform and libraries. My guess is, that

Smalltalk ReferenceStream has problems with new instance variables?

∥☆過路亽.° 提交于 2019-12-06 04:45:39
问题 In Pharo Smalltalk I'm using ReferenceStream to serialise a list of objects -- here's the class definition of the objects I'm serialising: Object subclass: #Task instanceVariableNames: 'title notes list project dateNextAction dateCreated dateCompleted importance selected' classVariableNames: 'Database' poolDictionaries: '' category: 'ToDo' I'm using the SMFileDatabase method described here: http://book.seaside.st/book/advanced/persistency/image-based-persistency This has been working well,

How to load VMMaker in Squeak?

吃可爱长大的小学妹 提交于 2019-12-06 04:34:27
问题 I am using Squeak 4.4 update 12327, and VM version 4.1.1. I tried to load VMMaker with ConfigurationOf scripts but always fails with exceptions mainly in the Freetype package. Gofer new squeaksource: 'MetacelloRepository'; package: 'ConfigurationOfVMMaker'; load. ((Smalltalk at: #ConfigurationOfVMMaker) project version: '1.4') load or Gofer new squeaksource: 'MetacelloRepository'; package: 'ConfigurationOfVMMaker'; load. (Smalltalk at:#ConfigurationOfVMMaker) project lastVersion load. or

Draw table in Pharo

醉酒当歌 提交于 2019-12-06 03:47:29
问题 I’d like to display a table of values and be able to select cells. How would I do this in Pharo Smalltalk? I’ve heard talk of Morphic widgets able to do this, but I’m still really new to Smalltalk. 回答1: I would look into TreeModel class side examples. I used to do that: tree := TreeModel new. tree openWithSpec. tree columns: (Array with: (TreeColumnModel new displayBlock: [:node | node content first asString ]; headerLabel: 'Name'; yourself) with: (TreeColumnModel new displayBlock: [:node |

How does Smalltalk manipulate call stack frames (thisContext)?

故事扮演 提交于 2019-12-06 03:38:57
问题 The Smalltalk object thisContext look strange and marvelous. I can't understand what it is and how it works. And even how it enables continuations. For C's call-stack, I can easily imagine how is it implemented and working. But for this... I can't. Please help me to understand it. 回答1: I think it is not an easy question. The stack is reified in the image with instances of MethodContext. A MethodContext can have a sender, which is another MethodContext. That one can have another one..

The use of “>>” in Pharo/Smalltalk

為{幸葍}努か 提交于 2019-12-06 01:22:16
I am implementing futures in Pharo. I came across this website http://onsmalltalk.com/smalltalk-concurrency-playing-with-futures . I am following this example and trying to replicate it on Pharo. However, I get to this point the last step and I have no idea what ">>" means: This symbol is not also included as part of Smalltalk syntax in http://rigaux.org/language-study/syntax-across-languages-per-language/Smalltalk.html . BlockClosure>>future ^ SFuture new value: self fixTemps I can see future is not a variable or a method implemented by BlockClosure. What should I do with this part of the

smalltalk block - can I explicitly set the returning value and stop executing the block?

谁都会走 提交于 2019-12-05 23:14:20
The return value of #value: message, when sent to a block, is the value of the last sentence in that block. So [ 1 + 2. 3 + 4. ] value evaluates to 7. I find that hard to use sometimes. Is there a way to explicitly set the returning value and stop executing the block? For exercise, try rewriting this block without using my imaginary #return: message and see how ugly it gets. I must be missing something. [ :one :two | one isNil ifTrue: [ two isNil ifTrue: [ self return: nil ] ifFalse: [ self return: true ] ]. two ifNil: [ self return: false ]. (one > two) ifTrue: [ self return: true ] ifFalse:

How to find which was the wrong message in a Message Not Understood message?

不羁岁月 提交于 2019-12-05 21:10:21
I want to find the name of the message that triggered the MNU , how do I do that ? For example if I do Transcript explode . This will trigger a MNU because method explode does not exist but how do I find that the name of the message that triggered MNU is "explode" ? If I DoIt that, I get a debugger. The title there is MessageNotUnderstood: ThreadSafeTranscript>>explode When I select the first element, I get to see the doesNotUnderstand: aMessage, where aMessage is the message Try this: [Transcript explode] on: MessageNotUnderstood do: [:ex| ex message selector] The exception's message is an

How to bind a LabelMorph/TextMorph to a variable so that the Morph reflects changes of the variable?

这一生的挚爱 提交于 2019-12-05 16:19:03
I have an object with a variable containing a String. I have a window containing a LabelMorph/TextMorph (or some other Morph that displays Text?). How do i bind the LabelMorph/TextMorph to the variable, so that the label updates when the String in the variable changes? classic Smalltalk-80 dependent/change/update mechanism? Pharo Announcement framework? something different?? How would i do this? Which Morph should i use? Depends on what you want to achieve. You might want to take a look at a way to do it with Glamour in a current Moose image. In a workspace, do-it: GLMBasicExamples new