Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.
View this topic in a long page with up to 500 replies per page Create new topic
1 | ... | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101

gzt

gzt
19652 posts

Uber Geek
+1 received by user: 8759

Lifetime subscriber

  #3510536 12-Jul-2026 12:45
Send private message quote this post

Behodar:

"There are two hard problems in computer science: cache invalidation and naming things."

I'm trying to come up with a name for a class of button (or maybe there's already a common-ish name that I'm not aware of). Some buttons, such as the traditional OK and Cancel, will close the window when clicked. Others, such as Apply, will not. Can anyone think of what I should call a non-closing-window button?


I think you've solved it - Apply class

MadEngineer
4720 posts

Uber Geek
+1 received by user: 2731

Trusted

  #3510656 12-Jul-2026 13:28
Send private message quote this post

Commit





You're not on Atlantis anymore, Duncan Idaho.

Behodar
11413 posts

Uber Geek
+1 received by user: 6507

Trusted
Lifetime subscriber

  #3510658 12-Jul-2026 13:41
Send private message quote this post

gzt: 
I think you've solved it - Apply class

 

It's not necessarily going to apply something though, e.g. "Find Next" will keep the window open but won't actually save anything. Same with Commit.

 

I might have to follow in Acorn's footsteps from the early 90s: they went with calling it a "local button" because it does something local to that window. I don't think it's a fantastic name but since there doesn't seem to be anything better...


pdh

pdh
590 posts

Ultimate Geek
+1 received by user: 429


  #3510729 12-Jul-2026 16:47
Send private message quote this post

Well - does it really just do something local to the window - or does it do something to the wider world and is merely located in this window for convenience...


Behodar
11413 posts

Uber Geek
+1 received by user: 6507

Trusted
Lifetime subscriber

  #3510730 12-Jul-2026 16:55
Send private message quote this post

Plan B: I flipped it and just went with "ClosesWindow", defaulting to true.


SomeoneSomewhere
1933 posts

Uber Geek
+1 received by user: 1125

Lifetime subscriber

  #3510836 12-Jul-2026 19:16
Send private message quote this post

Behodar:

 

"There are two hard problems in computer science: cache invalidation, naming things, and off-by-one errors." 

 

 

Slightly tweaked...


TwoSeven
1740 posts

Uber Geek
+1 received by user: 316

Subscriber

  #3511126 13-Jul-2026 20:49
Send private message quote this post

Behodar:

 

"There are two hard problems in computer science: cache invalidation and naming things."

 

I'm trying to come up with a name for a class of button (or maybe there's already a common-ish name that I'm not aware of). Some buttons, such as the traditional OK and Cancel, will close the window when clicked. Others, such as Apply, will not. Can anyone think of what I should call a non-closing-window button?

 

 

As I read this question, I would ask, what is ones technology stack?

 

In an operating system, all interactions generate an event which can be observable. For example, in windows, a WM_Event is generated. A button is a type of window object called a control for which events can be attached and processed by one or more handlers.

 

In the web its a little different, interactions are often user-generated and are generally handled client side. Client side events typically perform actions on the DOM, or send notifications to the window object that contains the DOM. 

 

In the OS, not defining a handler or putting code in the handler or setting the event handled flag will cause a button to do nothing.

 

in the web, not defining an action (and setting the action to handled) will also cause it to do nothing.

 

 

 

 





Software Engineer
   (the practice of real science, engineering and management)
A.I.  (Automation rebranded)
Gender Neutral
   (a person who believes in equality and who does not believe in/use stereotypes. Examples such as gender, binary, nonbinary, male/female etc.)

 

 ...they/their/them...


freitasm
BDFL - Memuneh
81351 posts

Uber Geek
+1 received by user: 42715

Administrator
ID Verified
Trusted
Geekzone
Lifetime subscriber

  #3511127 13-Jul-2026 20:55
Send private message quote this post

SomeoneSomewhere:

 

Behodar:

 

"There are two hard problems in computer science: cache invalidation, naming things, and off-by-one errors." 

 

 

Slightly tweaked...

 

 

I see what you've done there. 





Referral links: Quic Broadband (free setup code: R587125ERQ6VE) | Samsung | AliExpress | Wise | Sharesies 

 

Support Geekzone by subscribing (browse ads-free), or making a one-off or recurring donation through PressPatron.

 

 

