pharo

Using Squeak from a shell

女生的网名这么多〃 提交于 2019-12-03 17:57:59
问题 Can I launch Squeak as a REPL (no GUI), where I can enter and evaluate Smalltalk expressions? I know the default image don't allow this. Is there any documentation on how to build a minimum image that can be accessed from a command-line shell? 回答1: Here is a (hackish) solution: First, you need OSProcess, so run this in a Workspace: Gofer new squeaksource:'OSProcess'; package:'OSProcess';load. Next, put this in the file repl.st: OSProcess thisOSProcess stdOut nextPutAll: 'Welcome to the simple

Microframeworks for Squeak/Pharo web service

妖精的绣舞 提交于 2019-12-03 16:00:35
Lots of languages have microframeworks for writing very tiny websites or web services, such as Flask for Python, or Sinatra for Ruby. On Squeak, there doesn't seem to be any equivalent; Iliad, Seaside, and AIDA are all very heavy for just having a little service. What's the preferred way to accomplish this? Directly injecting a hanlder into Comanche or Swazoo? Sebastian N. I would like to share what I think is more up-to-date information (as of end of 2012). Zinc Components Currently in Pharo 1.4/2.0 the de-facto standard for HTTP client/server seems to be the Zinc HTTP Components . And the

How can I refresh a session for every 60 second and display it on transcript with Pharo?

爱⌒轻易说出口 提交于 2019-12-02 06:34:29
问题 |a b | a := ZnClient new. a get: 'http://cloud-storage.com/login'. a formAt: 'username' put: 'jom'; formAt: 'password' put: 'mypass'; post; get: 'http://cloud-storage.com/my-file'. "Here I want to refresh the session for every 60sec and" "to checking for newer data" b := a maxNumberOfRedirects:60 Transcript show: b; cr. I would like to implement a method that can refresh the ZnClient session every 60s for checking for newer data on the server I am logged into. I tried the redirect method of

Colored Window Theme in Pharo?

一世执手 提交于 2019-12-02 05:06:47
问题 How do I switch to the colored window theme in Pharo? 回答1: Not sure which theme you mean but have you tried world menu -> System -> Settings -> Appearance -> Morphic -> User interface theme? The select box will let you choose the window color theme. 回答2: Or...by code... execute: XXXTheme beCurrent. 回答3: Best neat way to do this is to install the TWM (Tiled Windows Manager) and use its theme. That the closest you'll get to a squeak colorful windows meets pharo theme. You can get the theme

How can I refresh a session for every 60 second and display it on transcript with Pharo?

我的未来我决定 提交于 2019-12-02 00:39:21
|a b | a := ZnClient new. a get: 'http://cloud-storage.com/login'. a formAt: 'username' put: 'jom'; formAt: 'password' put: 'mypass'; post; get: 'http://cloud-storage.com/my-file'. "Here I want to refresh the session for every 60sec and" "to checking for newer data" b := a maxNumberOfRedirects:60 Transcript show: b; cr. I would like to implement a method that can refresh the ZnClient session every 60s for checking for newer data on the server I am logged into. I tried the redirect method of pharo but it does not seem to work. or say It does not show anything. Any idea? | session data | session

How can I easily change to native fonts in Smalltalk Squeak/Pharo

怎甘沉沦 提交于 2019-11-30 13:50:49
问题 With every new Squeak/Pharo image, I immediately change the fonts to some native version. It is a lot of mouseclicks and I want to script the process. 回答1: The above answer might be outdated by now, at least it doesn't work with my 3.10 image. so, I use this: defaultFont := LogicalFont familyName: 'Geneva' pointSize: 10 emphasis:0 . codeFont := LogicalFont familyName: 'Monaco' pointSize: 10 emphasis:0. Preferences setCodeFontTo: codeFont. Preferences setWindowTitleFontTo: defaultFont.

Error Unknown variable:BouncingAtomsMorph openInWorld please correct or cancel

女生的网名这么多〃 提交于 2019-11-30 08:43:52
问题 I'm new to Pharo ,my problem is when I try to run the BouncingAtomsMorph openInWorld example I keep getting the following error message: Unknown variable:BouncingAtomsMorph openInWorld please correct or cancel Please help! 回答1: Sadly Bouncing Atoms are no longer included in the standard distribution of newer Pharo versions. To load it evaluate in a workspace or playground: Gofer it url: 'http://smalltalkhub.com/mc/PharoExtras/MorphExamplesAndDemos/main'; package: 'MorphExamplesAndDemos'; load

How can I easily change to native fonts in Smalltalk Squeak/Pharo

╄→尐↘猪︶ㄣ 提交于 2019-11-30 08:38:28
With every new Squeak/Pharo image, I immediately change the fonts to some native version. It is a lot of mouseclicks and I want to script the process. The above answer might be outdated by now, at least it doesn't work with my 3.10 image. so, I use this: defaultFont := LogicalFont familyName: 'Geneva' pointSize: 10 emphasis:0 . codeFont := LogicalFont familyName: 'Monaco' pointSize: 10 emphasis:0. Preferences setCodeFontTo: codeFont. Preferences setWindowTitleFontTo: defaultFont. Preferences setButtonFontTo: defaultFont. Preferences setListFontTo: defaultFont. Preferences setMenuFontTo:

How can I add an item in the World-menu of Pharo 4.0?

给你一囗甜甜゛ 提交于 2019-11-29 07:21:48
How can I add a new item - Workspace openLabel: 'Workspace' - to the World-menu of Pharo 4.0 ? (What can I say... I prefer Workspace over the new what's-it-called. :-) I've looked at several menu-related items in the Browser, but couldn't really make head or tails of it. I also tried to find where the menu is stored (it must be somewhere, right?), but couldn't find it. Also, how would I go about to add it to one of the existing sub-menues of World-menu, and how could I create a new sub-menu (in the World-menu) and add it there? Add the following class method to any class you like. Best to make

Error Unknown variable:BouncingAtomsMorph openInWorld please correct or cancel

被刻印的时光 ゝ 提交于 2019-11-29 07:16:31
I'm new to Pharo ,my problem is when I try to run the BouncingAtomsMorph openInWorld example I keep getting the following error message: Unknown variable:BouncingAtomsMorph openInWorld please correct or cancel Please help! MartinW Sadly Bouncing Atoms are no longer included in the standard distribution of newer Pharo versions. To load it evaluate in a workspace or playground: Gofer it url: 'http://smalltalkhub.com/mc/PharoExtras/MorphExamplesAndDemos/main'; package: 'MorphExamplesAndDemos'; load. Then BouncingAtomsMorph new openInWorld will work. Pharo 5 update: The MorphExamplesAndDemos