On 27.05.2011, at 13:04, commits(a)source.squeak.org wrote:
> Karl Ramberg uploaded a new version of Etoys to project Etoys:
> http://source.squeak.org/etoys/Etoys-kfr.71.mcz
>
> ==================== Summary ====================
>
> Name: Etoys-kfr.71
> Author: kfr
> Time: 27 May 2011, 3:04:38 pm
> UUID: 10a6974c-fc1d-4d4a-997e-0d382c3bfbef
> Ancestors: Etoys-kfr.70
>
> Put Kedama object in category UserObjects
>
> =============== Diff against Etoys-kfr.70 ===============
>
> Item was changed:
> ----- Method: KedamaExamplerPlayer>>copyAllMethodsAgain2 (in category 'debug support') -----
> copyAllMethodsAgain2
>
> | c result |
> c _ turtles class.
> result _ (ClassBuilder new)
> name: c name
> inEnvironment: c environment
> subclassOf: c superclass
> type: c typeOfClass
> instanceVariableNames: KedamaTurtleVectorPlayer2 instanceVariablesString
> classVariableNames: KedamaTurtleVectorPlayer2 classVariablesString
> poolDictionaries: KedamaTurtleVectorPlayer2 sharedPoolsString
> + category: 'UserObjects'.
> - category: c category.
> turtles class copyAllCategoriesUnobtrusivelyFrom: KedamaTurtleVectorPlayer2.
> sequentialStub ifNotNil: [sequentialStub class copyAllCategoriesUnobtrusivelyFrom: KedamaSequenceExecutionStub].
> !
This should use "Object categoryForUniclasses", not hard-code the category name.
Also, did you test this works after loading the project? Meaning my analysis of #declareAndPossiblyRename: was wrong?
- Bert -
Karl Ramberg uploaded a new version of System to project Etoys:
http://source.squeak.org/etoys/System-kfr.46.mcz
==================== Summary ====================
Name: System-kfr.46
Author: kfr
Time: 28 May 2011, 4:45:13 pm
UUID: 723d8ef4-5d2b-2b48-a272-aefa8826415f
Ancestors: System-bf.45
Put Kedama object in category UserObjects
=============== Diff against System-bf.45 ===============
Item was changed:
----- Method: ImageSegment>>declareAndPossiblyRename: (in category 'fileIn/Out') -----
declareAndPossiblyRename: classThatIsARoot
| existing catInstaller |
"The class just arrived in this segment. How fit it into the Smalltalk dictionary? If it had an association, that was installed with associationDeclareAt:."
catInstaller _ [
classThatIsARoot superclass name == #Player
ifTrue: [classThatIsARoot category: Object categoryForUniclasses]
ifFalse: [(classThatIsARoot superclass name beginsWith: 'WonderLandActor')
ifTrue: [classThatIsARoot category: 'Balloon3D-UserObjects']
+ ifFalse: [classThatIsARoot category: Object categoryForUniclasses]].
- ifFalse: [classThatIsARoot category: 'Morphic-Imported']].
].
classThatIsARoot superclass addSubclass: classThatIsARoot.
(Smalltalk includesKey: classThatIsARoot name) ifFalse: [
"Class entry in Smalltalk not referred to in Segment, install anyway."
catInstaller value.
^ Smalltalk at: classThatIsARoot name put: classThatIsARoot].
existing _ Smalltalk at: classThatIsARoot name.
existing xxxClass == ImageSegmentRootStub ifTrue: [
"We are that segment!! Must ask it carefully!!"
catInstaller value.
^ Smalltalk at: classThatIsARoot name put: classThatIsARoot].
existing == false | (existing == nil) ifTrue: [
"association is in outPointers, just installed"
catInstaller value.
^ Smalltalk at: classThatIsARoot name put: classThatIsARoot].
"Conflict with existing global or copy of the class"
(existing isKindOf: Class) ifTrue: [
classThatIsARoot isSystemDefined not ifTrue: [
"UniClass. give it a new name"
classThatIsARoot setName: classThatIsARoot baseUniclass chooseUniqueClassName.
catInstaller value. "must be after new name"
^ Smalltalk at: classThatIsARoot name put: classThatIsARoot].
"Take the incoming one"
self inform: 'Using newly arrived version of ', classThatIsARoot name.
classThatIsARoot superclass removeSubclass: classThatIsARoot. "just in case"
(Smalltalk at: classThatIsARoot name) becomeForward: classThatIsARoot.
catInstaller value.
^ classThatIsARoot superclass addSubclass: classThatIsARoot].
self error: 'Name already in use by a non-class: ', classThatIsARoot name.
!
Karl Ramberg uploaded a new version of Etoys to project Etoys:
http://source.squeak.org/etoys/Etoys-kfr.72.mcz
==================== Summary ====================
Name: Etoys-kfr.72
Author: kfr
Time: 28 May 2011, 2:33:49 am
UUID: 65473760-58e4-0941-8624-4c6dc13b7907
Ancestors: Etoys-kfr.71
Put Kedama object in category UserObjects
Small fix to this
=============== Diff against Etoys-kfr.71 ===============
Item was changed:
----- Method: KedamaExamplerPlayer>>copyAllMethodsAgain2 (in category 'debug support') -----
copyAllMethodsAgain2
| c result |
c _ turtles class.
result _ (ClassBuilder new)
name: c name
inEnvironment: c environment
subclassOf: c superclass
type: c typeOfClass
instanceVariableNames: KedamaTurtleVectorPlayer2 instanceVariablesString
classVariableNames: KedamaTurtleVectorPlayer2 classVariablesString
poolDictionaries: KedamaTurtleVectorPlayer2 sharedPoolsString
+ category: Object categoryForUniclasses.
- category: 'UserObjects'.
turtles class copyAllCategoriesUnobtrusivelyFrom: KedamaTurtleVectorPlayer2.
sequentialStub ifNotNil: [sequentialStub class copyAllCategoriesUnobtrusivelyFrom: KedamaSequenceExecutionStub].
!
Karl Ramberg uploaded a new version of Etoys to project Etoys:
http://source.squeak.org/etoys/Etoys-kfr.71.mcz
==================== Summary ====================
Name: Etoys-kfr.71
Author: kfr
Time: 27 May 2011, 3:04:38 pm
UUID: 10a6974c-fc1d-4d4a-997e-0d382c3bfbef
Ancestors: Etoys-kfr.70
Put Kedama object in category UserObjects
=============== Diff against Etoys-kfr.70 ===============
Item was changed:
----- Method: KedamaExamplerPlayer>>copyAllMethodsAgain2 (in category 'debug support') -----
copyAllMethodsAgain2
| c result |
c _ turtles class.
result _ (ClassBuilder new)
name: c name
inEnvironment: c environment
subclassOf: c superclass
type: c typeOfClass
instanceVariableNames: KedamaTurtleVectorPlayer2 instanceVariablesString
classVariableNames: KedamaTurtleVectorPlayer2 classVariablesString
poolDictionaries: KedamaTurtleVectorPlayer2 sharedPoolsString
+ category: 'UserObjects'.
- category: c category.
turtles class copyAllCategoriesUnobtrusivelyFrom: KedamaTurtleVectorPlayer2.
sequentialStub ifNotNil: [sequentialStub class copyAllCategoriesUnobtrusivelyFrom: KedamaSequenceExecutionStub].
!
Hi guys, following Bert's request I've resumed some of my work for GSoC
hoping that it could be included in the next Etoys release :)
This is a new version (a complete rewrite, actually) of the graphing tools.
This time I've followed Steve's idea of a simple number line object and the
ability to change the scale of the playfield so that kids could make their
own graphs (you can find the original conversation in this old
thread<http://answerpot.com/showthread.php?899620-Copying+Graphing+tools+and+Speec…>
).
You can see in the attached project that the playfield includes two new
objects (horizontal number line and vertical number line). This objects have
an extra category called "number line" with a few properties such as:
* increment
* min/max value
* scale
You can change the scale to define how much pixels will mean a unit of the
number line. The increment will define the distance between labels.
You will also find a new category on Playfield named "coordinate system".
This category has:
* origin at center?
* origin
* scale x
* scale y
Using this properties you can define a different coordinate system for the
objects you throw inside the playfield.
In the attached example I defined a playfield with the origin at 50@50 (this
means 50 pixels from the bottom and left sides), an x scale of 1, and an y
scale of 30. You can see how the position of the star changes acording to
this scale while you move it inside the playfield and how it returns to its
original scale when you pick it up and drop it outside the playfield.
For now it's just a proof of concept. A lot of things still don't use this
new scaling (i.e. #forward:). But I want to know what you think about this
direction.
Also, how much time do we have until the deadline? I have two exams tomorrow
so I'm probably off for today. We can discuss this stuff at SqueakFest :)
See some of you in Montevideo!
Cheers,
Richo