Anyway to "force close" a layer?

For scripts to aid with computation or simulation in cellular automata.
Post Reply
User avatar
Saka
Posts: 3413
Joined: June 19th, 2015, 8:50 pm
Location: In the kingdom of Sultan Hamengkubuwono X
Contact:

Anyway to "force close" a layer?

Post by Saka » November 26th, 2016, 5:50 am

Is there any way to "force delete" a layer without asking the user to save? Would be very helpful if there were.

Code: Select all

o3b2ob2obo3b2o2b2o$bo3b2obob3o3bo2bo$2bo2b3o5b3ob4o$3o3bo2bo2b3o3b3o$
4bo4bobo4bo$2o2b2o2b4obo2bo3bo$2ob4o3bo2bo2bo2bo$b2o3bobob2o$3bobobo5b
obobobo$3bobobob2o3bo2bobo!
(Check gen 3)
Add your computer to the Table of Lifeenthusiast Computers!

User avatar
GUYTU6J
Posts: 1069
Joined: August 5th, 2016, 10:27 am
Location: 中国

Re: Anyway to "force close" a layer?

Post by GUYTU6J » November 26th, 2016, 6:40 am

How about settings under File-Preferences-Layer?
Lifewiki: User:GUYTU6J
---
Someone please find a use for this:

Code: Select all

x = 9, y = 7, rule = B3/S23
6bo$6bobo$5bo2bo$b2o3b2o$o2bo$bobo$2bo!
#C [[ COLOR BACKGROUND 255 200 82 COLOR ALIVE 81 143 51 ]]

User avatar
Saka
Posts: 3413
Joined: June 19th, 2015, 8:50 pm
Location: In the kingdom of Sultan Hamengkubuwono X
Contact:

Re: Anyway to "force close" a layer?

Post by Saka » November 26th, 2016, 7:46 am

GUYTU6J wrote:How about settings under File-Preferences-Layer?
ah thanks. I'm on mobile so question:
Can I edit options with scripts? I'm using python.

Code: Select all

o3b2ob2obo3b2o2b2o$bo3b2obob3o3bo2bo$2bo2b3o5b3ob4o$3o3bo2bo2b3o3b3o$
4bo4bobo4bo$2o2b2o2b4obo2bo3bo$2ob4o3bo2bo2bo2bo$b2o3bobob2o$3bobobo5b
obobobo$3bobobob2o3bo2bobo!
(Check gen 3)
Add your computer to the Table of Lifeenthusiast Computers!

User avatar
dvgrn
Moderator
Posts: 6725
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI
Contact:

Re: Anyway to "force close" a layer?

Post by dvgrn » November 26th, 2016, 10:06 pm

Saka wrote:
GUYTU6J wrote:How about settings under File-Preferences-Layer?
ah thanks. I'm on mobile so question:
Can I edit options with scripts? I'm using python.
Not that particular option. g.setoption() generally lets you get at options that can be accessed directly from the menus, but Preferences are supposed to be decisions to be made by the user, and therefore beyond the reach of scripts.

In this case, I always uncheck all the check boxes under File > Preferences > Layer, so I never see the problem you're describing. (Instead, if I run scripts that indiscriminately remove layers, or if I click to close them manually, Golly silently throws away my work -- but it seems better to be careful to save my work when I want to save it, than to be annoyed by those incessant popups all the time.)

User avatar
Saka
Posts: 3413
Joined: June 19th, 2015, 8:50 pm
Location: In the kingdom of Sultan Hamengkubuwono X
Contact:

Re: Anyway to "force close" a layer?

Post by Saka » November 26th, 2016, 10:12 pm

So no. I will just add that to the golly suggestions and add that to the instructions for the script.



EDIT: Turns out I did post the suggestion :lol:

Code: Select all

o3b2ob2obo3b2o2b2o$bo3b2obob3o3bo2bo$2bo2b3o5b3ob4o$3o3bo2bo2b3o3b3o$
4bo4bobo4bo$2o2b2o2b4obo2bo3bo$2ob4o3bo2bo2bo2bo$b2o3bobob2o$3bobobo5b
obobobo$3bobobob2o3bo2bobo!
(Check gen 3)
Add your computer to the Table of Lifeenthusiast Computers!

Post Reply