To complete our application we will allow our users to upload a picture of the contact so that it appears on the details drop down.
Archive for January 2007
OK if you’ve stuck with me so far you should have a functioning application with a Scriptaculous effect that you have achieved with very few keystrokes (very few indeed if you just copied my code!). We are nearly at the end of our journey – just 2 more sessions to go. So for today’s session we will look at taking that “Toggle Details” link and make it more context sensitive – “Show Details” to show the details and “Hide Details” to hide them.
Time’s tight today so I will just introduce my technique for creating alternating rows into our contact list.
So we’ve got a simple Contact List working but there are two big problems.
- When I’m editing the contact the data changes even if I click “Cancel”.
- It doesn’t look very pretty.
Today we are going to fix this…
So we’ve got our first cut domain model and now its time to add our views. Today we are going to add another two classes MyAddressBookView and MyContactEditor…
Learning Seaside is fun and there are a number of good tutorials out there (but beware that some don’t use the latest Seaside 2.7 release) and a number of good blogs (I especially recommend Ramon Leon’s Blog). But it can still be a bit tricky to find examples of exactly what you want. What I’d like to do over the next couple of posts is provide a worked example of a commonly used presentation technique with an extra Scriptaculous twist.
So I sat down last night with my 9 year old boy who’s got in his head some ideas about a game he wants to write. We open up Scratch and I start to show him what it can do.
First I animate my cat and get him walking around.
“But it has to be a monkey Dad, not a cat”
“OK we’ll make him a monkey” – we select the cat and change his costume. Cool.
“But the monkey has to go into the tree house, Dad.”
“OK. Lets create a background with a tree house.” – we build our stage and add a tree house with a ladder. When the monkey gets to the ladder he climbs it and gets to the house.
“Now he needs to go through the door and be in the lounge”
We make it happen. I smile smuggly at what we’ve acheived and tell him that’s it for tonight.
“OK but tomorrow I want to get my friends on the internet to come and join me with their monkeys in the lounge”
I swallow hard and explain how I can’t do that with Scratch.
The kids of today just want it all! Maybe tomorrow I’ll show him Croquet.
Took a break from my seaside investigations to download Scratch. Have to say I am very impressed!
Tonight I am hoping to introduce my 9 year old son to it and see how it flies with its intended audience. It’s interface is very clean and very intuitive and takes EToys to the next level. Within about an hour of investigating last night I was able to write a game where my cat had to dodge giant raindrops to avoid being washed away. This stuff is very simple and very cool.
It’s also great to see another smalltalk product out there that looks good and plays good and may just catch the imagination of the next generation of software developers.
Alan Kay talked of Inventing the Future – the future is our kids and they may be inventing with Scratch and Smalltalk.