Hey there,
claudest2 a écrit :
> for each (tag in this.tagArray) {
Note that "for each" was introduced in JS 1.6, and is therefore not
supported on any browser other than FF at this point. Additionally, I'm
not sure you even need "each:" this only adds key uniqueness over the
regular for...in.
> I'm pretty sure this is a scope problem but I can't figure it out.
Yeah: you need to bind your anonymous function to "this" for it to know
the proper "this" reference:
this.tagArray.each((function(tag) {
...
}).bind(this));
On another note, naming a hash "tagArray" sounds misleading to me.
--
Christophe Porteneuve aka TDD
[EMAIL PROTECTED]
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---