Link: Learn to Test Your SproutCore Apps in San Francisco
The Selenium Meetup group is hosting Michael Cohen, creator of the excellent Lebowski Testing tools, to discuss how you can use Selenium and Lebowski to automate testing of your SproutCore app.
The event is in San Francisco on Oct 21, so if you are in the area be sure to come by.
The JSConf presentation that started it all. Now available on blip.tv! JSConf 2010
We’re having a SproutCore meetup in Paris on **Tuesday, August 3th at 8:00 pm (EDIT: we originally planned to do it on the 5th but we had to reschedule)**. Charles, the creator of SproutCore, will be here, as well as members of the core team. Whether you’re already familiar with the framework of just curious to know more about it, join us for a beer at the [Café Léa](http://maps.google.com/places/fr/paris/rue-claude-bernard/5/-chez-l%C3%A9a).
Hope to see you there!
Link: SproutCore Meetup Tonight @ Tropisueño
Same place as last year. Great food!
The SproutCore Team is getting together tomorrow night in San Francisco for dinner and drinks following the last WWDC session. This is really informal meeting this year, but if you want to see the core team and chat, signup here:
SproutCore Meetup Eventbrite
We will confirm a location tonight based on the number of RSVPs at 6pm Pacific Today. Hope to see you there!
Link: SproutCore Meetup in DC @ jsconf
I’ll be in Washington DC for jsconf and we’re going to have a SproutCore git-together while I’m there. If you’re in the DC area add your name to the list and nominate a place to meet.
We’ll have dinner, drink beer and talk about SproutCore. There might even be prises in the mix. See you there!
We’re coming to JSConf 2010!
Link: SproutCore at Velocity Fall 09
Just a reminder – I will be talking about some of the new loading techniques we are working on for SproutCore 1.1 at Velocity Only Fall next Tuesday, Dec 8.
The conference is online – which means you can attend from your own desk. Why travel when you know you’d just spend the time hacking on your laptop anyway. Hack and listen from the comfort of your own desk!
If you’re interested in attending (all the other talks are great too) you can get a 25% discount using the code velfall09sdc
In my last post I introduced event delegation in SproutCore and the basics of how to handle events. In this post I’m going to build on this foundation to show you how you can add event handlers to drag a view around the window.*
Introducing the Mouse Events
As I noted in the first post, SproutCore recognizes several different types of mouse events. Most of these events are essentially the same events sent by most browsers, though some differ significantly in order to give you tighter control.
Remember that to listen for events, you just need to add a method to your view with the same name. Here is a quick rundown of the different methods you can add to your view:
- mouseDown() – Called when the mouse button is pressed while over your view. You must return YES (i.e. true) from this method for mouseDragged() or mouseUp() to be called.
- mouseDragged() – Called when the mouse is moved while the button is pressed. This is only called if you returned YES from mouseDown().
- mouseUp() – Called when the mouse button is released. Only called if you returned YES from mouseDown().
- mouseOver() – Called when the mouse enters the view’s visible area.
- mouseOut() – Called when the mouse leaves the view’s visible area.
- mouseMoved() – Called whenever the mouse is moved while over the view.
It’s important to note that all of these events, except for mouseDragged() and mouseUp() are sent first to the view that is directly under the mouse pointer at the time of the event. mouseDragged() and mouseUp() only happen after a mouseDown() event. They are always sent first to the view that implemented mouseDown() AND returned YES (or true) from that method.
Events do bubble up your view hierarchy using something called a Responder Chain, but that will be the subject for another post.
Event handler methods are always passed an SC.Event object describing the event. This class provides a consistent cross-platform API for accessing event info. In general, it follows the API conventions for the built-in Event object on Firefox.