LEGAL video, movies and TV download and streaming options in New Zealand


Behodar
11413 posts

Uber Geek
+1 received by user: 6507

Trusted
Lifetime subscriber

  #3511451 15-Jul-2026 12:53
Send private message quote this post

TwoSeven:

 

As I read this question, I would ask, what is ones technology stack?

 

In an operating system, all interactions generate an event which can be observable. For example, in windows, a WM_Event is generated. A button is a type of window object called a control for which events can be attached and processed by one or more handlers.

 

In the web its a little different, interactions are often user-generated and are generally handled client side. Client side events typically perform actions on the DOM, or send notifications to the window object that contains the DOM. 

 

In the OS, not defining a handler or putting code in the handler or setting the event handled flag will cause a button to do nothing.

 

in the web, not defining an action (and setting the action to handled) will also cause it to do nothing.

 

 

Sorry, I saw this the other morning before work and then forgot about it until now.

 

It's a desktop interface, not a website. My question was around categorising the buttons into "closing" and "non-closing" with a simple name, rather than focusing on the technical implementation. I'm happy with what I ultimately came up with ("ClosesWindow").


TwoSeven
1740 posts

Uber Geek
+1 received by user: 316

Subscriber

  #3511763 15-Jul-2026 21:33
Send private message quote this post

if one creates ones own taxonomy for a set of behaviours and is happy with it, thats good enough. We call those [application] designs guides.

 

However, in desktop operating systems there are not really anything called buttons as one is actually dealing with input device events.

 

As an example, Win32 it is possible to assign properties to buttons, for example IDOK and IDCancel. When a WM_Command event is received, its properties can be checked for say IDCancel, and a close window event generated. A button marked as default will fire its event on the enter key being pressed - by convention this is usually the ok/save button.

 

 





Software Engineer
   (the practice of real science, engineering and management)
A.I.  (Automation rebranded)
Gender Neutral
   (a person who believes in equality and who does not believe in/use stereotypes. Examples such as gender, binary, nonbinary, male/female etc.)

 

 ...they/their/them...


floydbloke
3703 posts

Uber Geek
+1 received by user: 4688

ID Verified

  #3514887 28-Jul-2026 09:43
Send private message quote this post

Why do Wellington trains have to slow down when there is ice on the overhead wires?

 

How do railways in countries where frosts are common all throughout winter cope with this?





The Institute of Unfinished Research has concluded that 6 out of 10 people


richms
29592 posts

Uber Geek
+1 received by user: 10631

Trusted
Lifetime subscriber

  #3514898 28-Jul-2026 10:10
Send private message quote this post

The ice makes it arc and cause sparks and that wears the line out faster. I don't know what slowing down does to help with that tho.





Richard rich.ms

pdh

pdh
590 posts

Ultimate Geek
+1 received by user: 429


  #3514916 28-Jul-2026 13:10
Send private message quote this post

I believe that in places that get regular ice, there are scrapers built into the arms - even de-icing fluids.

 

NZ's mostly in that 'we can pretend that winter doesn't happen' moderate climate space - no snow tyres, no studs, we only recently started thinking that insulation or whole-house-heating could be a thing... 

 

/ex-Canadian winter rant ;-)


MadEngineer
4720 posts

Uber Geek
+1 received by user: 2731

Trusted

  #3514961 28-Jul-2026 18:12
Send private message quote this post

floydbloke:

 

Why do Wellington trains have to slow down when there is ice on the overhead wires?

 

How do railways in countries where frosts are common all throughout winter cope with this?

 

How often does it happen vs the cost of systems to prevent that.





You're not on Atlantis anymore, Duncan Idaho.

johno1234
3740 posts

Uber Geek
+1 received by user: 3205


  #3514967 28-Jul-2026 19:05
Send private message quote this post

floydbloke:

 

Why do Wellington trains have to slow down when there is ice on the overhead wires?

 

How do railways in countries where frosts are common all throughout winter cope with this?

 

 

We have wet cold which ices up. Most continental locations have dry cold. You see this especially at the North Island ski areas where the cables and chairs on the lifts ice up. The Swiss manufacturers had never seen anything like it and it caused some early ski lifts to fail and collapse. 


1 | ... | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101
View this topic in a long page with up to 500 replies per page Create new topic



Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.



Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.