[Tool]FemtoIDE

release
tool
open-source

#61

Right now, it probably would be possible without too much hassle.
There are some things I’d like to do in the future that electron doesn’t do very well. For example, NWjs has a better serialport API and I’d like to use it for logging on hardware over USB.


#62

been trying to fix the window state do you know what is setting the window to always start so small?


#63

Have a look here:

It sets the initial window size for the splash, but not for the index.html editor windows.


#64

yea thats why im confused, im trying to set the index.html to the last state (wen program closes) so it can remeber the monitor, position and window size.


#65

So you added width and height to both places (lines 3 and 14) and it still opens up small?


#66

:tired_face: idk anymore i need to save it to a file wen app close event triggers or something and pull that in wen the app starts, it a total hack


#67

It might be simpler to keep it in localStorage instead of a file. I can look into it tonight, if you don’t manage.


#68

Im sorry to put this on you, Was trying to help you a little to polish up the UX/UI :persevere:


#69

It’s alright, thanks for pointing it out. I probably wouldn’t have noticed that the size is annoying since I use a keyboard shortcut to maximize the window and it’s already in muscle memory. :stuck_out_tongue:


#70

I could, but then I’d have to mess around with JavaScript and I’d really rather not if I can avoid it.

Anyway, my point was just that there are other options available.

For the record, it’s + on Windows.


#71

@FManga
hit a odd error wen trying to #include <vector>

c:\PathToIDE\windows\arm\arm-none-eabi\include\c++\8.2.1\bits\stl_algobase.h:243:56: error: macro "min" passed 3 arguments, but takes just 2
c:\PathToIDE\ide\windows\arm\arm-none-eabi\include\c++\8.2.1\bits\stl_algobase.h:265:56: error: macro "max" passed 3 arguments, but takes just 2
c:\PathToIDE\windows\arm\arm-none-eabi\include\c++\8.2.1\bits\stl_algobase.h:195:5: error: expected unqualified-id before 'const'

#72

@jeana somewhere in pokittolib there is macros for min max messing up with std::min and std::max
i always fix it like this

#ifdef max
    #undef max
#endif

#ifdef min
    #undef min
#endif

#include <vector>

#73

Can’t you just include vector first, then include the pokittolib?


#74

sure, you can.


#75

Ah, I know this one. It’s been bugging me for quite some time.

The ‘proper’ way to solve it is to add this before you #include <Pokitto.h>:

#if !defined(DISABLEAVRMIN)
#define DISABLEAVRMIN
#endif

(Or perhaps add DISABLEAVRMIN to your compiler’s defines, wherever the settings for that may be.)

It’s because the Pokitto does a few things to try to simulate an Arduino environment,
and one of those things is to define min and max as macros.

Needless to say that’s a horrible idea because it poisons the global scope,
which stops std::min and std::max from working properly.
std::min and std::max are vastly superior implementations anyway.


#76

Thanks, Why is this the default behavior?
The library seems to be kind of a mess


#77

That’s pretty much what I said when I found out. :P

I honestly have no idea, I’ve only made a few small contributions to the library.

It is a little bit. We’ve been discussing ways to fix it for a while but it tends to fall to the wayside because of other projects.

There’s a discussion about it here:

And it’s been brought up a few times in a few other threads.

If you want I could show you the prototype I mentioned earlier,
but it’s pretty bare bones and isn’t actually usable.
I’m reasonable experienced with API design, but I struggle with hardware details.
I still can’t wrap my head around how to manipulate the screen (using the low-level screen stuff, not using Display).


#78

Put this in your main.js:

function boot(){
    try{
        let width = (localStorage.getItem("width")|0) || 800;
        let height = (localStorage.getItem("height")|0) || 600;
        
        nw.Window.open('www/index.html', {width, height}, win=>{
            win.on("close", _=>{
                width = win.width;
                height = win.height;
                localStorage.setItem("width", width);
                localStorage.setItem("height", height);
                win.close(true);
            });
        });
    }catch(ex){
        console.log(ex);
    }
}

nw.App.on('open', (...args)=>{
    boot();
});

nw.Window.open("www/splash.jpg", {
    width:690,
    height:350,
    position:"center",
    frame:false
}, splash =>{

    setTimeout(_=>{
        boot();
        splash.close(true);
    }, 1000);

});

#79

OMG your the best!


#80

Released v0.0.15b Compo Edition

Changelog:

  • Code editor theme customized by @bl_ackrain
  • New splash. No yoga pose, this time :frowning:
  • New Edit menu
  • Menus sorted alphabetically
  • Display currently open file name in titlebar
  • Sourcecode history navigation with Ctrl+, and Ctrl+.
  • Faster image conversion in C++ projects
  • Python code and XML highlighting
  • Implemented support for more keys as shortcuts
  • Support for per-project scripting in JS.

Edit: Updated the zips, the release script had undone some of the changes in the update as part of the clean-up it does before packaging. >_<