squeak

Squeak SecureSMTPClient to send HTML email

对着背影说爱祢 提交于 2019-12-08 07:14:38
问题 I am having trouble figuring out how to send an html e-Mail using SecureSMTPClient . The e-Mail client always shows it as plaintext, which means that the MIME is not getting set, i.e. SecureSMTPClient forgets to send: MIME-Version: 1.0 Content-Type: text/html; charset=utf-8 eventhough I specify text/html . Here is the code title:='title1'. content:='<a href="myurl">a link</a>'. smtpClient := SecureSMTPClient new. smtpClient user: senderMailAddress. smtpClient password: pw. smtpClient

Get sender of a message in Smalltalk

拥有回忆 提交于 2019-12-08 06:17:44
问题 Is there a practical way to get the sender of a message in Smalltalk without manually passing self as a Parameter? To be more concrete: I want to add a class specific prefix to an ID that gets passed to my class, so if ClassA sends (on class side) ClassB doSomethingWith: 'myId'. ClassB should internally treat 'myId' as 'ClassB-myId' or something similar. I have implemented this with an additional parameter which has to be self ClassB doSomethingWith: 'myId' for: self. but I would be very glad

Packages for developing static web sites in Smalltalk?

陌路散爱 提交于 2019-12-07 19:14:19
问题 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

“:=” and binary message precedence in Smalltalk

社会主义新天地 提交于 2019-12-07 09:34:05
问题 I am attempting to learn Smalltalk through the tutorials included with Dolphin Smalltalk X6. My question deals with the evaluation of expressions with multiple messages. My understanding is that simple messages are evaluated first, then binary messages, and finally keyword messages (with the exception of code in parenthesis). However, I am having trouble applying this understanding to the second line in the following example (found in the Dolphin Smalltalk tutorial). playground := Playground

How does the implementation of #doesNotUnderstand in the Object class result in opening a debugger in Squeak smalltalk?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-07 06:42:53
问题 I know that the implementation signals a MessageNotUnderstood exception, but how does that end up opening a debugger? 回答1: When an Exception remains unhandled after it has been signalled, its #defaultAction is invoked. MessageNotUnderstood>>defaultAction delegates to Error>>defaultAction, which signals an UnhandledError (another Exception). This exception, in turn, has a defaultAction whose code reads like this: ^ ToolSet debugError: self exception ...which opens the debugger if you use the

how to stream a collection backwards without copies?

萝らか妹 提交于 2019-12-07 06:24:19
问题 I would like to know how to stream a collection backwards without copies in Pharo/Squeak. For example, to stream #(1 2 3) so stream next returns 3 , then 2 , then 1 . I know I could just use collection reversed readStream , but reversed copies. 回答1: You could use a Generator: | coll stream | coll := #(1 2 3). stream := Generator on: [:g | coll reverseDo: [:ea | g yield: ea]]. stream next Generators let you wrap a streaming interface around any piece of code, basically. 回答2: Create the

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

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

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