smalltalk

Smalltalk, newline character

Does anybody know what's the newline delimiter for a string in smalltalk? I'm trying to split a string in separate lines, but I cannot figure out what's the newline character is smalltalk. ie. string := 'smalltalk is a lot of fun. ok, it's not.' I need to split it in: line1: smalltalk is line2: a lot of fun. l...

Smalltalk - Converting text object to string

Hi I have text editor widget in smalltalk (visual works) that returns a text object, however I want the text returned to be handled as a string object. How do you parse a text object as a string? ...

Smalltalk, displaying OrderedCollection to List Widget

Hi I have an ordered collection of strings which I'm trying to display on a list widget. I do the following: self displayWidget list: coll. where displayWidget is a List Widget and coll is the OrderedCollection containing the strings. It will display it, but it displays it in a single line. Instead of getting line one line two line ...

Best OS And Tools For SmallTalk Learning And Development

I'm starting to learn Smalltalk. What's the best OS (in terms of having more and better tools) and tools for development? ...

Smalltalk - Compare two strings for equality

I am trying to compare two strings in Smalltalk, but I seem to be doing something wrong. I keep getting this error: Unhandled Exception: Non-boolean receiver. Proceed for truth. stringOne := 'hello'. stringTwo := 'hello'. myNumber := 10. [stringOne = stringTwo ] ifTrue:[ myNumber := 20]. Any idea what I'm doing wrong? ...

Smalltalk - Inserting a TAB character (Visual Works)

I'm having some trouble inserting a tab between two strings. stringOne := 'Name'. stringTwo := 'Address'. I've tried: info := stringOne, String tab, stringTwo. or info := stringOne, Character tab asString, stringTwo. But none of those two messages are understood. I'm using Visual Works. ...

GemStone-Linux-Apache-Seaside-Smalltalk.. how practical is 4GB?

I am really interested in GLASS. The 4GB limit for the free version has me concerned. Especially when I consider the price for the next level ($7000 year). I know this can be subjective and variable, but can someone describe for me in everyday terms what 4 GB of GLASS will get you? Maybe a business example. 4 GB may get me more sto...

Redefining instance variables of a Smalltalk class

I've never used Smalltalk, but I've read a lot about it and it has always intrigued me. I've seen the cool demos where a program is running and simply by changing the methods of the classes the program's objects are using alters the running program's behavior. It's clearly powerful stuff and I understand how that can work the way it does...

Distributed source control for VisualWorks Smalltalk

One of the annoying things about Smalltalk is that it (usually) requires its own VCS, due to the way that it manages its source code. Squeak and Gemstone (at least in its GLASS version) have a DVCS called Monticello that works passably well. As near as I can tell, VisualWorks' main VCS, StORE, only works in old-fashioned centralized mo...

Migrating from SUnit to Phexample

Hi, I'm trying out Pharo's Phexample and I like it, but it feels clumsy to have half my unit tests in SUnit and the other half in Phexample. Does Phexample have like an import feature for my existing tests? ...

How to find the current stack?

Hi, in Pharo, how can I find the currently evaluating stack? ...

How do I copy and paste an error message in Pharo?

Squeak was once innovative by giving people more than a dull error message: a debugger and go figure out! However, nowadays there's a google, and now it'd rock to copy paste the error message, which is typically served as the title of a debugger window. How can I copy and paste that error message? ...

Pharo Gofer, can it fallback to local package cache when offline?

Can I tell Gofer to fall back to the local package cache when no internet is available? For example such that I can use Gofer it squeaksource: 'CodePhoo'; addPackage: 'CodePhoo'; load to setup an image when offline on the train? (In that case we can be sure that the packages are in fact available locally from a previous i...

What is so special about Smalltalk?

In every technical publication, and on this site too, people are always comparing OO languages to Smalltalk. My experience is in Java: is Smalltalk so important that I should study it? ...

Showing inherited methods in Squeak/Pharo Smalltalk

I'm familiar with the VisualWorks and Dolphin versions of Smalltalk, but have not previously used Squeak. I'm just familiarising myself with Pharo, which is a 'cleaned up' fork of Squeak. I'm used to having the facility in the Class Browser to show either only the methods implemented by a class or both the methods inherited and the meth...

How do you set the class of an object to something else?

Hi, I've seen this recently and now I can't find it … How do you set the class of an object to something else? --Update: Well, in Pharo! Like: d:=Object new. d setClass: Dictionary. Only that it isn't actually setClass. How can you modify the class pointer of an object? ...

JQuery UI + Seaside set-up

Which package(s) do I need to load for jQuery UI in Seaside? Currently I have these installed/loaded: Pharo Seaside One-Click Image Added the jQuery repository to the Monticello Browser (Squeaksource - jQuery) Loaded jQuery-EL.10.mcz However when I run this example I get the error "MessageNotUnderstood: WARenderCanvas>>jQuery" ...

Find references to string/symbol/method

This relates to the Dolphin variant of Smalltalk. I'm digging around in the image to try and figure this out but haven't find the correct method invocation yet and I'm hoping someone might be able to help shortcut this process. What I'm trying to do is to find all methods (either within the entire system or, preferably, just within...

What are good forums or mailing lists for programmers new to Smalltalk?

I would like to start a Community Wiki on good resources for programmers new to Smalltalk. I'm especially looking for good forums and/or mailing lists for programmers that are new to Smalltalk. Please correct me if I'm wrong (this is a wiki after all), but what I've found so far seem to be geared toward current Smalltalk programmers than...

What are the various popularity metrics and sites for programming languages such as Ruby, Python, Java, etc?

What are the various sites that offer metrics that compare Ruby, Python, Perl, Smalltalk etc. What are their respective metrics? Do any of them control or account for the time that Rails was introduced, and/or the adoption rates for various languages? Will someone please help me close this question? Clearly it was not a successful vent...