Questions tagged [visualworks]

VisualWorks is a cross-platform implementation of the Smalltalk language.

visualworks
Filter by
Sorted by
Tagged with
1 vote
3 answers
365 views

Assigning strings to blocks and executing them in smalltalk

y:=3. z:=4. h:= '[x:= y+z.]'. (BlockClosure readFromString: h) value. I have this code where I am trying to take a string in smalltalk syntax and trying to put it in a block and executing it but I ...
amir shadaab's user avatar
3 votes
1 answer
331 views

Visualworks Cincom Smalltalk SUnit Test case for error condition

I have this piece of code. |temp| temp := 5 (temp < 3) ifFalse:[ self error: 'Invalid input'. ]. What will a SUnit test case look like, if I have to test that the above error is raised when I ...
Aditya Kappagantula's user avatar
0 votes
1 answer
528 views

Source Code missing in Cincom VIsualWorks 7.9.1 in Windows 8

I am running Cincom VisualWorks version 7.9.1 in Windows 8. When I open the class browser and view a library class, it fails to display the source, instead displaying an error comment like this: ...
Andrew Ring's user avatar
  • 3,281
2 votes
4 answers
5k views

How to convert a number to a string in Smalltalk (visual works)

I am having difficulty finding information on how to get a string representation of a number in Cincom Smalltalk. How is this performed in this language? Specifically I'm composing a string ...
Andrew Ring's user avatar
  • 3,281
0 votes
1 answer
211 views

How to save x and y in class Matrix i have created?

I have defined two objects X and Y both have same size array as an matrix x:= Matrix new. x rows: 2 columns: 2; row: 1 column: 1 put: 2; row: 2 column: 1 put: 2; row: ...
Saurabh Kalantri's user avatar
0 votes
1 answer
52 views

Visual Works Smalltalk class not getting activated

I have created a class in visual works smalltalk, added a method (for example: list) but when I called it in workspace it shows error like message not understood #list. Thank You in Advance.
Saurabh Kalantri's user avatar
0 votes
0 answers
166 views

Creating Matrix in smalltalk in visualworks

