var test= new Class({
    Implements: Options,

    options: {
        myOp: "DDD
    },
    initialize: function(options) {
        this.setOptions(options);
    },
   addControl: function(pCntrlType) {
        var obj

        switch (pCntrlType) {
            case "TXTB":
                obj = new Element('input', {
                    'id': 'textbox1',
                    'styles': {
                        position: 'absolute'
                    },
                    'events': { 'click': function() {
                            grabControl(this);
                        }
                    }
                }).inject($('tdMainCenterRight'));
                break;
        }

        this.makeElementDragable(obj);
    },
    grabControl: function(pEl) {
        //this.updateControlPosition(pEl);

        //set class varial to seleted control

    },
    makeElementDragable: function(pObj) {

        new Drag.Move(pObj, {
            container: $('tdMainCenterRight'),
            droppables: '#tdMainCenterRight',
            precalculate: 'true',

            onDrag: function(el, event) {
                //this.updateControlPosition(el);
            } .bind(this)
        });
    }
});

Problem is when I use this class and the grabControl function is
called from within the click event, it errors, I know I need to bind
the grabControl function from the class to the click event but I can't
figure it out.

Thanks

Reply via email to