smalltalk

seaside : 2 events on html anchor

允我心安 提交于 2019-12-04 04:11:30
问题 In seaside I need to do two events - callback and go to the other url (google.com) on clicking a link but I am not able to do both of them. What could be possibly wrong here? Is there any way I can do both the events? html anchor newTarget url: 'www.google.com'; callback: [Transcript show: 'clicked on google.com']; with: ('www.google.com') . 回答1: Because >>callback: and >>url: both update the href attribute on an Anchor tag, you can't use both on the same anchor. You will have to solve this

Smalltalk and IoC

☆樱花仙子☆ 提交于 2019-12-04 02:56:08
I see a lot of IoC frameworks for .Net and Java. Does anyone know why there are no equivalent frameworks for Smalltalk. This is more a philosophy question than anything else. I'm wondering if there is something in the Smalltalk way of doing things that precludes the necessity of having an IoC framework. MVC was invented on Smalltalk and is arguably the original Inversion of Control framework. While somewhat more lightweight than its java counterparts, it has the basic concepts of a model holding the data, a view rendering the data in response to events propogated from a controller. Less

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

Smalltalk Learning Project: Any recommendation? [closed]

我的未来我决定 提交于 2019-12-03 11:20:53
Closed . This question is opinion-based. It is not currently accepting answers. Learn more . Want to improve this question? Update the question so it can be answered with facts and citations by editing this post . Currently I am learning Smalltalk. I do this because I want to learn as much as I can in one week about a new programming language in order to improve my skills. Next week I will try something else. So far I am able to read Smalltalk code but I have a very limited experience in writing. Can you recommend me any small size project that will help me understand better this language in a

Is it really all about message passing in smalltalk

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-03 10:41:54
I'm new to smalltalk and I'm impressed with the fact that there are only just 6 keywords in the language (self, super, true, false, nil & thisContext), and how pure it is in having almost everything as message passing, eg. looping using whileTrue, if/else using ifTrue, etc ... which are way different from what I'm used to in other languages. Yet, there are cases where I just cannot make sense of how message passing really fit in, these include: the assignment operator := the cascading operator ; the period operator . the way to create a set #( ... ) These aren't message passing, right? As you

Explain a piece of Smalltalk code?

匿名 (未验证) 提交于 2019-12-03 08:44:33
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I cannot understand this piece of Smalltalk code: [(line := self upTo: Character cr) size = 0] whileTrue. Can anybody help explain it? 回答1: One easy thing to do, if you have the image where the code came from, is run a debugger on it and step through. If you came across the code out of context, like a mailing list post, then you could browse implementers of one of the messages and see what it does. For example, #size and #whileTrue are pretty standard, so we'll skip those for now, but #upTo: sounds interesting. It reminds me of the stream

What is the difference between Seaside programmming and other web programming

匿名 (未验证) 提交于 2019-12-03 08:36:05
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: 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 flow, as desktop GUI apps have. Comparing

Does Seaside scale?

烈酒焚心 提交于 2019-12-03 05:45:53
问题 Seaside is known as "the heretical web framework". One of the points that make it heretical is that it has much shared state. That however is something which, in my current understanding, hinders easy scaling. Ruby on rails on the other hand shares as less state as possible. It has been known to scale pretty well, even if it is dog slow compared to modern smalltalk vms. flickr uses php and has scaled to an extremly big infrastructure... So has anybody some experience in the scaling of Seaside

What is a Smalltalk “image”?

痴心易碎 提交于 2019-12-03 04:50:17
问题 What is a Smalltalk "image"? Is it like serializing a Smalltalk run-time? 回答1: Most popular programming systems separate program code (in the form of class definitions, functions or procedures) from program state (such as objects or other forms of application data). They load the program code when an application is started, and any previous application state has to be recreated explicitly from configuration files or other data sources. Any settings the application programmer doesn't