taweili / ardublock

ArduBlock is a Block Programming Language for Arduino.
GNU General Public License v3.0
413 stars 292 forks source link

ArduBlock window will close without asking if you want to save your work. #151

Open TonyCallear opened 8 years ago

TonyCallear commented 8 years ago

Click the big 'X' to close ArduBlock and it just does it - no warning about losing unsaved work.

I've had a look on how to do this but there are many ptions and I just don't know enough Java to pick the correct one.

Hope someone can fix this?

heqichen commented 8 years ago

×

​ This feature already in ardublock if you did some change on canvas, ardublock will remind you if you click the X button.

On Wed, Mar 30, 2016 at 6:34 AM, TonyCallear notifications@github.com wrote:

Click the big 'X' to close ArduBlock and it just does it - no warning about losing unsaved work.

I've had a look on how to do this but there are many ptions and I just don't know enough Java to pick the correct one.

Hope someone can fix this?

— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/taweili/ardublock/issues/151

TonyCallear commented 8 years ago

Hi, I am not good at this - but I tried. I got something which works when ardublock-all.jar is run by itself but it does not work when run from the Arduino IDE.

I have just noticed that... runing Ardublock from the menu in the Arduino IDE and clicking the 'X' -Close button in Ardublock does not close Ardublock - it just hides the window. If do some work in Ardublock, 'close' it and then click "tools - Ardublock" again in the Arduino IDE - all your work is still there.

As a silly example... In Main.java set openblocksFrame.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE ); and ardublock-all.jar does not close when run on it's own. Run from the Arduino software and there is no change - it still 'closes'.

TonyCallear commented 7 years ago

Please see pull request #166

TonyCallear commented 6 years ago

Perhaps see issue raised on the Arduino github

https://github.com/arduino/Arduino/issues/6869

TonyCallear commented 6 years ago

If I understand #6869 correctly, there is no mechanism to interrupt the Arduino IDE closing from a tool like ArduBlock - and so ArduBlock silently dies and loses any unsaved work.

And no prospect of the Arduino IDE team coding that just for one little tool like ArduBlock either.

AFAICT other ways to lose work without warning are now taken care of??