My node webkit app starts in "kiosk" mode. Now i also want to be able to open an app element (eg a video) in fullscreen mode by using:
element.webkitRequestFullScreen();
it obviously doesn't seem to work cause the "kiosk" mode itself seems to be a fullscreen mode.
any ideas?
You just need to make kiosk : true in package.json file like
{
"name": "app",
"window": {
"kiosk" : true
}
}
This is what i already did. Thought there is an easier way to achive that ;(
Related
I had build an electron app with the tutorial from here.
The problem is now, that the "minimize to tray" function and the 'autostart' function doesnt work anymore. When starting my app via npm start it works but not with the .exe
The code of the tray function is from this answer: Electron.js How to minimize/close window to system tray and restore window back from tray?
The code of the autostart function is from here: How to use auto-launch to start app on system startup?
Does anybody know why those functions doesnt work anymore after building a .exe? (Start as admin doesnt help)
The reason that this doesn't work for was that the path of the icon of the tray menu was defined as ./icon.png but after building the application, the file isn't at the same place anymore. All the app files are moved to ./resources/app/.
So this was the fix for me:
let trayIcon = null
if(!app.isPackaged) {
trayIcon = './icon.png'; // when in dev mode
} else {
trayIcon = './resources/app/icon.png';
}
NopCommerce version: 3.9
I've designed a web store using NopCommerce 3.9. Any code I added is in a plugin.
The store uses a front page that can be found in the plugin. It relies on a route called 'home' in a RouteProvider class in the plugin. It does not complain about that route, instead it complains about a route named 'RegisterVendor' found in the same file. Here are both routes
routes.MapRoute("home",
"",
new { controller = "AoiVendorsHome", action = "Index" },
new[] { "Nop.Plugin.Other.AoiVendors.Controllers" });
routes.MapRoute("RegisterVendor",
"register/designer",
new { controller = "AoiExchange", action = "RegisterVendor" },
new[] { "Nop.Plugin.Other.AoiVendors.Controllers" });
The plugin installs properly and everything works exactly as expected on my local machine.
The problem is after deploying to the web it can't find the route. Here is a imgur link, follow it to see the error
Restarting the server fixes the error for a while, but it does eventually come back. It also comes back any time I redeploy without restarting the server afterwards.
Does anyone have any ideas?
Thank You.
The "HomePage" route of nopCommerce is registred this way
//home page
routes.MapLocalizedRoute("HomePage",
"",
new { controller = "Home", action = "Index" },
new[] { "Nop.Web.Controllers" });
Check your load order: If your registration does not hit first, remove nopCommerce "HomePage" route and add yours or add yours first using the Priority property of IRouteProvider.
MVC uses the route that first matches the request.
Regarding the deployment problem, make sure your plugin is deployed to ~/Plugins/{yourPluginFolder} and not the bin folder of Nop.Web. Plugin in ~/bin folder can be loaded but without guarantee.
I was able to fix the issue by selecting the 'Remove additional files at destination' checkbox under file publish options on the settings tab in the publish popup dialog in visual studio. I imagine an older file was not being overwritten and was causing problems.
I'm developing a Node.js app on Electron so it can be distributed and run by people who won't be using the command line. The app doesn't need an interface, it just needs to be executed. Is there a way to hide the electron window, so the app can just sit in the tray and can be opened/quit?
There a show option in the BrowserWindow options. By default it's true, but by turning it off (show: false) you will hide the window, so the app runs, but there's no visible Window.
From Docs:
show Boolean (optional) - Whether window should be shown when created. Default is true.
Besides the show option the BrowserWindow object has methods for hide/show/focus.
If you want to prevent the users from closing the application when the window is closed you can always intercept the window 'close' event like this:
this.mainWindow.on('close', (event) => {
event.preventDefault()
this.mainWindow.hide()
})
Why do you need to create a BrowserWindow at all? The Tray API runs from the Main process. I just created a small proof of concept app and it seems to work just fine running with no BrowserWindow. You'd just need to make sure to quit the app when the user chooses that option in the tray.
I wrote a webgl program which works well with a local server, and now, I would like to run it locally.
But I had errors and after some researches, I found that it's a cross domain issue in loading textures.
function loadTexture( path ) {
var texture = new THREE.Texture( texture_placeholder );
var material = new THREE.MeshBasicMaterial( { map: texture, overdraw: true} );
var image = new Image();
image.onload = function () {
texture.needsUpdate = true;
material.map.image = this;
render();
};
texture.deallocate();
renderer3D.deallocateTexture( texture );
return material;
}
I tried several solutions :
github.com/mrdoob/three.js/issues/1305
github.com/mrdoob/three.js/issues/944
gist.github.com/ekeneijeoma/1186920
github.com/mrdoob/three.js/wiki/How-to-run-things-locally (the 1.Change security for local files in a browser (access page as file:///example))
I precise that I have no problem on Firefox, it works without changing anything.
The only solution which works on Chrome is to launch it with --allow-file-access-from-files.
And on IE, I don't know how to solve it, I enabled in the browser security options "Access data sources across domains" and "Navigate sub-frames across different domains" (http://msdn.microsoft.com/fr-fr/library/ee797612(v=cs.20).aspx) but nothing. I use IEWebGL and I have noticed that on http://iewebgl.com/, "IEWebGL v1.0 Released" section, it's written "- Secure (no local content loading, no cross-domain textures)". So maybe it can't be solved on IE due to IEWebGL !?
So what would be the solution for IE, if there is one? And is there a way to solve the problem by changing the code, without lauching a local server or Chrome with special option?
Thanks!
this question has been asked and answered at least 6 other times and is even answered in the three.js wiki.
The short of it is you need to run a local server. Open a terminal/shell/command prompt and type
cd <path/to/files>
python -m SimpleHTTPServer
Then in your browser go to
http://localhost:8000
Why is that not an option? It's simple and it solves the problem. It also doesn't leave your browser open to getting owned.
Here's several simple servers you could use
thanks for your answer.
Indeed, it has already been asked and solved, I saw the solutions and it works well with a local server, and I totally agree with about security.
I was asking that because, firstly, it works without any server on Firefox and Safari, and on Google with --allow..., so if it was possible on IE, it would have been good. And secondly, because I wanted a very simple program which works quickly without having to install python or something else for a server,...
In fact, it's for an offline application (I know it's weird for a web based application but it's not my choice :) ). Anyway, it works for Firefox, Chrome and Safari so, too bad for IE.
Thanks!
I am unable to check the flow of execution of my j2me application using breakpoint.
I am using Netbeans IDE.Googling it I came to know that after setting a breakpoint,I need to run the app and then when the AMS reaches the breakpoint,if I go on pressing F6,i'll get to know the flow of execution .But it doesnt seem to work for me.
If the IDE is not doing what you want, maybe try to add this code right before your breakpoint:
try
{
throw new RuntimeException();
}
catch(RuntimeException rex)
{
rex.printStackTrace();
}