Re: [Newbies] How to construct a PolygonMorph?

2009-12-21 Thread Stan Shepherd
Tim Rowe-2 wrote: I can see PolygonMorph Classvertices:color:borderWidth:borderColor: But I can't work out what it expects for vertices. Could somebody give me an example of how to create a PolygonMorph? (Or, better, tell me how to find things like this in the documentation, so I don't

Re: re[Newbies] cover a deleted image??

2009-05-26 Thread stan shepherd
thanks Herbert, Yes, it would probably be much easier to recover the change file- I'll look into that. ...Stan Herbert König wrote: Stan, ss Thanks for any suggestions,...Stan I have no knowledge of linux but the changes file is plain ASCII with CR line endings. Recovering

Re: re[Newbies] cover a deleted image??

2009-05-26 Thread stan shepherd
backups for next time. stan shepherd wrote: thanks Herbert, Yes, it would probably be much easier to recover the change file- I'll look into that. ...Stan Herbert König wrote: Stan, ss Thanks for any suggestions,...Stan I have no knowledge of linux but the changes

[Newbies] Best data structure for a multidimensional database?

2008-10-07 Thread stan shepherd
Hi, I'm looking at building a small proof of concept of a multidimensional modelling tool in Squeak. Commercial products are things like Cognos, and the old Express that was assimilated by Oracle. A typical 'cube' will be 'dimensioned' by product, region, time. Each dimension has one or more

Re: [Newbies] Is it generally considered better practice for an object to access its own variables via its getter methods?

2008-08-08 Thread stan shepherd
Randal L. Schwartz wrote: Whether internal accesses to instance vars should use accessors instead of direct access is a subject to debate (read: religious war). I hope you haven't accidentally triggered that thread here. There is a nice discussion of the pros and cons of each in:

Re: [Newbies] Invoking MIDIInputParser

2008-07-28 Thread stan shepherd
George Kopeczky wrote: I'm a Squeak newbie with nearly zero programming experience, brought here by a search after a tool that will let me capture, view as hex (and hopefully, save) a rare type of MIDI message (Active Sensing) which is unrecorded by every MIDI sequencing application I

Re: [Newbies] code Critics 'don't check again' optiion? (was isKindOf considered questionable)

2008-07-21 Thread stan shepherd
Lukas Renggli wrote: If there is interest, I could include the basic functionality into RB itself. I think that would be much cleaner and easier to use. The latest RB (Refactoring-Core-lr.5.mcz) integrates the functionality to ignore certain SmallLint rules in particular methods.

Re: [Newbies] How to shorten a method (using inject: into: ?)

2008-07-21 Thread stan shepherd
Quoting cdrick [EMAIL PROTECTED]: testMaleMeiosis2 | resultArray tesSet | testSet := strand testRun. resultArray := Forecaster testMale meiose inject: #(0 0) into: [:array :val | array at: 1 put: (array at: 1) + testSet maternalCount. array at: 2

Re: [Newbies] Code critics - Overrides super method without calling it

2008-07-21 Thread stan shepherd
Matthias Berth-2 wrote: Hi, The idea is that you should _maybe_ give the superclasses of Strand a chance to execute their method. In some situations this is really necessary, or just a good way to avoid code duplication. HTH Matthias On Sat, Jul 19, 2008 at 5:47 PM, stan

[Newbies] Code critics - Overrides super method without calling it

2008-07-19 Thread stan shepherd
Hi, I get the possible bug 'Overrides super method without calling it' for things like: Strandsize ^ genes size I can't find an explanation of this, in case there is some nasty that I'm not aware of. It is not listed at: http://st-www.cs.uiuc.edu/users/brant/Refactory/LintChecks.html

Re: [Newbies] Suspected bug when setting preferences

2008-07-18 Thread stan shepherd
nicolas cellier wrote: I forgot this, Stan: You gathered enough material to open a bug report at http://bugs.squeak.org You should check about deepCopy/Preferences already reported issue, then create a login an fill a bug form. Reported as 7128. However, I logged it to

Re: [Newbies] Suspected bug when setting preferences

2008-07-17 Thread stan shepherd
nicolas cellier wrote: Yes indeed, 168 clones of PBBooleanPreferenceView... We now have to figure out who created these clones, for what purpose, before deciding if it is a bug, but it looks like a bug indeed... Nicolas It happens in PreferencessavePersonalPreferences

Re: [Newbies] Totally dumbfounded!!

2008-07-05 Thread stan shepherd
Claus Kick wrote: No one really has the time to go through every method to find out which is suitable and even then the commentary is not always very good. What else can you do? Even for Java, you have to go through all the Javadocs, first to find which Class suits your needs

[Newbies] isKindOf considered questionable

2008-06-21 Thread stan shepherd
Hi, I'm using isKindOf as part of my unit tests, self should: [(mare maternalStrand at: 100) isKindOf: Gene]; When I run through the code critics, isKindOf is flagged as a 'questionable message'. I can't find any reference to why

