2008-07-18:
[5:56] <Helma7> aa[6:54] <zumbrunn> ReferenceError: "aa" is not defined.[13:47] <jkridner> cute.[13:48] <zumbrunn> hehe[15:08] <midnightmonster> jkridner, did you see my response to you a few days ago about being able to just say /new_whatever instead of /new_whatever/edit ?[15:25] <jkridner> hmmm... I'm not sure. I think so. I've implemented /new_whatever/edit.[15:26] <midnightmonster> you wrote a few days ago wishing it could be just /new_whatever, I thought[15:26] <jkridner> http://www.beagleboard.org/gitweb/?p=beagleboard.org.git;a=blob;f=code/Page/page.js;h=a1c37330937df776997ccbe9a2208c30e7d35bf4;hb=ac965f6c6416fae196a241982141d493309b809f[15:26] <jkridner> test[15:26] <jkridner> that was weird.[15:27] <jkridner> oh... I had a / at the beginning of my msg. :)[15:27] <jkridner> it is now doing /new_whatever to create a new object, but you still need to trigger the edit action.[15:28] <jkridner> I actually want /new_whatever to show a "not found" message, if it doesn't exist. Which is what I tried to implement.[15:28] <jkridner> it is still pretty ugly.[15:28] <midnightmonster> look fine to me. what don't you like?[15:29] <jkridner> I need to think more about handling custom properties for different Page types.[15:30] <jkridner> I've now eliminated using a 'Project' type that inherits from 'Page'.[15:31] <jkridner> Instead, I'm just adding properties using the Page object.[15:31] <jkridner> for one, I think that I have some security issues with the way I'm accepting all properties.[15:31] <jkridner> my "blocked_attribute" hack doesn't seem very good.[15:32] <jkridner> you know, I've never been able to attract my ~450 mailing list members to actually contribute to the website back-end, despite keeping it open source.[15:32] <jkridner> that is a bit frustrating to me.[15:33] <midnightmonster> I run a ~250 member list of web designers/developers. I'm pretty sure no one will jump in to help with my sort-of similar project.[15:34] <midnightmonster> at least not until there's something interesting and working already there to see[15:34] <midnightmonster> btw, don't use Arrays for hash tables in JavaScript[15:34] <jkridner> I forgot the better hash table syntax.[15:35] <midnightmonster> arrays actually aren't hash tables at all--you're not making an associative array when you do that. you're just using the fact that JAvaScript lets you assign arbitrary properties to most anything[15:35] <jkridner> yeah, I know we have several people who want to promote their activities, so I'm about to make it a prerequisite that they add website features if they want me to promote their activities![15:35] <midnightmonster> you want a plain object for a hash[15:36] <jkridner> k.[15:36] <jkridner> I'll switch to using just new Object();[15:36] <midnightmonster> and don't use new Array or new Object[15:36] <midnightmonster> just myArray = []; or myArray = {};[15:36] <midnightmonster> oop, myObj = {}[15:36] <midnightmonster> and you can make your list a lot cleaner like this:[15:37] <midnightmonster> blocked_attribute = { uri:true, submit:true, user:true, time:true };[15:40] <midnightmonster> and this is a shorter definition: blocked_attribute = ['uri','submit','user','time']; but then when you check that the given attr is not blocked, you have to do[15:40] <midnightmonster> if(blocked_attribute.indexOf(x)==-1)[15:44] <midnightmonster> do your arbitrary properties get persisted to the XML db?
In the channel now:
Logs by date: