Hi,

Here is the log of the chatroom at http://farsides.com/chat/ (or 
irc://irc.freenode.net/#farsides) for the 2011-05-04.


2011-05-04 03:04:56+0000 antoviaque (antoviaque) is now online
2011-05-04 05:27:17+0000 dachary (dachary) is now online
2011-05-04 06:23:14+0000 antoviaque (antoviaque) is now online
2011-05-04 07:11:30+0000 <antoviaque> dachary: hello!
2011-05-04 07:11:58+0000 <antoviaque> I'm looking at the callback url
2011-05-04 07:13:48+0000 <antoviaque> actually it seems to be already set - not 
sure how you did this, but you did it ;p
2011-05-04 07:13:56+0000 <antoviaque> Post-Authorize Callback URL => 
http://cardstori.es/drupal/drupal-7.0/fb_app/event/cardstories/post_authorize/
2011-05-04 07:22:15+0000 <dachary> hum
2011-05-04 07:22:32+0000 <dachary> antoviaque: ok
2011-05-04 07:24:01+0000 <dachary> antoviaque: I'm a little freaked out by 
drupal but I'm exploring with the help of my drupal friend
2011-05-04 07:25:12+0000 <antoviaque> I would be scared too, yep - even with a 
friend ;p
2011-05-04 07:31:57+0000 <dachary> My hope is that something is active and 
feature full
2011-05-04 07:36:22+0000 <antoviaque> yep, for the level of activity drupal 
could be a good bet
2011-05-04 08:07:48+0000 * antoviaque is looking at the ticket system to chose 
a task for today :D
2011-05-04 08:08:03+0000 <antoviaque> If you have any hints, don't hesitate
2011-05-04 08:16:38+0000 <antoviaque> dachary: I'm thinking of working on 
http://cardstori.es/trac/ticket/39 http://cardstori.es/trac/ticket/31 and 
http://cardstori.es/trac/ticket/36 - what do you think?
2011-05-04 08:17:16+0000 <antoviaque> for the last one I'm not sure - it would 
require a server side page
2011-05-04 08:17:44+0000 Pranjal (Pranjal) is now online
2011-05-04 08:17:59+0000 <Pranjal> Hi
2011-05-04 08:18:05+0000 <antoviaque> hi Pranjal
2011-05-04 08:18:22+0000 <antoviaque> how are you?
2011-05-04 08:18:38+0000 <Pranjal> Hi Xavier i am good, just came back from the 
trip
2011-05-04 08:18:40+0000 <Pranjal> how about you
2011-05-04 08:18:46+0000 <antoviaque> I'm good, thank you!
2011-05-04 08:19:07+0000 <Pranjal> it seems that the setting on Facebook apps 
have been changed
2011-05-04 08:19:20+0000 <Pranjal> were you trying something?
2011-05-04 08:19:27+0000 <antoviaque> uhhh - wait, let me see
2011-05-04 08:20:04+0000 <antoviaque> ah damn, I changed for the tests loic is 
doing on the wrong page, sorry!
2011-05-04 08:20:39+0000 <Pranjal> oh..ok... so I'll revert that..
2011-05-04 08:20:42+0000 <dachary> I would rank them from easier to harder : 
36, 31, 39. All are relevant IMO.
2011-05-04 08:20:46+0000 <dachary> antoviaque: ^
2011-05-04 08:21:08+0000 <antoviaque> Pranjal: I'll give you access to another 
page, you can change it there - sorry about that
2011-05-04 08:21:28+0000 <dachary> I will leave in 15 minutes to walk Berlin. I 
think I have something promising. I cross fingers to not be bitterly 
disapointed. I live in fear in the CMS world, this needs to end ;-)
2011-05-04 08:21:36+0000 <Pranjal> no problem.. sure.. if that would take some 
time I can create one for myself for now
2011-05-04 08:21:44+0000 <antoviaque> Pranjal: here you go - 
http://www.facebook.com/developers/editapp.php?app_id=219242348086561
2011-05-04 08:22:15+0000 <Pranjal> ok got it.. thanks
2011-05-04 08:22:29+0000 <antoviaque> dachary: ok! Lucky one, I'll need to come 
visit Berlin again some time : )
2011-05-04 08:24:47+0000 <antoviaque> Pranjal: I'll let you get settled - when 
you feel ready tell me, would be good to recap, test and set the next deadline
2011-05-04 08:25:21+0000 <Pranjal> sure.. I am setting up the new app.. please 
give me 15-20 mins.. 
2011-05-04 08:25:31+0000 <antoviaque> no problem ,take your time
2011-05-04 09:05:28+0000 <antoviaque> dachary: for when you come back - I'm 
thinking of using the contactable plugin rather than the feedback button plugin 
- it also handles the form itself: 
http://theodin.co.uk/blog/ajax/contactable-jquery-plugin.html
2011-05-04 09:05:37+0000 <antoviaque> demo 
http://plugins.theodin.co.uk/jquery/contactable.1.3/index.html
2011-05-04 09:05:53+0000 <antoviaque> license is MIT + GPL
2011-05-04 09:05:59+0000 <antoviaque> ok for you?
2011-05-04 09:07:11+0000 <antoviaque> How should I handle the PHP side? I could 
simply put it on the project VM, and those who want another form just change 
the URL to their own?
2011-05-04 09:10:18+0000 <antoviaque> updated 
http://cardstori.es/trac/ticket/36#comment:2
2011-05-04 09:15:33+0000 <antoviaque> Moving on to 
http://cardstori.es/trac/ticket/31 in the meantime
2011-05-04 09:23:40+0000 tartarugafeliz (tartarugafeliz) is now online
2011-05-04 09:23:51+0000 <antoviaque> tartarugafeliz: you can see the current 
designs here: http://cardstori.es/?skin=invitation_owner
2011-05-04 10:01:31+0000 * antoviaque is reviewing the design tickets with 
deborah
2011-05-04 12:16:30+0000 <antoviaque> We've finished updating the tickets - the 
ones marked as "defect" are the ones from the previous job that need to be 
fixed first, the "enhancements" are new (ie they weren't in the mockups 
provided to Deborah) and will be picked up progressively as new jobs
2011-05-04 12:16:36+0000 <antoviaque> http://cardstori.es/trac/report/10
2011-05-04 12:42:34+0000 smartwhiz (smartwhiz) is now online
2011-05-04 13:11:42+0000 antoviaque (antoviaque) is now online
2011-05-04 13:41:08+0000 antoviaque (antoviaque) is now online
2011-05-04 13:50:40+0000 <dachary> 
http://theodin.co.uk/blog/ajax/contactable-jquery-plugin.html : from a distance 
it looks ok. From a licensing point of view, it also looks good.
2011-05-04 13:51:14+0000 <antoviaque> ok, cool
2011-05-04 13:51:22+0000 <antoviaque> working on the other ones in the meantime 
: )
2011-05-04 13:52:01+0000 <dachary> regarding PHP you can add it on cardstories, 
in /var/www/diem for instance (only a few directories have PHP enabled, you can 
squat this one).
2011-05-04 13:52:38+0000 * dachary finished reading the backlog
2011-05-04 13:53:26+0000 <dachary> I have two hours of work before I leave 
again. Don't hesitate to ping me if you need.
2011-05-04 13:53:38+0000 <antoviaque> ok
2011-05-04 13:56:02+0000 <dachary> antoviaque: what are you working on right 
now ? 
2011-05-04 14:16:18+0000 <antoviaque> The invite friends button
2011-05-04 14:17:00+0000 <antoviaque> From to go back to advertizing from the 
author while players pick cards
2011-05-04 14:17:10+0000 <antoviaque> http://cardstori.es/trac/ticket/31
2011-05-04 14:17:51+0000 <antoviaque> I've asked Deborah for the latest version 
the bubble, with the separated button
2011-05-04 14:18:12+0000 <antoviaque> Modified the CSS, and now I'm adding the 
click event
2011-05-04 14:20:09+0000 <antoviaque> I've a question - what is the 
voting.toggleClass('cardstories_ready', game.ready); for?
2011-05-04 14:21:08+0000 <antoviaque> dachary: 
2011-05-04 14:30:57+0000 <dachary> the idea is that the button does nothing (no 
click action) if the game is not ready to go to the voting phase. It allows for 
a different look, based on the CSS class.
2011-05-04 14:31:04+0000 <dachary> antoviaque: does this make sense ?
2011-05-04 14:32:38+0000 <antoviaque> yup it does - got it now
2011-05-04 14:32:50+0000 <antoviaque> thanks : )
2011-05-04 14:37:15+0000 <antoviaque> Fixed: 
https://gitorious.org/~antoviaque/cardstories/antoviaques-cardstories/commit/5f724bd75cf08a116535d1776aaeb6187e1c443d
2011-05-04 14:37:21+0000 <antoviaque> Comments welcomed : )
2011-05-04 14:39:10+0000 <antoviaque> dachary: how do you want me to mark the 
related ticket ?
2011-05-04 14:39:19+0000 <dachary> mark ? 
2011-05-04 14:40:04+0000 <antoviaque> should I resolve the ticket? The ticket 
system don't have a "patch submitted"-like status
2011-05-04 14:41:10+0000 <dachary> oh. In the commit message you can add 
close#31 and it will be associated to your commit. 
2011-05-04 14:41:36+0000 <dachary> antoviaque: however, I need to point out 
that you're missing a test ;-)
2011-05-04 14:41:53+0000 <antoviaque> Not sure how you intend to keep track of 
proposed patches for your branch
2011-05-04 14:43:16+0000 <dachary> antoviaque: you can add the URL to a comment 
and assign back the ticket to me. Otherwise I'll review the pending patches 
from your repo & merge them. This one and the others. There is no need to add 
the comment.
2011-05-04 14:43:29+0000 <dachary> except if you need a reminder
2011-05-04 14:44:02+0000 <antoviaque> Now working on 
http://cardstori.es/trac/ticket/39
2011-05-04 14:45:20+0000 <antoviaque> it's good to keep track for myself yup
2011-05-04 14:45:31+0000 <antoviaque> ok, ok, I'll have a look at the tests ;p
2011-05-04 14:45:43+0000 <dachary> :-) 
2011-05-04 14:46:01+0000 <dachary> this is a fairly simple one
2011-05-04 14:47:33+0000 <antoviaque> how do I see the coverage with qunit?
2011-05-04 14:48:27+0000 * antoviaque is reading http://docs.jquery.com/Qunit
2011-05-04 14:50:17+0000 <dachary> 
https://gitorious.org/~antoviaque/cardstories/antoviaques-cardstories/commit/5f724bd75cf08a116535d1776aaeb6187e1c443d
2011-05-04 14:50:34+0000 <dachary> I added a comment 
2011-05-04 14:50:42+0000 <dachary> antoviaque: qunit won't show coverage
2011-05-04 14:50:59+0000 <dachary> you need jscoverage 
http://siliconforks.com/jscoverage/ 
2011-05-04 14:51:13+0000 <dachary> the basic idea is that jscoverage will copy 
the directory in which the js resides
2011-05-04 14:51:38+0000 <dachary> into another and will modify the js code to 
add instructions counting which statements are run
2011-05-04 14:51:45+0000 <dachary> brutal, but works og
2011-05-04 14:51:47+0000 <dachary> ok
2011-05-04 14:51:54+0000 <dachary> you can apt-get install jscoverage
2011-05-04 14:51:55+0000 <antoviaque> ahh - yes, like in HPO
2011-05-04 14:52:06+0000 <dachary> yes
2011-05-04 14:52:12+0000 <dachary> qunit does nothing really
2011-05-04 14:52:27+0000 <antoviaque> thx
2011-05-04 14:52:28+0000 <dachary> only runs all the tests + provide two 
functions : ok + equal and show the results 
2011-05-04 14:52:44+0000 <dachary> I don't think I ever read the documentation 
of qunit ;-)
2011-05-04 14:52:51+0000 <dachary> maybe I should
2011-05-04 14:53:23+0000 <dachary> antoviaque: did you get my comments ? I 
think that if you address them it will make it easier for you to test the code.
2011-05-04 14:53:38+0000 <dachary> antoviaque: there is one tricky part about 
qunit. Are you ready for it ? 
2011-05-04 14:54:11+0000 <antoviaque> sure!
2011-05-04 14:54:31+0000 <dachary> 
http://cardstori.es/trac/browser/static/test/test.js
2011-05-04 14:54:43+0000 <dachary> test("send_game", function() {
2011-05-04 14:54:50+0000 <dachary> starts with "stop()"
2011-05-04 14:54:57+0000 <dachary> are you there ? 
2011-05-04 14:55:07+0000 <dachary> antoviaque: ^
2011-05-04 14:55:50+0000 <antoviaque> I was looking at it yep - why stop?
2011-05-04 14:56:12+0000 <dachary> you do that when your test needs to wait for 
an asynchronous action
2011-05-04 14:56:19+0000 <dachary> read stop() as wait()
2011-05-04 14:56:51+0000 <dachary> it means that your test will *not* be 
considered complete even when the function returns
2011-05-04 14:57:22+0000 <dachary> qunit will run the function, notice that it 
called stop() and go idle until further notice
2011-05-04 14:58:06+0000 <dachary> when the expected asynchronous action fires, 
it must call start() which you can read as continue() or resume() 
2011-05-04 14:58:12+0000 <antoviaque> I see - ok for that
2011-05-04 14:58:24+0000 <antoviaque> thx, it would have taken me some time to 
figure it out
2011-05-04 14:58:36+0000 <dachary> if the expected async action does not 
happen, qunit will timeout 
2011-05-04 15:00:08+0000 <dachary> antoviaque: most of the tests for 
cardstories do not rely on this and can be read in sequence.
2011-05-04 15:01:00+0000 <dachary> antoviaque: the expect(7) means that 7 
assertions (equal or ok calls) are expected. qunit will fire an error if more 
tests are run. or if less tests are run. 
2011-05-04 15:01:28+0000 <dachary> when you add a new test, you will need to 
adjust the value of the function in which you add the test to match the number 
of assertions set
2011-05-04 15:01:38+0000 * dachary runs out of things to explain about qunit
2011-05-04 15:03:23+0000 <antoviaque> (tel)
2011-05-04 15:04:35+0000 * dachary has hopes about 
http://www.drupalforfacebook.org/ . Installed on 
http://cardstori.es/drupal/drupal-7.0/ 
2011-05-04 15:17:18+0000 <antoviaque> uh, ca a l'air pas mal ca : )
2011-05-04 15:20:07+0000 <dachary> antoviaque: je te suggère de faire le "tour"
2011-05-04 15:20:12+0000 <dachary> ca explique pas mal
2011-05-04 15:20:19+0000 <antoviaque> oui je suis en train : )
2011-05-04 15:20:50+0000 <dachary> it looks actively maintained too
2011-05-04 15:21:45+0000 <dachary> and just by taking the tour, you get a sense 
of the huge amount of work it would be to do all that manually. So far it's the 
best work I've seen, all CMS included.
2011-05-04 15:22:14+0000 <antoviaque> yup, it gives a good impression
2011-05-04 15:31:09+0000 * dachary trying to figure out how it works. It's made 
by people who don't like to write documentation nor tests. 
2011-05-04 15:31:36+0000 <dachary> since I'm not familiar with facebook to 
begin with, it's a lot of guessing ;-0
2011-05-04 15:31:48+0000 <dachary> I see there is something in the footer
2011-05-04 15:32:03+0000 <antoviaque> tell me if you need to know something
2011-05-04 15:32:08+0000 <antoviaque> in the footer?
2011-05-04 15:37:01+0000 * dachary following the track of the code. It's 
apparently done by modifying the theme.
2011-05-04 15:46:47+0000 tartarugafeliz1 (tartarugafeliz1) is now online
2011-05-04 15:51:25+0000 <dachary> I won't have time to complete the theme 
crash course, will resume later.
2011-05-04 16:04:03+0000 antoviaque (antoviaque) is now online
2011-05-04 16:04:21+0000 <antoviaque> grmml connection
2011-05-04 16:06:09+0000 <antoviaque> dachary: I'm trying to get my head around 
how to do the test - my guess is that I need to add a new test calling 
$.cardstories.invitation() first, check that the button exists, click, then 
check that the advertize block is active - right?
2011-05-04 16:06:47+0000 <antoviaque> Not sure how to not replicate the args 
passed to invitation() in the "invitation_owner_ test
2011-05-04 16:06:59+0000 <antoviaque> "invitation_owner" test
2011-05-04 16:56:23+0000 <antoviaque> dachary: gave it a shot 
https://gitorious.org/~antoviaque/cardstories/antoviaques-cardstories/commit/01535055f0d4f6d7f044774d1668ce7f7d599e56
 but the test fails http://cardstories.antoviaque.org:4923/static/test/ and I 
have a hard time understanding why...
2011-05-04 16:56:30+0000 <antoviaque> Sorry to be a pain : )
2011-05-04 18:25:46+0000 lincoln_ (lincoln_) is now online
2011-05-04 18:35:58+0000 lincoln_ (lincoln_) is now online
2011-05-04 18:36:10+0000 <antoviaque> hi lincoln_!
2011-05-04 18:42:26+0000 lincoln_ (lincoln_) is now online
2011-05-04 18:43:11+0000 <lincoln_> antoviaque, aff, hehe, my connection is 
worst than ever today
2011-05-04 18:43:20+0000 <antoviaque> I can see that : )
2011-05-04 18:44:28+0000 <antoviaque> So while you are here I'll ask quickly ;p 
When do you want to start the first weekly iteration ? On this Saturday ?
2011-05-04 18:44:36+0000 <antoviaque> lincoln_: ^
2011-05-04 18:44:48+0000 <lincoln_> that would be nice
2011-05-04 18:44:55+0000 <lincoln_> :)
2011-05-04 18:44:58+0000 <antoviaque> perfect - I'll be there then : )
2011-05-04 18:55:28+0000 lincoln_ (lincoln_) is now online
2011-05-04 19:04:31+0000 lincoln_ (lincoln_) is now online
2011-05-04 19:21:58+0000 antoviaque (antoviaque) is now online
2011-05-04 19:23:01+0000 <antoviaque> dachary: gave a shot at fixing #39 too 
https://gitorious.org/~antoviaque/cardstories/antoviaques-cardstories/commit/7922c0a10d1271fa34d6131e98b36999e65a2edb
 - but I have issues with tests there too
