from preamble:
"Change Set: TransfoimingAMorphFix Date: 19 August 2002 Author: KURIHARA Tetsuya ABE Kazuhiro NISHIHARA Satoshi
Some kind of strange behaviors appears when aTransformationMorph (of EllipseMorph) is dropped in aMorph or aTransformationMorph (of RectangleMorph).
1. create aMorph from flaptabs. 2. scale and rotate it. 3. set 'accept drops' to on. 4. create another morph. 5. scale and rotate it, if necessary. 6. drop morph: 4 to morph: 1. and scaling/pick up and moving/rotating will cause errors or warnings.
This change set will fix below...
1. adding aMorph or aTransformationMorph to aMorph or aTransformationMorph. 2. scaling aTransformationMorph within aMorph or aTransformationMorph of dropping accepted. 3. rotating aTransformationMorph within aMorph or aTransformationMorph of dropping accepted. 4. positioning a halo of aTransformationMorph within aMorph or aTransformationMorph of dropping accepted. and 5. save and load aMorph dropping accepted. 6. dismiss aMorph with its submorphs.
#### caution: this change set will adapt the aTransformationMorph to PolygonMorphs. ####
Enjoy playing with Morphs!! "!
--- KURIHARA Tetsuya kuri-t@mamezou.com
KURIHARA Tetsuya writes
Some kind of strange behaviors appears when aTransformationMorph (of EllipseMorph) is dropped in aMorph or aTransformationMorph (of RectangleMorph).
- create aMorph from flaptabs.
- scale and rotate it.
- set 'accept drops' to on.
- create another morph.
- scale and rotate it, if necessary.
- drop morph: 4 to morph: 1.
and scaling/pick up and moving/rotating will cause errors or warnings.
Well, I have a 3.2 4952 image with updates 4918 to 4934 loaded by hand and do not show this behavior, I run on Mac Classic 9.1
But I found another anomaly , which I post on list.
1. Create a Playfield from flaptabs. 2- Create a TTSampleStringMorph (From object catalog TrueType banner) 3 Save as morph via halo 5 lading this via FileList give a endiannes problem , like I post on mail [Q] Big Endian question Ned Kontz gently give me some advice and I fix the problem on Mac. But the fix is not working on Windows. Maybe someone with more Smalltalk behind can fix. I like sending living morphs and don´t like different OS oddities.
Edgar J. De Cleene
Ahora podés usar Yahoo! Messenger desde tu celular. Aprendé cómo hacerlo en Yahoo! Móvil: http://ar.mobile.yahoo.com/sms.html
Hi Ed,
At 16:50 -0300 08/20/2002, Lic. Edgar J. De Cleene wrote:
Well, I have a 3.2 4952 image with updates 4918 to 4934 loaded by hand and do not show this behavior, I run on Mac Classic 9.1
I'm using Squeak3.2-4956.image with Mac OS 8.5.1J and Windows XP v.2002, and get the same error. Please sure to drop the rotated child morph to the rotated parent morph, and drag/scale/rotate child morph.
Here are some examples which cause errors. They show an EllipseMorph with/without rotetating on a RectangleMorph with/without rotetating.
"(1)" | rectangleMorph ellipseMorph event | "rotating sample will causes aMessageNotUnderstood Error." rectangleMorph _ RectangleMorph new. rectangleMorph position: 100 @ 100. rectangleMorph extent: 200 @ 300. rectangleMorph openInWorld. rectangleMorph dropEnabled: true. rectangleMorph enableDrop: true. rectangleMorph enableDragNDrop: true. rectangleMorph heading: 90. ellipseMorph _ EllipseMorph new. ellipseMorph extent: 50 @ 100. ellipseMorph openInWorld. ellipseMorph position: 100 @ 130. ellipseMorph heading: 90. event _ DropEvent new. event setPosition: -100.0 @ 24.0 contents: ellipseMorph topRendererOrSelf hand: HandMorph new. rectangleMorph acceptDroppingMorph: ellipseMorph topRendererOrSelf event: event. ellipseMorph topRendererOrSelf position: -45 @ -40. ellipseMorph addHalo. "and mouseDown on the Pick up halo of ellipseMorph, and drag it!"
"(2)" | rectangleMorph ellipseMorph event | "sample: both of rectangleMorph and ellipseMorph without rotating." rectangleMorph _ RectangleMorph new. rectangleMorph position: 100 @ 100. rectangleMorph extent: 200 @ 300. rectangleMorph openInWorld. rectangleMorph dropEnabled: true. rectangleMorph enableDrop: true. rectangleMorph enableDragNDrop: true. ellipseMorph _ EllipseMorph new. ellipseMorph extent: 50 @ 100. ellipseMorph openInWorld. ellipseMorph position: 150 @ 130. event _ DropEvent new. event setPosition: 150 @ 150 contents: ellipseMorph topRendererOrSelf hand: HandMorph new. rectangleMorph acceptDroppingMorph: ellipseMorph topRendererOrSelf event: event. ellipseMorph topRendererOrSelf position: 150 @ 150. "After rotate the both of rectangleMorph and ellipseMorph, and Pick up ellipseMorph then drag it!"
"(3)" | rectangleMorph ellipseMorph event | "sample: rotated ellipseMorph on rectangleMorph without rotating." rectangleMorph _ RectangleMorph new. rectangleMorph position: 100 @ 100. rectangleMorph extent: 200 @ 300. rectangleMorph openInWorld. rectangleMorph dropEnabled: true. rectangleMorph enableDrop: true. rectangleMorph enableDragNDrop: true. ellipseMorph _ EllipseMorph new. ellipseMorph extent: 50 @ 100. ellipseMorph openInWorld. ellipseMorph position: 150 @ 130. ellipseMorph heading: 90. event _ DropEvent new. event setPosition: 150 @ 150 contents: ellipseMorph topRendererOrSelf hand: HandMorph new. rectangleMorph acceptDroppingMorph: ellipseMorph topRendererOrSelf event: event. ellipseMorph topRendererOrSelf position: 150 @ 150. "After rotate the rectangleMorph and Pick up ellipseMorph then drag it!"
IMPO, Rotating a morph produce a TransformationMorph as a wrapper. But it is confusing to send some messages to where a wrapper or renderedMorph itself.
But I found another anomaly , which I post on list.
- Create a Playfield from flaptabs.
2- Create a TTSampleStringMorph (From object catalog TrueType banner) 3 Save as morph via halo 5 lading this via FileList give a endiannes problem , like I post on mail [Q] Big Endian question Ned Kontz gently give me some advice and I fix the problem on Mac. But the fix is not working on Windows. Maybe someone with more Smalltalk behind can fix. I like sending living morphs and don´t like different OS oddities.
defining MatrixTransform2x3>>restoreEndianness (from another #restoreEndianness), I can avoid the endiannes error, but loaded aTTSampleStringMorph is rotated 270 degree.
I'll be waiting here the guru coming down and the solve this problem.
regards
NISHIHARA Satoshi writes
I'm using Squeak3.2-4956.image with Mac OS 8.5.1J and Windows XP v.2002, and get the same error. Please sure to drop the rotated child morph to the rotated parent morph, and drag/scale/rotate child morph.
Today I load Squeak3.2-4956.image I send the following. EllipseMorph with a star rotated inside. I don't have any problem.
defining MatrixTransform2x3>>restoreEndianness (from another #restoreEndianness)
Yes this is Ned advice, and on my running Macs OS 9.1 works fine
Morphic-Greeting.st. Load this first. GreetinMorph.morph.
I delete TTSampleStringMorph and recreate on load for endianess problem.
I hope Satoshi san enjoy the greet, and with guru figure how encapsulate all in one morph (Yes I could use a project with changes), but If I can encapsulate midi and jpg why not code ?.
I know in Japan you see the sun light before me.
Saludos desde Rosario, Argentina.
Edgar
Hi Edgar
At 18:14 -0300 08/21/2002, Lic. Edgar J. De Cleene wrote:
Today I load Squeak3.2-4956.image I send the following. EllipseMorph with a star rotated inside. I don't have any problem.
Wow!
Both parent and child morphs are TransformationMorph? I don't know why there is no problem.
I've set up the report of this matter: http://nishis.hoops.ne.jp/misqueak/reports20020822.html and put the screenshots and movies shows errors.
There are 4 movies, 2 movies with workspace coding, others with handmade from flaptabs. Please load the 3rd movie: "Morphs from Flaptabs" (fromEtoy.mov) and do same things.
AND if you have any problem, there is no matter I can do.
Yes this is Ned advice, and on my running Macs OS 9.1 works fine
mmm, I still have a "rotated 270 degree" problem. May I read your source?
Morphic-Greeting.st. Load this first. GreetinMorph.morph.
Thank you! I'll try later (real soon).
I hope Satoshi san enjoy the greet, and with guru figure how encapsulate all in one morph (Yes I could use a project with changes), but If I can encapsulate midi and jpg why not code ?.
I'm sorry, have not the exploring that phases.
I know in Japan you see the sun light before me.
Well, but the same sun shines on us, isn't it? ;-P
Saludos desde Rosario, Argentina.
I like Ginastera's music very much. His chamber music is GREAT! His Piano music is too.
regards
Satoshi
mmm, I still have a "rotated 270 degree" problem. May I read your source?
rotated 270 degree on Windows (I try in lab), Ned also predicts this. Reading all restoreEndiannes, I choose
restoreEndianness "This word object was just read in from a stream. Bitmaps are always compressed and serialized in a machine-independent way. Do not correct the Endianness." "^ self" ^ self
In Bitmap class. All versions from 3.2 gamma, perform the same, no problem for me,
Sorry if I wasting you time.
I think what following all the way what happened when we save a ³.project² , found the problem. Also, I not sure what difference in ³.project², ³pr², and ³.morph² Saving all like ³.pr² , the Big Endian don¹t catch us.
I send current cs. Also includes a missing PolygonMorph flipX , a SmartTrashCan what eats all morphs of the same class (I do puzzles and games and end with many equal morphs in World), a InfoMorph what inform mouse position and camera. Load this and then the .pr. And if useful to you , change for flap sharing in all projects,
When I have time read http://nishis.hoops.ne.jp/misqueak/reports20020822.html,
You can have a morph which responses to red yellow, blue buttons and do something on this? I could do responsens to click, doubleclick, but no click and have a menu (yellow),
Using
handlesMouseDown: anEvent self eventHandler ifNotNil: [^ self eventHandler handlesMouseDown: anEvent]. anEvent yellowButtonPressed ifTrue: ["Yellow button - Agregar codigos de menu" self color: Color yellow. ^ true]. anEvent blueButtonPressed ifTrue: [self color: Color blue. ^ true]. anEvent redButtonPressed ifTrue: ["Red button - Cambiar codigo de click" self color: Color red. ^ true]. self mouseDown: anEvent
The morph changes color , but can¹t don next logical action (ej: click or menu)
Sorry to much Spanish in code.
Cheers
Edgar
squeak-dev@lists.squeakfoundation.org