Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Window.object is null after using windowManager.createNew() #24

Closed
Bossehasse opened this issue Dec 16, 2016 · 3 comments
Closed

Window.object is null after using windowManager.createNew() #24

Bossehasse opened this issue Dec 16, 2016 · 3 comments

Comments

@Bossehasse
Copy link

So this is my code:

trayWindow = windowManager.createNew('tray', 'Tray', `${config.url}/tray.html`, null, {
    width: 1000,
    height: 600,
    frame: false,
    resizable: false,
    moveable: false,
    show: false,
    position: 'topLeft'
}, true)

console.log('trayWindow.object:', trayWindow.object) // trayWindow.object: null

Is this how it should be? If I do this:

trayWindow.create()
console.log('trayWindow.object:', trayWindow.object) // trayWindow.object: BrowserWindow

everything is fine. Just curious if all is as it should be. Seems odd to me that object doesn't get set during createNew().

@tamkeen-tms
Copy link
Owner

I see, the problem is within Window.create; it doesn't return the object that createNew should return. Will fix it, thanks.

@tamkeen-tms
Copy link
Owner

Fixed

@Bossehasse
Copy link
Author

Just updated and the problem still persists. Looking into it, createWindow() returns a new Window instance, but during the initialization create() is never called. And so object is never set.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants