Define global variable only if glance is activated

Hi,

I have defined a global class:

class MyDayAdvancedApp extends App.AppBase {
    function initialize() {
        AppBase.initialize();
    	glob = new global();
    }
}

Saying that, the class global shall only been created if glance view is activated:

(:glance)
class global {

}

How can I manage this?