If so, my question is why don't pickUp and drop take MouseEvents? Is
some other function supposed to take the events and call pickUp and drop?
So I think I'm not fully understanding how MoveInteractor is supposed to work. This is what I'm guessing. When you create a board, a MI subclass (so in this case a CheckerInteractor for instance) is created. Whenever a checker is created you add it to the list of things listened to in CheckerInteractor. Whenever you click on a checker pickUp is called, which checks if it can be dragged and then calls its startDrag() function. When it's released, drop is called and checks whether it can be dropped in that location, then calles it's stopDrag() function. Is this the basic idea?
If so, my question is why don't pickUp and drop take MouseEvents? Is some other function supposed to take the events and call pickUp and drop?
--
To unsubscribe, reply using "remove me" as the subject.
>> (916) 220-4326 | sean...@mit.edu <mailto:sean...@mit.edu>
>
Sean Liu (Gmail) wrote:
> Yea, they didn't show up with Ctrl+Space in my Flex. But they are
> predefined. Just do component.startDrag(). See documentation:
> http://livedocs.adobe.com/flex/3/html/help.html?content=05_Display_Programming_14.html
>
> On Sun, Apr 4, 2010 at 9:36 PM, Ryan Ko <ryank...@gmail.com
> <mailto:ryank...@gmail.com>> wrote:
>
> "Use UIComponent.startDrag() and UIComponent.stopDrag() to do
> mouse capture. "
>
> Does this mean we have to define startDrag and stopDrag? The way
> this is phrased implies to me that these should be accessible in
> documentation but I can't find anything in UIComponent. Anyone
> care to point me in the right direction? Thank you!
>
> Ryan Ko
> Massachusetts Institute of Technology Class of 2011
> Department of Electrical Engineering and Computer Science
> 510.468.6998 || r...@mit.edu <mailto:r...@mit.edu>
> Phi Kappa Theta Fraternity -- "Give, expecting nothing thereof."
>
>
>
> On Sun, Apr 4, 2010 at 7:51 PM, Nicole Bieber <nbi...@mit.edu
> <mailto:nbi...@mit.edu>> wrote:
>
> They do the dragging. If you've done everything correctly,
> you shouldn't have to re-implement dragging for the Pixel model.
>
> Tobe Nwanna wrote:
>
> So what exactly do startDrag() and stopDrag() do? It seems
> like I have to implement what happens during dragging
> anyway so why does it say use them for mouse capture?
>
> On 4/4/2010 7:42 PM, Sean Liu (Gmail) wrote:
>
> I think the only difference from what you wrote is
> that you are supposed to create other eventHandlers,
> like "mouseDown" and "mouseUp". And then have these
> get called by the eventListeners. These methods then
> call pickUp() and drop() to determine what to actually
> do (e.g. put down the checker or not). This way when
> you subclass to CheckerInteractor, you don't have to
> modify as much code (just the pickUp() and drop()).
>
> Hope that helps!
> Sean
>
> On Sun, Apr 4, 2010 at 7:40 PM, Tobe Nwanna
> <tnw...@mit.edu <mailto:tnw...@mit.edu>
> <mailto:sean...@mit.edu> <mailto:sean...@mit.edu
> <mailto:sean...@mit.edu>>
>
>
>
>
>
>
>
> --
> Sean Liu
> Massachusetts Institute of Technology
> Department of Electrical Engineering & Computer Science '10
> (916) 220-4326 | sean...@mit.edu <mailto:sean...@mit.edu>