Hi there,

I have created a class with som default options :

var myClass = new Class({
        Implements: [Options, Events],

        options: {
                width: 600,
                height: 400
        },

        initialize: function(options){
                this.setOptions(options);
        },

        myFunc: function(){
                this.myDiv = new Element('div', {
                        styles: {
                                'width': this.options.width + 'px',
                                'height': this.options.height + 'px'
                        }
                });
        }
});

This is just an example but when i do this.options.width/
this.options.height on the new element, without setting the options
when i call the class, the width/height is undefined. What am i doing
wrong here ?

Reply via email to