Alright gurus here is what i am trying to do:

         Test = Class.create({
                options: {
                        mystr: "hello",
                        callback: Prototype.EmptyFunction
                },
                initialize: function(opt)
                {

                        Object.extend(this.options, opt);

                }
        });

var x = new Test({mystr: "variable x", callback: function()
{ alert("x"); } });
var y = new Test({mystr: "variable y with no callback"});

now when i do :

x.options.callback(); // i get alert -- which is what i expect

but when i do:

y.options.callback(); //it again pops up an alert.. which isn't
suppose to happen..

any ideas what am i doing wrong?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to