2011-05-04 19:34:02+0000 lincoln_ (lincoln_) is now online
2011-05-04 20:33:29+0000 <dachary> antoviaque: reading
2011-05-04 20:36:23+0000 * dachary reading the cod
2011-05-04 20:36:24+0000 <dachary> e
2011-05-04 20:41:27+0000 <dachary> the author can recreate games to get other 
cards anyway
2011-05-04 20:41:34+0000 <dachary> *very* good point
2011-05-04 20:45:45+0000 <antoviaque> yup
2011-05-04 20:45:48+0000 <antoviaque> : )
2011-05-04 20:48:31+0000 * dachary trying to ingest the coding logic to comment 
usefully
2011-05-04 20:50:17+0000 <dachary> I like to get into the head of other coders 
thru their code
2011-05-04 20:56:35+0000 <dachary> I think I have it
2011-05-04 20:57:22+0000 <dachary> It would be much easier to do it as for 
voting or picking
2011-05-04 20:57:33+0000 <dachary> to display the cards that is
2011-05-04 20:57:41+0000 <dachary> you have 7 cards, it does not change
2011-05-04 20:58:41+0000 <dachary> i.e. you call the player_select_card function
2011-05-04 20:58:58+0000 <dachary> after picking 7 cards at random and passing 
them in the cards parameter
2011-05-04 20:59:25+0000 <dachary> antoviaque: let me know if you get my 
meaning or if you would like me to explain more
2011-05-04 21:01:48+0000 <antoviaque> hmm, let me have a look at voting and 
picking - didn't read that part yet
2011-05-04 21:02:49+0000 * dachary reading 
http://www.metaltoad.com/blog/framework-dead-long-live-CMS
2011-05-04 21:03:31+0000 <dachary> antoviaque: if creating a game is limited to 
chosing between 7 cards, it's very much link picking / voting
2011-05-04 21:04:13+0000 <antoviaque> true, I didn't think of looking at those
2011-05-04 21:19:58+0000 <antoviaque> dachary: I have a hard time understanding 
the logic of player_select_card, gumpf
2011-05-04 21:20:46+0000 <dachary> antoviaque: do you want me to explain ? 
2011-05-04 21:20:55+0000 <antoviaque> yup, that would help me
2011-05-04 21:21:44+0000 <dachary> ok
2011-05-04 21:22:02+0000 <dachary> there are N slots
2011-05-04 21:22:14+0000 <dachary> in the HTML
2011-05-04 21:22:20+0000 <dachary> one for each visible card
2011-05-04 21:22:40+0000 <dachary> the general idea is to replace the src="" 
with the URL of the image that must be displayed 
2011-05-04 21:23:01+0000 <dachary> antoviaque: contrary to your approach which 
is to pick the elements containing the images you need
2011-05-04 21:23:04+0000 <dachary> do you get that ? 
2011-05-04 21:23:34+0000 <antoviaque> let me see
2011-05-04 21:23:45+0000 <dachary>  $(this).attr('src', card_file);
2011-05-04 21:24:16+0000 <dachary>  $('.cardstories_card', 
element).each(function(index) { loops over N slots 
2011-05-04 21:24:23+0000 <antoviaque> yep ok
2011-05-04 21:24:29+0000 <dachary> good
2011-05-04 21:24:50+0000 <dachary> before that, each element containing a card 
is bound to an action
2011-05-04 21:25:01+0000 <antoviaque> I should have paid more attention to the 
HTML *stupid*
2011-05-04 21:25:02+0000 <dachary> which is action= (action parameter)
2011-05-04 21:25:13+0000 <dachary> antoviaque: don't blame yourself
2011-05-04 21:25:19+0000 <dachary> antoviaque: I started with create
2011-05-04 21:25:28+0000 <dachary> and then simplified for voting / picking
2011-05-04 21:25:38+0000 <dachary> and came back 2 times to make it simpler
2011-05-04 21:25:45+0000 <dachary> and then factorized the code
2011-05-04 21:26:28+0000 <dachary> should you chose to use this function, you 
need to give it an array of 7 numbers (in the cards) parameter, picked out of 36
2011-05-04 21:26:59+0000 <dachary> 7 times; 
cards.append(pool.remove(rand()*pool.length)
2011-05-04 21:27:39+0000 <dachary> this way you only have to write down the 
random selection of 7 cards out of 36
2011-05-04 21:27:53+0000 antoviaque (antoviaque) is now online
2011-05-04 21:28:08+0000 <antoviaque> yep that part is there - the replacement 
should be easy
2011-05-04 21:28:17+0000 <antoviaque> (disconnected - last seen was "7 times; 
cards.append(pool.remove(rand()*pool.length)")
2011-05-04 21:29:17+0000 <dachary> this way you only have to write down the 
random selection of 7 cards out of 36
2011-05-04 21:29:25+0000 <dachary> that's all there is more
2011-05-04 21:29:55+0000 <dachary> now, if this function is going to be used 
for the creation of the game
2011-05-04 21:30:02+0000 <dachary> I suppose it should be split even further
2011-05-04 21:30:13+0000 <dachary> because when the game is created, the 
sentence is not available yet
2011-05-04 21:30:34+0000 <dachary> alhtough it is part of the body of this 
function, merely because it was shared by states where the sentence must be 
displayed
2011-05-04 21:30:44+0000 <dachary> antoviaque: am I making sense ? 
2011-05-04 21:30:47+0000 <antoviaque> yup
2011-05-04 21:31:06+0000 <dachary> one last thing about this function
2011-05-04 21:31:15+0000 <antoviaque> I just take out the line setting the 
sentence in a palyer_select_card, and factorize a select_card
2011-05-04 21:31:23+0000 <dachary> yes
2011-05-04 21:31:37+0000 <dachary> displaying a card is best done by setting a 
class like "cardXXX"
2011-05-04 21:31:38+0000 <dachary> but
2011-05-04 21:31:52+0000 <dachary> jDock won't deal with this
2011-05-04 21:32:01+0000 <dachary> it needs src=
2011-05-04 21:32:02+0000 <antoviaque> yep, I've got that already : )
2011-05-04 21:32:24+0000 <antoviaque> That's why I was moving around between 
two containers
2011-05-04 21:32:34+0000 <dachary> so the idea is to encode the base path of 
the src card in the meta data of the parent element
2011-05-04 21:33:26+0000 <dachary> antoviaque: do you read the meta data <div 
class="cardstories_cards" 
data="{card:'css/medium/card0{card}.png',nocard:'css/medium/card-back.png'}" > 
? 
2011-05-04 21:34:13+0000 <dachary> the code itself has no reference to a path 
(and it must not)
2011-05-04 21:34:46+0000 <dachary> instead it relies on specific meta data 
information to retreive the pattern to use when setting the src="" of the img 
that is required from jDock
2011-05-04 21:35:17+0000 <dachary> which it does with card_file = 
meta.card.supplant({'card': cards[index]});
2011-05-04 21:36:28+0000 <dachary> supplant is a substitution fonction that 
will replace the {card}placeholder with the value cards[index] and therfore 
generate the css/medium/card010.png src path for card 10
2011-05-04 21:36:43+0000 <dachary> Am I being clear ? 
2011-05-04 21:37:07+0000 <antoviaque> I see - the reason why it's better than 
my approach because it allows to factorize card paths, right?
2011-05-04 21:37:24+0000 <antoviaque> Or is there something else?
2011-05-04 21:37:37+0000 <dachary> hum
2011-05-04 21:37:44+0000 <dachary> I think your approach would work too
2011-05-04 21:37:49+0000 <dachary> with no major drawback
2011-05-04 21:38:03+0000 <dachary> let me think
2011-05-04 21:38:12+0000 <dachary> ah
2011-05-04 21:38:24+0000 <dachary> your approach requires that all the deck is 
encoded in the HTML
2011-05-04 21:38:52+0000 <dachary> which is implied by the original design of 
the extensive list of cards in the HTML section of the create state from which 
you based your work
2011-05-04 21:38:58+0000 <antoviaque> yup - yours allows to extend the deck 
without touching the HTML
2011-05-04 21:39:05+0000 <dachary> yes
2011-05-04 21:39:18+0000 <dachary> the web service could send a list of cards 
that can be displayed
2011-05-04 21:39:25+0000 <dachary> by sending a list of numbers
2011-05-04 21:39:40+0000 <dachary> otherwise... well it would be complicated
2011-05-04 21:39:50+0000 <dachary> I think that's what really separates the two 
implementations
2011-05-04 21:40:17+0000 <antoviaque> You would still need the image files, but 
it's still easier yes
2011-05-04 21:40:38+0000 <dachary> you need a *pattern* to the image files in 
the HTML
2011-05-04 21:40:45+0000 <dachary> not the actual list
2011-05-04 21:40:55+0000 <antoviaque> Yep
2011-05-04 21:41:11+0000 <antoviaque> Perfectionist :p
2011-05-04 21:41:50+0000 <dachary> I'm not ! I would like to be though, you're 
correct in that respect ;-)
2011-05-04 21:42:07+0000 <antoviaque> Only a perfectionist could say that ;)
2011-05-04 21:42:18+0000 <dachary> :-)
2011-05-04 21:42:34+0000 <dachary> I think we've covered all there is in 
player_select_card
2011-05-04 21:42:42+0000 <antoviaque> yup, I'll rework the code
2011-05-04 21:42:50+0000 <dachary> which is quite a lot considering it's less 
than 20 LOC :D
2011-05-04 21:43:08+0000 <dachary> ah no
2011-05-04 21:43:10+0000 <dachary> there is more
2011-05-04 21:43:11+0000 <antoviaque> ahah, but it's ok, it helps me to learn 
the code and your style
2011-05-04 21:43:11+0000 <dachary> ahahah
2011-05-04 21:43:34+0000 <dachary> how does the click function know which card 
is being clicked ? 
2011-05-04 21:44:01+0000 <dachary> this is done by adding a meta data on the 
card element itself, containing the card number
2011-05-04 21:44:06+0000 <dachary> $(this).metadata({type: "attr", name: 
"data"}).card = card;
2011-05-04 21:44:21+0000 <dachary> so that, when the user clicks on the card, 
it can be retrieve by the click function
2011-05-04 21:44:27+0000 <dachary> var card = $(this).metadata({type: "attr", 
name: "data"}).card;
2011-05-04 21:44:28+0000 <antoviaque> yep, seen
2011-05-04 21:44:39+0000 <dachary> ok
2011-05-04 21:45:11+0000 <antoviaque> I'll change all that
2011-05-04 21:45:20+0000 <antoviaque> but I'll leave it for tomorrow : )
2011-05-04 21:45:50+0000 <antoviaque> Btw I've started integrating contactable 
also, but it doesn't work yet
2011-05-04 21:46:12+0000 <antoviaque> And I'll have questions about the tests, 
but I'll give it another look before bothering you with it
2011-05-04 21:46:33+0000 <antoviaque> How is it going with Drupal btw? Falling 
in love? : )
2011-05-04 21:53:58+0000 <dachary> freaking out
2011-05-04 21:54:05+0000 <antoviaque> ahah : )
2011-05-04 21:54:23+0000 <antoviaque> de belles relations commencent comme ca ;p
2011-05-04 21:55:08+0000 <dachary> I'm still having long talks with Pierre
2011-05-04 21:55:54+0000 <dachary> Pierre says his second best is symfony
2011-05-04 22:14:52+0000 antoviaque (antoviaque) is now online
2011-05-04 22:41:59+0000 * dachary reading http://trac.apostrophenow.org/
2011-05-04 22:53:26+0000 <antoviaque> bon dodo moi : )
2011-05-04 22:53:50+0000 <antoviaque> A demain 
2011-05-04 23:54:55+0000 dachary (dachary) is now online
_______________________________________________
Farsides mailing list - [email protected]

Wiki:  http://farsides.com/
List:  http://farsides.com/ml/
Forum: http://farsides.com/forum/
Ideas: http://farsides.com/ideas/
Chat:  http://farsides.com/chat/

Reply via email to