Foo = Class.create();
Foo.prototype = {
initialize: function() {
var array = $A([1, 2, 3]);
with(this) {
array.each(function (i) {
hello();
});
}
},
hello: function() {
alert('hello');
}
On Mar 17, 9:20 am, "Gareth Evans" <[EMAIL PROTECTED]> wrote:
> For my, and other group members benefit, could you please paste your final
> solution?
> I do not know what you mean by with(this) so I want to see in case it is a
> better solution for the problem if I have it in the future.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---