Forums Window

'this.windowManager' is Null or not an object

Subscribe to 'this.windowManager' is Null or not an object 18 post(s), 8 voice(s)

 
Avatar harpa 4 post(s)

Hello,

I have made a simple application with window.js and GoogleMaps. It works very fine on FF2 (absolutely no error) but hangs on IE6 with this error (I have a french version of IE):

Ligne 1404
Car 2
‘this.windowManager’ a la valeur Null ou n’est pas un objet

It seems to happen when I create the window: window2 = new UI.Window(options);

for info: var options = { theme: ‘vista’, shadowTheme: ‘drop_shadow’, draggable: true };

Any idea would be appreciated…
by the way, PrototypeUI is great :-))

 
Avatar Ryan 4 post(s)

You’ll get that error if you try to open a window prior to the DOM being fully loaded. Change your code to the following and it should work:

Event.observe(document, ‘dom:loaded’, showWindow);
function showWindow() { var options = { theme: ‘vista’, shadowTheme: ‘drop_shadow’, draggable: true }; window2 = new UI.Window(options);
}

 
Avatar Ryan 4 post(s)

Never mind, the solution above fixes the problem for me in Firefox but I still see issues in IE6 and IE7. I’ll leave it to the forum gurus to provide a correct answer…

 
Avatar Seb Administrator 133 post(s)

This has been fixed in trunk version

 
Avatar samuel Administrator 7 post(s)

You should use document.whenReady(showWindow) instead of document.observe('dom:loaded', showWindow) because the last one doesn’t ensure callbacks are called in register order in IE6/7 so it may randomly lead to the error above.

Hopefully this should be fixed in Prototype soon.

 
Avatar harpa 4 post(s)

Thank you for your input.
I have tried to manually update my window.js file with then changes made in changeset 513 and call document.whenReady but it seems not to work. I am not at all familiarized with SVN tools. How can I easily compile or download a new window.js file based on the trunk version? (I’m on win xp)

 
Avatar Seb Administrator 133 post(s)

I am not familiar with windows (at least for a developer use)
In fact you can get the latest JS file here http://www.prototype-ui.com/current/dist/protot… (or http://www.prototype-ui.com/current/dist/window.js ...) they are automatically built after each commit
HTH

 
Avatar harpa 4 post(s)

thanks Seb. It works for then mentioned error but I get a new one: element.hasAttribute is not a function
at line 594 in window.js
This appends when I click anywhere outside the draggable area

 
Avatar samuel Administrator 7 post(s)

This has been fixed in revision 536, please update…

 
Avatar harpa 4 post(s)

Thank you samuel. It seems to work fine now :-)

 
Avatar frer 5 post(s)

Hi,

I have a very similar problem (“this.windowManager is undefined”). I have read the thread but am not sure to understand how to fix it. Do I need to use “document.whenReady()” everytime I want to open a new UI.Window or UI.Dialog?

I am asking because this would cause me problem since I need to have the code executed sequentially (i.e. not through a callback) because the calling method needs a reference on the window.

Thank you,

François

 
Avatar Seb Administrator 133 post(s)

Use document.whenReady only for initiliazing your page (when you want to create window on page load)

 
Avatar joe_tall 3 post(s)

Hello,

I have downloaded the last prototype-ui version.
There is the same mistake in the exemple prototype-ui/test/functional/window/test_url_window.html

It works fine on FF2 but it doesn’t work with IE6.
I have the following error message : ‘UI.defaultWM.options’ a la valeur Null ou n’est pas un objet

After commented the line:
UI.defaultWM.options.blurredWindowsDontReceiveEvents = true;
I have the following error message : ‘this.windowManager’ a la valeur Null ou n’est pas un objet

What can I do to solve this ?

Thanks for your future answers

Joe

 
Avatar StarPeak 22 post(s)

Use the latest version from jithub :)

The document.whenReady is used there and the tests works in ie too

 
Avatar joe_tall 3 post(s)

Thanks !

I will try with with github’s sources on monday

 
Avatar joe_tall 3 post(s)

In the last build from github, the directory dist seems to be gone.
Where could I find the last version of window.js ?

I try with the old version of window.js and the mistake is still present in IE.

 
Avatar Palmitoo 2 post(s)

Hi,

Since i updated window.js and prototype.js files with the last trunk versions i have no more – ‘this.windowManager’ is Null or not an object – error message with IE7 but i have new problems :

- when i move a wired window, its content is no longer redrawn (+ an error in IE7 : “Cet objet ne gère pas cette propriété ou cette méthode”),
- when i maximize a window, its height is not maximized, only its width
- when i unmaximize a window, it remains maximized but its emplacement change

Any idea ?

P.S. I’m using only URLWindow because i need to send php files with mysql requests in my windows

 
Avatar StarPeak 22 post(s)

@joe_tall: you have to call ‘rake’ on a shell to create content of dist directory
@Palmitoo: The wireframe bug should be fixed on the starpeak or charettes fork of prototype ui. Also Charettes is investigating IE bugs at the moment, so perhaps the other IE bugs should get workarounds now or in future.

Forums Window