Questions tagged [smalltalk]

Smalltalk is one of the oldest object-oriented programming languages. It pioneered many aspects modern developers take for granted: Virtual Machines (Smalltalk is an interpreted language) IDEs Pure object approach (no primitives or keywords at all) Closures (called Blocks) An image (i.e. non-file-based language) Advanced debugging techniques (halting programs on-the-fly, inspection, writing or modifying code on-the-fly)

Smalltalk is one of the oldest object-oriented programming languages. It pioneered many aspects modern developers take for granted:

  • Virtual Machines
  • IDEs
  • Pure object approach (no primitives types at all, and even nil is an object)
  • Library-based language (with only a handful of reserved keywords)
  • Closures (called Blocks)
  • An image (i.e. non-file-based language)
  • Advanced debugging techniques (halting programs on-the-fly, inspection, writing or modifying code on-the-fly)
  • Comes in various flavours and dialects, from full-blown commercial solutions to open-source community-based ones

Free Smalltalk Programming Books

1696 questions
1
vote
2 answers

Override '+' in smalltalk, to accept two parameters?

Is it possible to override the + operator in smalltalk to accept two params? i.e., I need to also pass in the units for my custom class. Something like: Number subclass: #NumberWithUnits instanceVariableNames: 'myName…
MrDuk
  • 16,578
  • 18
  • 74
  • 133
1
vote
1 answer

How to persist graphs presenting circular references in Voyage?

I'm having an issue I don't recall having had about half a year ago when trying out Voyage. In my schema, a User has an instVar referencing all the Centers he belongs to, and a Center has an instVar referencing all of its Users, so when the Voyage…
Bernat Romagosa
  • 1,172
  • 9
  • 15
1
vote
3 answers

Smalltalk ifFalse / ifTrue not working

Can someone explain why this isn't working how I expect? add: rhsKey myUnits includesKey: rhsKey ifTrue: myUnits put: (myUnits at: rhsKey) + 1 at: rhsKey ifFalse: myUnits add: rhsKey -> 1. Example execution: ut :=…
MrDuk
  • 16,578
  • 18
  • 74
  • 133
1
vote
1 answer

Smalltalk dictionary as calculator

I'm working on a homework assignment that asks us to create a type of Units class that can keep track of units and perform basic arithmetic on them. The problem description has this bit, which I don't completely understand: Probably the easiest way…
MrDuk
  • 16,578
  • 18
  • 74
  • 133
1
vote
1 answer

NBFFICallback with Win32 types raising type unresolved

I am currently exploring NativeBoost. Thought i will start with a simple event hook. For defining the callback i subclassed NBFFICallback and added my fnSpec with a return type of LRESULT. fnSpec ^ 'LRESULT ( INT nCode, LPARAM lParam , WPARAM…
Thushar G R
  • 1,017
  • 9
  • 24
1
vote
1 answer

Swazoo REST test server

I would like to use Swazoo to write a simple REST test server. When the server receives a request, some dialog shows it to the user and they provide a response. I subclassed SwazooResource and make sure a request to the server always gets a resource…
Cantillon
  • 1,588
  • 1
  • 12
  • 23
1
vote
1 answer

Saving modifications to existing kernel methods to Monticello

I'm working on Phratch (Scratch 2.0 in Smalltalk) and have modified the InputEventSensor>>processEvent method to store the last key pressed, in a similar manner to how the modifier keys are stored, so that they if pressed blocks work. So I…
Eric Clack
  • 1,886
  • 1
  • 15
  • 28
1
vote
5 answers

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?
Nathan Campos
  • 28,769
  • 59
  • 194
  • 300
1
vote
2 answers

Skipping every other array element

So Im trying to skip past every other element and enter them into a collection. I am then converting the collection back to an array and trying to return it. Im not sure whats wrong though. altElement | newColl x y | newColl:=…
TheNodeCommode
  • 93
  • 1
  • 2
  • 8
1
vote
2 answers

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…
user69514
  • 26,935
  • 59
  • 154
  • 188
1
vote
2 answers

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?
user69514
  • 26,935
  • 59
  • 154
  • 188
1
vote
0 answers

Session key changing for same client(HttpClient)

I am trying to figure out what i might be missing here. I have a Servlet TestServlet which is , Smalltalk defineClass: #TestServlet superclass: #{VisualWave.HttpServlet} indexedType: #none private: false instanceVariableNames: '' …
Thushar G R
  • 1,017
  • 9
  • 24
1
vote
1 answer

Seaside + jQuery variable check for onBlur

How do I code a variable check into a Seaside jQuery onSuccess: script? I have an application with input fields that trigger a value change followed by a re-rendering of the view. It works nicely to provide lively feedback of domain data based on…
Bob Nemec
  • 366
  • 1
  • 3
  • 10
1
vote
2 answers

Lazy list s-expression matrix in smalltalk

So I have a class to create in smalltalk called LazyMatrix. The class only has 1 instance variable and cannot be a subclass of anything but Object. The instance variable of LazyMatrix is called block and must be a back. I initialize LazyMatrix like…
Wes Field
  • 3,291
  • 6
  • 23
  • 26
1
vote
1 answer

Make a Matrix class that can be initialized without declaring matrix size first

I am new to Smalltalk and am taking a class init currently. One of the problems we were assigned requires creating a new Class "HeavyMatrix", which is called like this — aMatrix := HeavyMatrix new. Notice that there is no initial size assignment.…
Wes Field
  • 3,291
  • 6
  • 23
  • 26