I am trying to put a value to particular location in 2D matrix in smalltalk(visualworks) with following code: xrow: rowIndex ycolumn: columnIndex put:aNumber |num| self at: (rowIndex*xrow+ ...
user2801336's user avatar
1 vote
2 answers
1k views

How to add a new method in Smalltalk source code?

I am new to Smalltalk and I am trying to add a new method in the Integer class present in Smalltalk. The method should go in the 'accessor' protocol. I am using VisualWorks and not finding any option ...
Bosco's user avatar
  • 3,975
1 vote
1 answer
2k views

How to make a Matrix Class in smalltalk Visual Works?

I am new to smalltalk and trying to make a simple TicTacToe game, I want my model class to be a matrix but I can't find a way to do it on Visual Works. I've been following this tutorial : http://...
sarahm's user avatar
  • 105
3 votes
3 answers
1k views

Implementing the observer pattern in Smalltalk/VisualWorks

I'm new to programming with patterns, i spent some hours searching for samples for Smalltalk implementation of the pattern observer but in vain. If someone can provide me with a concrete sample of the ...
SolidSnake87's user avatar
0 votes
1 answer
204 views

C call from Smalltalk

I'm trying to call EnumServicesStatus from within VisualWorks. For the first call I set the parameters to the required values to know how many bytes the returned information will require (...
Cantillon's user avatar
  • 1,608
0 votes
1 answer
459 views

VisualWorks 7.9.1 Ubuntu 12.04 [closed]

I would like to associate ~/vw7.9.1/bin/linux86/vwlinux86gui with .im files on Ubuntu 12.04, so that a double click of an .im file will open it up. Anyone know the magic? Thx for any tips...
user1898940's user avatar
1 vote
0 answers
150 views

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 ...
Thushar G R's user avatar
  • 1,037
2 votes
2 answers
155 views

Smalltalk's ReadWrite stream "atEND" evaluation has no effect

I'm evaluating the following block : [byteStream atEnd] whileFalse: [stream nextPut: self parsePacket] The problem is that my " byteStream" which is a ReadWrite stream, is at its end, (I inspect it ...
SolidSnake87's user avatar
3 votes
2 answers
165 views

Sharing seaside sessions using Gemstone/S

I am writing a web application using VisualWorks Smalltalk, Seaside and Gemstone/S. At the moment the session state for the client can be maintained only if the client always returns to the same ...
rich carter's user avatar
1 vote
2 answers
195 views

Using SelectionInList with SortedCollection?

Using Visualworks (Cincom Smalltalk), and a List widget, how does one use a SortedCollection along with SelectionInList? For instance, how do I initialize a SelectionInList with a SortedCollection? ...
user avatar
2 votes
3 answers
445 views

Converting in Smalltalk VisualWorks 7.9.1

I need to convert a ByteString to a Float32 (Exactly a 32-bit big-endian IEEE 754 floating point number). The ByteString is a part of an open sound control stream, received via UDP client. I've spent ...
SolidSnake87's user avatar
1 vote
2 answers
367 views

Smalltalk custom buttons for Dialog

Is there a way to customize the buttons for Dialog? Dialog confirm has two buttons (yes/no), but I would like to change the value of the buttons to something else other than (yes/no). I have been ...
Henry Cho's user avatar
  • 770
1 vote
0 answers
91 views

Read open sound control's packets in Smalltalk VisualWorks 7.9.1

Does anyone have an idea where to find an open sound control reader for visualworks? I inspected the Siren project and the OSC VW project but they are made to send OSC packets however my objectif is ...
SolidSnake87's user avatar
2 votes
3 answers
544 views

Converting Open Sound Control ByteArray into String in Smalltalk VisualWorks 7.9.1

I'm receiving UDP packets from a server ( exactly: Open Sound Control packets). i'm storing those packets in a ByteArray. I want to convert this ByteArray into String so i can exploit the data ...
SolidSnake87's user avatar
1 vote
1 answer
435 views

Visualworks mcz packages import with Monticello

I'm trying to program a client for multitouch gestures using TUIO under SmallTalk/Visualworks. In order to get the mcz package for TUIO, I'm using Monticello. The problem is that whenever i try to ...
SolidSnake87's user avatar
2 votes
2 answers
194 views

Error handling when parsing XML file

I've got some code to parse an XML file like this: [doc := (XML.XMLParser new) parse: aFilename asURI] on: XML.SAXParseException do: [:ex | MyCustomError raiseSignal: ex description]. I now want ...
Cantillon's user avatar
  • 1,608
10 votes
5 answers
582 views

Why does add: return the object added in Smalltalk collections?

Background Something that catches every Smalltalk newbie is that add: does not return "self" but the object being added. For example, with this code: myCollection := OrderedCollection new add: '...
Sebastian N.'s user avatar
  • 1,971
15 votes
5 answers
2k views

Why do methods return "self" by default in Smalltalk?

Background In Smalltalk, if you don't excplicitly return anything then the message passing evaluates to the receiver (or "self" in the message context). For example, given this method: MyClass >&...
Sebastian N.'s user avatar
  • 1,971
1 vote
1 answer
254 views

Zinc HTTP Components and VisualWorks

is there a way to use the Zinc HTTP Components in VisualWorks and has anybody done this successfully? Henrik
Henrik Guschov's user avatar
7 votes
3 answers
400 views

Pharo / Squeak environment with dual screens

I was just wondering if there is a way to work with multiple screens in Pharo or Squeak. I am just switching from VisualWorks to Pharo and am really missing this feature. I am used to having my ...
Henrik Guschov's user avatar
3 votes
1 answer
47 views

using VW7.8/Jun789 JunFileDialog for file save and want to remember selected directory for next time

I am using VW7.8/Jun789 JunFileDialog for a file save as and want to remember/set the selected directory for next time. I am following JunFileDialog class example5. I suppose doing so in the onAccept: ...
user1898940's user avatar
7 votes
2 answers
1k views

Generating UML Class Diagram from Smalltalk code

Currently, I am working with a Smalltalk based application server, using Visual Works. I am looking for a way to generate a UML Class Diagram from the code. I have looked up for many tools but nothing ...
chand's user avatar
  • 301
1 vote
2 answers
138 views

VisualWorks Smalltalk - set slider value at runtime

I have a slider and want to change its value in some function. I tried with something like this: (builder componentAt: #SliderR) widget model setValue: 124. but it doesn't work. (value has changed ...
michalo2882's user avatar
0 votes
1 answer
138 views

How to arrange views vertically with scrollbar in VisualWorks?

I write RSSReader in Smalltalk so I have two Model classes: RSSModel (title, entries) and EntryModel (title, image, content, date) I have list of EntryView (inherits from UI.View) now I have RSSView ...
borovsky's user avatar
  • 893
2 votes
2 answers
826 views

How to create a window in smalltalk

I am trying to make a window show up, but i keep getting a message not understood error. The snippet: Window new label: 'Hello'; open
Bartlomiej Lewandowski's user avatar
0 votes
1 answer
442 views

vwnt pop up in smalltalk

When I try to open my smalltalk project file vwnt pops up. The project wont open. I did save the project properly last time I was working on it. Please help if anyone know how to resolve this issue.
Adroit's user avatar
  • 721
1 vote
1 answer
492 views

How to execute an external process in VisualWorks?

How do you execute an external process in VisualWorks Smalltalk?
mircealungu's user avatar
  • 6,911
1 vote
1 answer
249 views

Drag and Drop in VisualWorks Smalltalk

How to detect that the user has drag-and-dropped a link from a web browser onto a VW window or widget (in OS X or in general on any OS)? The documentation mentions that only List widgets can be the ...
mircealungu's user avatar
  • 6,911
3 votes
1 answer
207 views

Smalltalk won't recognize declared temporary variables

So I'm a complete fledgling when it comes to Smalltalk and right now I'm writing a very simple app with a GUI. All this app does is add two operands together from two input fields and displays the ...
Gthoma2's user avatar
  • 707
0 votes
1 answer
60 views

visualworks - how to redraw image?

I have GUI with images displaying, but when I minimize or move an applciation window, the image is remvoed....how do I call it back, or how to prevent it? somehow redraw of an widget destroys it?
Marko Molan's user avatar
9 votes
2 answers
336 views

Glamour and Nautilus questions

In Smalltalk, the system browser is the central tool for pretty much anything. Glamour seems to be a package for building general purpose browsers using a declarative scripting language. From the ...
user1000565's user avatar
7 votes
1 answer
385 views

Parsing RDF in Smalltalk

Is there any example, in any Smalltalk flavour, showing how to parse a RDF file? The only package I've seen is Rikaiko with a RDFXMLReader class, but there are no references and it seems very ...
Juan Aguerre's user avatar
1 vote
2 answers
1k views

Keyword messages in smalltalk (Beginner)(Pharo)

I am trying to create a keyword message style method, but I can't figure out how to access the Receiver from inside the method. I am sure this is simple, however I can't find the answer anywhere. ...
Uritomi's user avatar
  • 13
0 votes
1 answer
144 views

How to, in SmallTalk, programmatically resize the tableinterface column sizes dynamically?

I have a table that I am dynamically populating, and so, I do not know hoa many columns are in my table but I would like to resize as needed.
Kobojunkie's user avatar
  • 6,495
1 vote
4 answers
4k views

How to, in smalltalk,append two arrays

Had to change this up. I have two arrays and I want to essentially concatenate them into one array. completearray:= completearray, temparray."concatenate the new array to the existing one" How do ...
Kobojunkie's user avatar
  • 6,495
6 votes
4 answers
4k views

How to, in smalltalk, read and process contents of CSV file

I am attempting to read and process the contents of a csv file in smalltalk(visualworks), but I seem to be having some hard time getting the string to split into an array please. Below is code I have ...
Kobojunkie's user avatar
  • 6,495
0 votes
1 answer
242 views

Simulate keydown event

How can I simulate a key (ctrl) being hold down while some other code is executed? What would be the implementation of the following method? self ctrlDownWhile: [self doSomething]
Cantillon's user avatar
  • 1,608
8 votes
4 answers
2k views

Smalltalk: Sort a collection by two criteria

How can I sort a collection by two criteria in Cincom VisualWorks? Example: I have an OrderedCollection that contains persons, and want a new collection that sort the persons first by age, and then ...
dobleseis's user avatar
  • 639
6 votes
3 answers
601 views

assert fails when it should not, in Smalltalk Unit testcase

I'm stumped. Here is my testcase. theTestArray := #(1.2 3 5.1 7). self assert: theTestArray squareOfAllElements = #(1.44 9 26.01 49). The assert should not fail. On calculating the square of each ...
sherry's user avatar
  • 1,849
1 vote
2 answers
280 views

How to identify binary and text files using Smalltalk

I want to verify that a given file in a path is of type text file, i.e. not binary, i.e. readable by a human. I guess reading first characters and check each character with : isAlphaNumeric ...
user869097's user avatar
  • 1,362
2 votes
2 answers
2k views

Tree implementations in Smalltalk

I'm trying to find open-source implementations of Trees (not binary) like Red-black, B-Trees, 2-3 Trees, or General Tree, ideally for Squeak/Pharo, but any other implementations in other Smalltalk ...
user869097's user avatar
  • 1,362
6 votes
2 answers
513 views

What is the correct way to test Unicode support in a Smalltalk implementation?

Given any Smalltalk flavor, how should I proceed to check if Unicode is supported? In case of not having support, how can I detect at which level is missing (VM, font, Converter, etc)?
user869097's user avatar
  • 1,362
2 votes
2 answers
264 views

Packages for developing static web sites in Smalltalk?

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. :...
user869097's user avatar
  • 1,362
3 votes
2 answers
509 views

How do I transfer Smalltalk files between computers?

I need to transfer some Smalltalk files between two different computers, both running Cincom VisualWorks. (I'm not sure if this matters, but one is a Windows 7 machine, and the other is a Mac). How do ...
Gautam's user avatar
  • 1,752