new frameless window (main window should have a frame)

4 views
Skip to first unread message

jamesp...@gmail.com

unread,
Oct 13, 2013, 11:38:12 PM10/13/13
to node-...@googlegroups.com
HI I want that the main window must have a frame and a new window opened is a framelesss window...(LIke the about window should be frameless.)

Is this possible in node webkit and if it is how? I couldnt find anything in the wiki or by googleling...

In the wiki there is only info about making the main window AND subsequent windows frameless or have a frame.

Regards
James

Anatoly Pashin

unread,
Oct 14, 2013, 1:55:37 AM10/14/13
to node-...@googlegroups.com
https://github.com/rogerwang/node-webkit/wiki/Window#openurl-options

Open a new window and load url in it, you can specify extra options with the window. All window subfields in Manifest format can be used


2013/10/14 <jamesp...@gmail.com>

--
You received this message because you are subscribed to the Google Groups "node-webkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-webkit...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
Пашин Анатолий,
эникейщик.

jamesp...@gmail.com

unread,
Oct 14, 2013, 5:18:19 AM10/14/13
to node-...@googlegroups.com
Hi thanks for the quick reply... 

Using the below code I can get the new window to open without a border and toolbar but the old (main) window page is removed and replaced by the node.js error: - 

myWindow= gui.Window.open('about.html', {
  "position": "center",
  "width": 500,
  "height": 450,
  "frame": false,
  "toolbar": false
});

Error on main window

Uncaught node.js Error

 

Error: Unable to get render view in GetWindowObject
    at Window.window (window_bindings.js:94:10)
    at Window.init.Window.focus (window_bindings.js:204:9)
    at MenuItem.sub3.append.gui.MenuItem.click (file:///D:/shared/oct12/win-updated/app.js:113:11)
    at MenuItem.handleEvent (menuitem.js:167:12)
    at IDWeakMap.global.__nwObjectsRegistry.handleEvent (node.js:789:26)



Regards
James

jamesp...@gmail.com

unread,
Oct 14, 2013, 5:21:21 AM10/14/13
to node-...@googlegroups.com, jamesp...@gmail.com
I got rid of the error by removing the following line:
myWindow.focus();

Thanks for the help.

Why cant the new window use .focus() ? (plz explain what I did wrong here?)

Regards
James

Anatoly Pashin

unread,
Oct 14, 2013, 9:38:14 PM10/14/13
to node-...@googlegroups.com
First I confirmed your bug, it's not working. Tested 0.7.3 and 0.7.5
Window opening with gui.Window.open breaks opened window — you can't even close it.

But IT'S NORMAL, because I tried to open about.html from your code (there is no such file and nw opens clear page for error, which is broken internally)

myWindow= gui.Window.open('http://google.com', {
  "position": "center",
  "width": 500,
  "height": 450,
  "frame": false,
  "toolbar": false
});

Working perfectly for me.



2013/10/14 <jamesp...@gmail.com>



--
Пашин Анатолий,
эникейщик.
Reply all
Reply to author
Forward
0 new messages