|
Re: Starting the clock...: msg#01374lang.smalltalk.squeak.general
Bob Arning wrote: > >I am fairly certain it works to this point because sending a message >> tochange the fill color to AICanvas changes the color of the rectangle >> on the screen. -- AFTER I CLICK ON IT!!! >>>>>> As stated, yes. If you ask a morph to change its color (sending #color:, e.g.), the morph will notify the World (through it chain of owners) that it needs to be redrawn. If, however, you change the color of something else, like AICanvas, (which is an instance variable? a class variable?)<<<< Instance varriable. I just tried force-setting the owner to "AIWorld" (the class I'm develing). (using privateOwner: ) No change in behavior. >>>> then what you are missing is some way for the World to know about the change. So, what you probably want to do is to say <<<< > MorphicWorld color: Color magenta. > and let #color: handle both the changing of the color AND the > notification to the World that redrawing is needed. Tried it, Duzn't work. Thanks for the idea though. > >The only difference I have discovered is that the world morph of the > >project is getting clock ticks from somewhere by some method while the > >counters in the mini-morphic are stalled. > Your example isn't quite complete enough to replicate here. How did you > actually get MorphicWorld to appear on the screen, e.g.? I don't think it is displaying on the screen. The entire thing is a subclass of ImageMorph. The method I showed you tried to make the image a canvas and then making the canvas of WorldState a canvas, then finally trying to throw a pasteUpMorph onto the viewplane. But clearly there is some problem there because color: color. --or-- color: Color magenta does nothing to change the color of the display. > Do consider that Projects/Worlds are somewhat special things. Unless > you really need what they offer, other, simpler, morphs will be easier > to use. I am uncertain. I am basically applying a greedy algorithm to the problem. -- one that always takes the cheapest next step. I need a pixel-mapped view-plane that can be viewed on the sceen and inspected by a set of processing classes to be developed at some point in the future. The ImageMorph class I am currently using APPEARS TO BE a viable approach so therefore I move on to the next problem. I require that the AI have a "play-pen" containing some toys that can be explored and manipulated as well as a means for it to communicate with the user through mouse gestures and text messages. It seems to get the most bang for my buck towards this goal, I want to get morphic functioning within the AI's visual field and then use it to display things such as "ChessMorph" and the AI's highly simplified menus. Unless I am missing something, this seems to be the correct approach. So how do I get it working? -- Latancy is your enemy. Bandwidth is your friend. http://users.rcn.com/alangrimes/
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Building Squeak VM Under Mac OS X 10.2 (Jaguar), Marcel Weiher |
|---|---|
| Next by Date: | RE: The standard does *not* support - a removeAll: a - [was: Re: [BUG] Collection>>removeAll:], Jarvis, Robert P. (Contingent) |
| Previous by Thread: | Re: Starting the clock..., Bob Arning |
| Next by Thread: | Re: Starting the clock..., Ned Konz |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |