Hi,
[ I'm a novice at Squeak and Etoys, so please forgive me if I get some terminology wrong. I hope my basic question will be clear. ]
My basic question is about how to create new tiles for the Viewer. Specifically, I'm interested in having some tiles in the Viewer to allow scripts to use changePixelsOfColor:toColor, because I think that that would allow for visualization of internal state of a morph without having to create one costume for every state. (The use of setGraphic: is reasonable for two-state systems, and a bit tedious for more complex ones, I think). I also am hoping in the process to learn more about how to implement custom viewer tiles and how the system hangs together.
So far, in my attempts to make these tiles appear and work, I've found the additionsToViewerCategory* classes and wordingForOperator: selector, and added relevant clauses there. I've also found the colorComponentPhraseFor: selector, and worried that there are more dragons here than I might be able to cope with. I'd very much appreciate pointers on how to get started this kind of development, or a recipe for performing this kind of extension, or just telling me that it's way too hard and that I shouldn't even bother trying.
Thanks,
Christophe
Hi Christophe, if you are not actually seeing your new tile then my best guess without seeing code is that the code has not been executed. Alternatively, the attached project may give you ideas for a different approach.
Regards.
On Sun, Jun 29, 2008 at 11:01 PM, Christophe Rhodes csr21@cantab.net wrote:
Hi,
[ I'm a novice at Squeak and Etoys, so please forgive me if I get some terminology wrong. I hope my basic question will be clear. ]
My basic question is about how to create new tiles for the Viewer. Specifically, I'm interested in having some tiles in the Viewer to allow scripts to use changePixelsOfColor:toColor, because I think that that would allow for visualization of internal state of a morph without having to create one costume for every state. (The use of setGraphic: is reasonable for two-state systems, and a bit tedious for more complex ones, I think). I also am hoping in the process to learn more about how to implement custom viewer tiles and how the system hangs together.
So far, in my attempts to make these tiles appear and work, I've found the additionsToViewerCategory* classes and wordingForOperator: selector, and added relevant clauses there. I've also found the colorComponentPhraseFor: selector, and worried that there are more dragons here than I might be able to cope with. I'd very much appreciate pointers on how to get started this kind of development, or a recipe for performing this kind of extension, or just telling me that it's way too hard and that I shouldn't even bother trying.
Thanks,
Christophe _______________________________________________ Etoys mailing list Etoys@lists.laptop.org http://lists.laptop.org/listinfo/etoys
On Sun, Jun 29, 2008 at 11:01:29PM +0100, Christophe Rhodes wrote:
Hi,
[ I'm a novice at Squeak and Etoys, so please forgive me if I get some terminology wrong. I hope my basic question will be clear. ]
My basic question is about how to create new tiles for the Viewer. Specifically, I'm interested in having some tiles in the Viewer to allow scripts to use changePixelsOfColor:toColor, because I think that that would allow for visualization of internal state of a morph without having to create one costume for every state. (The use of setGraphic: is reasonable for two-state systems, and a bit tedious for more complex ones, I think). I also am hoping in the process to learn more about how to implement custom viewer tiles and how the system hangs together.
So far, in my attempts to make these tiles appear and work, I've found the additionsToViewerCategory* classes and wordingForOperator: selector, and added relevant clauses there. I've also found the colorComponentPhraseFor: selector, and worried that there are more dragons here than I might be able to cope with. I'd very much appreciate pointers on how to get started this kind of development, or a recipe for performing this kind of extension, or just telling me that it's way too hard and that I shouldn't even bother trying.
I made a very small package that shows exactly how to make a new morph and give it a few tiles; It is well commented.
From the repository http://www.squeaksource.com/gauge/ , load
package Otter-mtf.5.mcz. the newer versions have unrelated stuff, like an ffi interface to a proprietary usb library.
etoys-dev@lists.squeakfoundation.org