[Q] Anyone tried ThingLab in SqueakSource?

Sungjin Chun chunsj at embian.com
Sun Apr 15 23:21:24 UTC 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Matthew Fulmer wrote:
> 
> selectors should not have periods in their name. is assign an
> object name, and point: a method? if so, perhaps you are trying
> to do:
> 
>     assign point: 1 at 2
> 
> or is assign.point: the name of a message you made up? I have no
> idea what assign.point: is, or what it has to do with ThingLab.
> Indeed, it is not even valid Smalltalk syntax. 
> 
> You may also be trying to write an accessor method, one that
> sets the 'point' instance variable of your object. if so, rename
> it to simply point: and it should work

It seems that assign.point: thing is related to accessor method point:
but if I have to create it everytime ThingLab is very hard to use one.
Instead, I fixed(patched) following

!Object methodsFor: '*ThingLab-message handling' stamp: 'NeXT 4/16/2007
08:12' prior: 33693109!
getFieldsForKeywordSelector: sel
	"sel should be of the form part1.subpart: part2.subpart.subsubpart: part3:
	 check that I have subparts of the appropriate names.  If so, return
	 a collection of arrays of Fields matching the keywords in sel;
otherwise return nil"
		|  fields arrayOfFields |
	arrayOfFields _ OrderedCollection new.
	sel keywords do:
		[:k | k size == 0 ifTrue: [ fields _ nil ] ifFalse: [
		fields _ self getFieldsForPath: k pathFromDottedSelector.].
		fields isNil
			ifTrue: [^nil]
			ifFalse: [arrayOfFields add: fields]].
	^arrayOfFields! !

(Sorry for bad indentation, I don't know why) The problem I tried to fix
is that sel keywords does have '' as its last element which causes
error. So, I ignore it. :-)

With above patch it seems that ThingLab does work.

Thanks.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGIrN0QqspS1+XJHgRAr1IAJ433oUhlIwE4g0H38sPcXQVe/xJeQCcCYH9
bhVYMifuuESbMYPVf0rdhPE=
=ciRs
-----END PGP SIGNATURE-----



More information about the Squeak-dev mailing list