DOH. Man, I feel stupid. God damn time shifts – I should be home
already, chilling.
Thanks CroNiX!
On Oct 27, 5:01 pm, CroNiX <[EMAIL PROTECTED]> wrote:
> Try:
> var EngineManager;
>
> window.addEvent('domready', function() {
> EngineManager = new Engine();
>
> });
>
> You have to define it outside of domready. You can instantiate it
> within domready.
>
> On Oct 27, 9:54 am, Oskar Krawczyk <[EMAIL PROTECTED]> wrote:
>
> > Hi folks,
>
> > I have a weird one. Basically I'm initializing a class inside
> > DomReady:
>
> > window.addEvent('domready', function() {
> > var EngineManager = new Engine();
>
> > });
>
> > Right? Cool.
>
> > Afterwards I'd like to refer to a method by calling
> > EngineManager.slides() but after the whole page gets loaded so I do
> > this:
>
> > window.addEvent('load', function() {
> > EngineManager.slides();
>
> > });
>
> > Right? Nope... That throws an error saying that "EngineManager is not
> > defined" which is odd since it's right there... defined ages ago.
>
> > Am I missing something or onDomReady and onLoad are two parallel
> > realities for themselves?
>
> > Best,
> > Oskar