I need to get a texture into a PolygonMorph, but these seem to require an InfiniteForm as color/ filling.
The InfiniteForm is no solution as i need to rotate the PolygonMorph later on and moving the PolygonMorph around also has sideeffects on the displayed texture.
It would be very useful if it would be possible to scale the inserted ...
I am checking Squeak homework assignments submitted by my students. I have written an SUnit test case with a bunch of tests and now I want to run these on all submissions.
I would like to somehow automate - whether from inside Squeak or with shell scripts - the process of loading a student submission, running the test case on it, and sa...
I am implementing a graphical user interface with Morphic / Squeak. Some of the items have drag & drop functionality. While dragging, I want to be able to rotate these items with the mousewheel.
The first problem is that using the mousewheel ends the drag-action and leads to a drop (attempt). How can I suppress that - and fire the mouse...
I have an image for a Squeak Morphic GUI that contains some transparent parts and thus should not accept any mouseevents etc. but just be visible, but it needs to be visible in front of other morphs.
That's why i thought it would be useful to propagate the appearing mouseevents to the underlying morphs. Does anyone know a solution for...
Ive been reading about seaside and like the sound of it but i cant see an easy way for handling data files, primarily importing Excel. Of course csv files would be more straight forward, but are there any ways to import the various Excel formats (xls,xlsx) without writing your own file parsing routines?
I've heard that the need to open...
So Squeak/Pharo support Traits and Newspeak has Mixins. What is the difference? Traits have no instVars but Mixins have?
...
What are the "best practice" rules for using symbols in Smalltalk in a portable way? I use squeak and pharo mainly and I know they both allow 'foo' = #foo and #foo = 'foo' to be true while other Smalltalks don't. I understand Symbols are for identification and shouldn't be used in place of strings. But is it at least safe to assume that ...
I have been suggested to use should:rise in my test case to test for errors that a method might raise. For some reason it does not work as expected, so I want to verify that I'm doing it right. Here is the code in the test case:
self should: [aMyClass compareTo: 'This is a string'] raise: 'invalid input'.
My compareTo/1 method looks l...
Not considering legal issues I would be very interested if it would be possible to run one of those on the bare metal of the iPad/Phone ARM-Architecture.
...
Hi!
As stated above - I need to find the current method's name in runtime. how do I do this?
...
Hi, I have a string that contains the name of a class variable that I know exists for class A. I need to get the value of this variable (i.e. dereferencing), how do I do it?
...
Hi,
I want to execute the following code:
methodName := thisContext sender method selector.
aClass selectors do: [:current | current == methodName ifTrue: aBlock].
Although the strings are equal, it never steps into the "ifTrue", I've tried converting both of them to ByteArray\String and it steel didn't work. Any ideas of how to comp...
printThisMethodSig: aSomething
stack := thisContext stackOfSize: 2.
Transcript show: (stack at: 2); cr.
stack at: 2 returns the method context of the current method. It is possible to retrieve the compiled method of the current method using method message. I want to be able to print the whole signature of the method, for example: from:...
Large part of squeak is implemented using squeak itself. I am curious to know if pseudo variables such as self or true are also implemented using squeak. If the answer is yes, where the implementation located?
Specifically, assume that I want to add new subclass of "Boolean" called "Other" which will represent a third option: neither tr...
I'm trying to learn some Smalltalk. First found was Squeak, but since it has been removed from Gentoo ebuild tree because of security problem, so I decided to find an alternative.
Then I found Pharo through Seaside project, after I downloaded Pharo 1.0 package, there are actually a SqueakVM inside!
So, my question is: Is Pharo just a r...
This is in Squeak/Pharo. If I want to have a mapping between Character objects like $a and $b to other kinds of objects, and want to look up those other objects based on the Character, what is the best class to use? Dictionary is an obvious choice, but seems wasteful to be hashing character objects which are basically already numbers. I ...
Hello,
How can I get a collection of all the (class) methods in a given protocol in smalltalk/squeak/pharo?
I'm trying to collect the values returned by a group of methods. I don't want to have to store the methods in an instance or class variable. So I though I could add them to a protocol and in this way to "mark" them.
Thanks.
...
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?
...
If I have a Trait that some classes use but not others, how can I test an object to see if it is an instance of a class that uses that Trait? What I want is something like isMemberOf: or isKindOf: but for Traits.
...
In Smalltalk (or at least Squeak and Pharo), is there a portable way to get the bytes that make up an integer, starting with the most significant byte followed by the next-most, and so on, regardless of byte-ordering differences across platforms?
...