Questions tagged [event-driven]

The event-driven paradigm of programming centralizes all waiting for events to one generalized loop that delivers (dispatches) events to registered listeners (event handlers).

The event-driven paradigm of programming centralizes all waiting for events to one generalized loop that delivers (dispatches) events to registered listeners (event handlers). When triggered, the event handlers change the state of the program, sometimes even by de-registering event handlers.

324 questions
-1
votes
1 answer

How can I await until I receive a callback/notification without busy-waiting?

I understand how I can await on library code to wait for a network request or other long-running action to complete, but how can I await on my own long-running action without busy waiting? This is the busy-waiting solution. How can I make it…
idbrii
  • 9,440
  • 5
  • 50
  • 93
-1
votes
1 answer

Text box is null and having the program detecting that

Hi i am new to event driven programming and would love if i could have some help. I have been set some work and i am getting through it ok but there is one downside, in my code below: i have a text box that if text is entered then it would add…
-1
votes
1 answer

event-drive TLS server

I'm working on a server-side software that receives requests from clients via TLS (over TCP). For better performance and user experience, I'd like to avoid a full handshake for every request. Ideally, the client can just establish a TLS session with…
qweruiop
  • 2,678
  • 5
  • 24
  • 48
-1
votes
1 answer

Event Handling for Networking in C++

I've currently coded a server/client implementation in C++, where two clients connect to a server. I'm expecting from previous experience (I'm new to C++) that each client (and the server) will have an event handler, and events will come in when…
Simba K
  • 9
  • 1
-1
votes
1 answer

Java swing wait for button click

How do i add wait for jButton1 to be click to continue? I have this code: while (gameStatus == Status.CONTINUE){ ////here add wait for jButton1 click sumOfDice = rollDice(); // roll dice again } i have done this but its not working: …
john
  • 65
  • 3
-1
votes
2 answers

Event driven board game and GUI: How to connect?

So I've been making board game Funny Bunny (children's game) on Java. I first made it text based but now I've been building a GUI for it using Swing. The trouble is, I've never made a GUI before and tough the GUI itself has been fairly easy to make,…
Rikkokiri
  • 85
  • 8
-2
votes
2 answers

c# Delete items from corresponding ListBoxes

So I have three listboxes, and the goal is once a user clicks on an item in one listbox and hits the delete button on the form it deletes that item, and then the items in the other 2 listboxes at the same level. So deleting the fifth element of…
-4
votes
1 answer

If user picks a string on a ComboBox how do you get it to display?

I am trying to get the user's input for picking a colour. I have used a ComboBox. How do get the program to see what selection the user has made in order to display it in a MessageBox? I was thinking of using an if statement. string red; string…
-5
votes
1 answer

Looping letter input

I'm making a hangman game for school and I've run into a problem that I simply can't solve, maybe I'm overthinking, maybe I'm not. Anyways, I need to let the user input a letter, and if that letter is in the word used for the game (pikachu. I know,…
User9123
  • 1
  • 1
1 2 3
21
22