Change View in Sencha Architect
===

I am fairly new to Sencha Architect, as well as EXTJs. I have created an application with multiple Views (2 Containers). I am trying to switch views when clicking a button in container1. I have an event created which fires fine, what i don't know is how to switch to the next view? I've tried:
    
    if(Ext.getCmp('mainView'))
    {
        Ext.Viewport.setActiveItem(Ext.getCmp('mainView'));
    }
    else 
    {
        var view = Ext.create('Snapwire.view.mainView');
        Ext.Viewport.setActiveItem(view);
    } 

But this just throws a console error:

    Uncaught TypeError: Object function () {
                return this.constructor.apply(this, arguments);
            } has no method 'setActiveItem' 

Thanks!