Re: [Newbies] isKindOf considered questionable

2008-06-21 Thread stan shepherd
matthewf wrote: On Sat, Jun 21, 2008 at 08:13:48AM -0700, stan shepherd wrote: Hi, I'm using isKindOf as part of my unit tests, self should: [(mare maternalStrand at: 100) isKindOf: Gene]; When I run through the code

Re: [Newbies] Ubuntu and Squeak

2008-06-07 Thread stan shepherd
Rob Rothwell-2 wrote: On Thu, Jun 5, 2008 at 6:07 AM, Rob Rothwell [EMAIL PROTECTED] wrote: On Thu, Jun 5, 2008 at 5:32 AM, Norbert Hartl [EMAIL PROTECTED] wrote: Easiest is to use the one in ubuntus multiverse. If you have enabled multiverse in your software sources an aptitude

Re: [Newbies] Linux locks up when handling large data sets

2008-05-03 Thread stan shepherd
David T. Lewis wrote: You are probably just growing your image to the point where the operating system starts swapping. The image will appear to be unresponsive, but if you interrupt it with altperiod, it will eventually wake up and return control to you. David, my image doesn't

Re: [Newbies] Efficient date parsing

2008-04-08 Thread stan shepherd
goran-14 wrote: Hi! I tried downloading my original attachment and the problem is that it was/is double-gzipped - not sure why. I've seen the same thing with a few snippets I've downloaded. goran-14 wrote: I also include the method comment below to show you what it gives you:

Re: [Newbies] I am a total beginner with some questions

2008-04-08 Thread stan shepherd
Hi, there is a nice small example, made by Bert, that you can import here: http://www.nabble.com/Re%3A-Detecting-keyboard-state---finding-older-fixes-p15836979.html ...Stan kennellgr wrote: 1. What do I do to test whether or not a key has been pressed (in a method I want it to say 'if

Re: [Newbies] Efficient date parsing

2008-04-03 Thread stan shepherd
Thanks Randal and Ramon. That's about three times quicker; most of the improvement seems to be in the caching. ...Stan Randal L. Schwartz wrote: Ramon == Ramon Leon [EMAIL PROTECTED] writes: Ramon Or more idiomatic... Ramon ^dateCache at: dateString ifAbsentPut: [Date from: dateString].

[Newbies] Magma - freeing memory, and preloading index

2008-04-03 Thread stan shepherd
Hi, I've currently got 2 Million objects in a MagmaCollection. My memory use is 300MB. I thought by doing maCollection add: entry. magmaSession stubOut: rating. and periodically garbageCollecting, the entries would effectively be flushed to disk and release

[Newbies] Efficient date parsing

2008-04-02 Thread stan shepherd
I have a large file with dates in the format '2001-11-04'. As I couldn't find a method to change to date, I'm doing: date := self dateFrom: (dateString subStrings: '-'). dateFrom: anArray anArray should be like #('2005' '09' '06') ^Date year: anArray first asInteger month:

Re: [Newbies] Detecting keyboard state / finding older fixes

2008-03-07 Thread stan shepherd
Where I was confused is that checking if the key is pressed already doesn't appear to differentiate between a 'real' key down and a repeat. For example : keyDown: anEvent (keys includes: anEvent keyValue) ifTrue: [Transcript show: 'skipped ' , anEvent asString; cr]

Re: [Newbies] Detecting keyboard state / finding older fixes

2008-03-07 Thread stan shepherd
I am indeed on Linux. I have a feeling that Windows was the same (coding in Java). That is, in the programming language a real key down and a repeat are indistinguishable. Stan Bert Freudenberg wrote: On Mar 7, 2008, at 14:54 , stan shepherd wrote: Where I was confused is that checking

Re: [Newbies] Detecting keyboard state / finding older fixes

2008-03-07 Thread stan shepherd
As I have dual boot Linux/Windows, I'll try and verify the Windows result in the next day or two. Bert Freudenberg wrote: I am pretty sure it works in the Windows VM. You should get multiple keyDown events but a single keyUp: Down ... (pause) ... down - down - down - down - down -

Re: [Newbies] Detecting keyboard state / finding older fixes

2008-03-05 Thread stan shepherd
:19 , stan shepherd wrote: handleKeyUp: anEvent Transcript show: ' evt is down ',anEvent isKeyDown asString; cr. now press and hold a key shows evt is down false Which is of course expected since only keyUp events are passed into #handleKeyUp:, so #isKeyDown always

Re: [Newbies] Detecting keyboard state / finding older fixes

2008-03-04 Thread stan shepherd
Thanks Herbert. Unfortunately these methods seem to be 'fooled' by the operating system as well. for example: handleKeyUp: anEvent Transcript show: ' evt is down ',anEvent isKeyDown asString; cr. now press and hold a key shows evt is down false evt is down false evt is