nimos100's Recent Forum Activity

  • Problem Description

    This might be a bit difficult to explain, because it makes little sense. But it appears that when you use NWjs to open an image and load it into a sprite using "load image from url", but at the same time copy the file to a new destination and tell it to use that one instead. And then load a new image it still uses the old image despite it doesn't exist anymore. Guess it might read it from memory maybe?

    Added from old post

    [quote:1g8zpd8h]'Load image from URL' is asynchronous: the action only starts it working, and it completes later when 'On image URL loaded' triggers. During the loading you synchronously copy and overwrite the file that is currently being loaded. This effectively makes it random which image you load, depending on which the system manages to do first: read the file, or copy the file over it. Further reading and writing to C:\ normally requires admin permissions on most systems, which C2 games don't run with by default.

    If you still think there is a problem, please file a new bug report that has a clearly ordered sequence of operations, and doesn't attempt to read or write files to/from system locations that normally require admin permissions to access.

    UPDATE:

    I have moved the files to my users folder and the files are copied only in this directory. And the problem is the same. I think you might have misunderstood the problem as its a bit weird to explain. But you write that it "depends on which the system manages to do first".

    But its not relevant in this case, because the two things are not happening at the same time.

    Meaning, between the copy and actually using the URL from where it was copied to, I can wait 5-10 seconds or whatever before I even tell it to use that path, and it will still load the old image even though that image have been deleted from the hard disk. Also the files are 1.85kb in size, so it should be more or less instant regardless.

    The problem happened when you do it exactly the way I descripted in the old post, but ill try to explain it again.

    Attach a Capx

    https://dl.dropboxusercontent.com/u/109921357/Load%20image%20from%20file%20bug.capx

    Description of Capx

    Allows you to select a jpg file and load it into a sprite. At the same time copying the file to "C:\Users\<Name>\Test\Test.jpg" Right clicking the image will load the image from C:\Users\<Name>\Test\Test.jpg.

    Steps to Reproduce Bug

    1. Double click one of the images and select a jpg file. The two images now uses the image selected through the chosenpath. At the same time a copy of the file is copied to "C:\Users\<Name>\Test\Test.jpg".

    2. Right click one of the images to use the URL "C:\Users\<Name>\Test\Test.jpg".

    3. Double click one of the images and select another jpg files than in step 1. The images now changes to this file as expected.

    4. Right click one of the images again to use the URL "C:\Users\<Name>\Test\Test.jpg" However instead of using the image from step 3, it uses the image from step 1, even though it is not at that URL anymore, and the image from step 3 is in that location it doesn't load it.

    Expected Result

    That it would read the file from the path its told and not from maybe memory.

    Affected Browsers

    Don't know.

    Operating System and Service Pack

    Windows 7

    Construct 2 Version ID

    r200

  • Problem Description

    Not sure If its related to my other bug report. - https://www.scirra.com/forum/r200-load-image-from-url-or-nwjs-bug_t128154

    This bug appears to be when using loops together with "Load image from Url"

    Shows the code and a correct sized image and color of the image load.

    Pressing "Test 1" button create a sprite and load the test image.

    The image size is correct, however the color is changed for some reason.

    Pressing "Test 5" button (Without restarting application, important as it gives different results)

    Will create 5 images and load them, however the resize to fit image is ignored and the colors are still screwed up.

    Restarting the app.

    Pressing "Test 5" button.

    Now a random object will resize correctly, while the other fails.

    Doing this once more,

    Now another object resize correctly.

    Pressing "Test 5" again without restarting.

    Now all the images fails. Same thing happens when pressing "Test 1"

    Attach a Capx

    https://dl.dropboxusercontent.com/u/109921357/Load%20from%20url%20bug/URL_bug.capx

    Description of Capx

    Create a sprite and load an image from disk

    Steps to Reproduce Bug

    See above.

    Observed Result

    Completely unreliable behaviour. Settings are ignored colors are changed.

    Colors bug might be due to the image being PNG. And the gray in the original image is wrongfully seen as opacity when loaded from URL.

    Expected Result

    That it worked as described.

    Affected Browsers

    Above testing was done in NWjs.

    Testing in Chrome and IE fails to load the image all together. And give different errors.

    Chrome: Pressing "Test 1"

    Chrome: Pressing "Test 5"

    Operating System and Service Pack

    Windows 7

    Construct 2 Version ID

    r200

  • Problem Description

    This contains 2 bugs with the NWjs Open folder dialog together with ChosenPath and ListAt.

    1. Problem:

    The open dialog doesn't return the path to a folder as stated in the manual.

    [quote:208blwpo]Show folder dialog

    Open a dialog allowing the user to pick a folder on their local system. If the user selects OK, On folder dialog OK triggers and the ChosenPath expression contains the selected folder.

    Doing a simple test, I made a folder which I select with the open folder dialog. Instead of giving the path to the folder as stated in the manual. It gives a path to all the files in the folder.

    2. Problem

    Since Open dialog doesn't return the folder, ListAt(index) doesn't work with chosen path.

    Replacing the chosenPath with a fixed path it works correctly.

    These problems ruins a huge part of the "Open folder dialog" and listAt, since they are not compatible.

    Please fix these problems its really beyond just annoying, that there are so many lacks, bugs and problems with the NWjs functionality in general.

    Even if the open dialog is working as intended please make it more solid, so NWjs is able to return what users actually need and not just some random stuff. (Drive, Folder, File and Complete path as separate options, that can then be used and combined as we need them.)

    Attach a Capx

    https://dl.dropboxusercontent.com/u/109921357/More%20nwjs%20bugs/Nwjs_bugs.capx

    Description of Capx

    Just open a folder to be used with the ListAt funtionality

    Steps to Reproduce Bug

    Use open folder dialog, ChosenPath and ListAt

    Observed Result

    Open dialog folder is unable to return the path to the folder.

    Expected Result

    Returns every single file and subfolder in the selected folder.

    Affected Browsers

    • Chrome: (YES)
    • FireFox: (YES)
    • Internet Explorer: (YES)

    Operating System and Service Pack

    Windows 7

    Construct 2 Version ID

    r200

  • nimos100 the best way would be the have those events happen is the place them before the close actions. as Egyptoon said once the app is closed it's closed and cant do anything just like any other app works.

    There are lots of apps, that for instant ask you if you want to save before closing, its not an uncommon feature. What Egyptoon suggested is a good idea, but would be nice if it would catch all terminating actions. Anyway it was just a suggestion of what would be nice to have, which is the purpose of this thread in the first place

  • nimos100

    whatever you decide the closing trigger that may be pressing ESC key or click/touch a graphic button etc. the action will be ----> (Browser : close), for the browser object.

    then you can add another action before (close)

    For example :-

    on touched object A ----- > play sound , do this, do that, browser : close.

    Ok I see what you mean, but that was not exactly what I was referring to. What I meant was if the user closes the application, imagine you are not in full screen and they close for instant the application by pressing the X in the top corner. So the trigger should be when the application is terminated. Im not even sure if that's possible or if it interferes with the browser or NWjs.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • nimos100 "On exit program " can be achieved using "on pressing the close button" or any condition triggers the closing action.

    Might have missed that one, where do you find that, I looked for it and couldn't find anything that triggers on "On pressing the close button" or a condition that triggers on closing action.

  • NWjs

    Expanding triggers - Would be very useful I think if the following triggers could be added to NWjs.

    On file being copied - Trigger when a file is currently being copied. Would be useful for making copy file progress bars.

    On file copied - Trigger when a file have completed being copied.

    On file deleted - Trigger after a file have been erased.

    On file moved - Trigger after a file have been moved.

    On file being moved - Same as "On file being copied" would be handy for progress bars.

    C2 General

    On exit program - Would trigger when your program is closing. Could be used for saving progress etc.

  • There is a "clear local storage" for the webstorage object, might be what you mean?

  • Yes if you mean use a "C:\image.jpg" etc that will work. However it is a bit bugged it seems, if you try to reload using "load from url" at the moment. but hopefully it will be fixed.

  • Problem Description

    This might be a bit difficult to explain, because it makes little sense. But it appears that when you use NWjs to open an image and load it into a sprite using "load image from url", but at the same time copy the file to a new destination and tell it to use that one instead. And then load a new image it still uses the old image despite it doesn't exist anymore. Guess it might read it from memory maybe?

    Attach a Capx

    https://dl.dropboxusercontent.com/u/109921357/Load%20image%20from%20file%20bug.capx

    Description of Capx

    Allows you to select a jpg file and load it into a sprite. At the same time copying the file to "C:\Test.jpg" Right clicking the image will load the image from C:\Test.jpg.

    Steps to Reproduce Bug

    Will explain it with screenshots, otherwise it hard to explain and probably makes little sense I think.

    The code of the whole program. The global variable was an attempt to see if it was possible to only load an image into a single sprite. Which seems to not work.

    Double clicking one of sprites will open the NWjs dialog and I selected a image which is pure red.

    The image is now copied to C:\Test.jpg.

    1. To use this path I right click one of the sprites.

    2. Double click one of the sprites and load the second image.

    The second image is just green.

    Looking at the image copied to C:\Test.jpg have been updated to use the green one instead.

    Right clicking the sprites again to load from C:\Test.jpg makes them load the red image, even though the jpg file is the green one.

    This only happens after you have used "Load image from url" (Right click the sprite).

    The bug pretty much ruins the "load image from url" or NWjs open dialog depending on where the bug is. Would also be nice if you could pick which sprite it should load the image for, and not just all of them ignoring the picking.

    Expected Result

    That it would read the file from the path its told and not from maybe memory.

    Affected Browsers

    Don't know.

    Operating System and Service Pack

    Windows 7

    Construct 2 Version ID

    r200

  • NWjs & Debugger

    Incompatible - While running your project in debug mode its not possible to open any NWjs dialog boxes. Might be considered a bug, but regardless, it would be nice if the debugger and NWjs were compatible.

  • NWjs & Video & File chooser

    Syntax consistency - Depending on what functionality you are using, there seem to be different syntax for how you work with files, which is really annoying to say the least. For instant using the NWjs.Userfolder will return the following: "\User\<Name>\"

    However setting the source for a video require the exact path "C:\Movie.webm". Which you can get using the open dialog in NWjs, but that require user interaction. Since there are no functionality that allow you to get just the drive letter, filename, or just the path to a location makes working with files a living hell to say the least, and this changes completely depending on what functionality you use.

    It is suggested in the C2 manual that you should use the User folder due to permissions, so it would make sense if all the file interactions also worked in a consisting manner, so you don't have to create a different workaround for each function depending on which one you use. Being able to get the drive letter of where a folder or file exist would be very useful. Basically just divided, into the separate parts that follows what you would expect when working with files on a computer. (Drive, folder, File).

nimos100's avatar

nimos100

Member since 23 Sep, 2012

None one is following nimos100 yet!

Trophy Case

  • 12-Year Club
  • Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • RTFM Read the fabulous manual
  • Email Verified

Progress

16/44
How to earn trophies