Questions tagged [event-handling]
Event handling is a coding style about handling messages between a source and one or more subscribers. A point listener in the source provide a way which subscribed code can consume messages raised from the source.
12,660
questions
0
votes
1
answer
33
views
How to invoke map event in other event handler?
Is there any way to invoke openLayers Map "click" or "pointermove" event in my own event handler?
I'm working on some measurement tool which should make measures on different maps ...
0
votes
2
answers
25
views
Event Sourcing and CQRS: Handle concurrency with multiple "read model consumers" instances
I'm implementing a solution based on Event Sourcing and CQRS patterns.
In my use case I have:
A WRITE microservice: Where events are appended to a particular Stream (let's call it X Stream) stored on ...
0
votes
2
answers
81
views
Google Contacts (People API) query not working in script called from trigger script
UPDATE
I've determined that this is an authentication problem. For some reason I can perform People API queries when I'm running the function from the editor, but from the trigger I get this message ...
0
votes
0
answers
7
views
How to process sound volume change as a trigger
I am trying to get my app to respond when I change the system volume and audio balance in the settings.
Is there a specific signal or trigger that I can wait for? And how can I implement it in python?
0
votes
1
answer
16
views
How do I get the event type for mouseDown in React on a canvas?
I'm trying to use the <canvas /> element in react but struggling to create the event type for it. I have seen this article. I can get it work by importing that interface and having my function ...
1
vote
0
answers
16
views
Error when using react-scratchcard-v2 on mobile: Unable to preventDefault inside passive event listener invocation
I am using react-scratchcard-v2 to create a scratchcard game. It works fine on desktop, but when using it with touch (either on mobile or in the mobile view of Dev Tools), it still works, but I get ...
0
votes
0
answers
18
views
How to properly create/implement event tracking processors in a multitenancy database using Axon Framework?
I am currently using Axon Framework 4.7 with Springboot 3, and trying to implement multi-tenancy ( one event store/schema per tenant), now events are properly stored in the right database schema, but ...
0
votes
1
answer
14
views
Testing EventEmitter event handlers
I want to test handing of an event (test if I have subscribed after a connection has been established):
import * as mqtt from 'mqtt';
export function testEmitter() {
console.info(`Connecting to ...
1
vote
1
answer
23
views
I want to call the change event within the click event in angular
My goal is to detect the cancel buton click while uploading a file. I am trying to achieve this by invoking the click event. Then after the event is triggered, it will detect the change event. If the ...
0
votes
1
answer
54
views
How do HTML event handler attributes work? [duplicate]
just got question about how does HTML works.
As far as I know, attribute of HTMLElement is only 'string | null'
but as we know, on HTML
<div onclick="sayHi()" />
works.
I'm wondering,...
0
votes
0
answers
27
views
Laravel queued event listener model query doesn't always run but gracefully errors
I'm working in a Laravel 10 project that's being used as an API for a Nuxt front-end. The project processes thousands of events, most of which are responsible for aggregated reporting purposes. I have ...
0
votes
0
answers
12
views
ChakraUI (react): How to disable all keyboard based navigation except for in inputs and textareas
This can be done with either a Chackra theme, or simply being done directly on the window using react useEffect
I am trying to disable all NAVIGATION based on keypresses, including TAB, SPACE, and ...
0
votes
1
answer
18
views
React Native TextInput - cannot get/access value in onSubmitEditing handler (especially iOS)
This must be a simple question that I have not been able to find the answer to:
The below code works in React-native for Web, as you would expect in React.js... but it does NOT work for in iOS
import ...
0
votes
0
answers
17
views
Handle Exit and Enter event for dynamically created controls with VBA
I am working on a VBA project in which I have a some dynamically created ComboBoxes. I want to run events on those controls and for that I created a class which lets me handle the Change and KeyDown ...
0
votes
0
answers
30
views
In Javascript is it possible to get duplicate keyboard input and how to handle it?
I am trying to learn Javascript and my first project is the game 2048. I got everything to work but there is one problem that happens when I give keyboard inputs very quickly after each other. I ...
0
votes
0
answers
10
views
Unhandled Rejection(Type error):Failed to fetch
I have a react application. I downloaded it from one source and its not getting run on my local
I have already used "npm install" and "npm start" in my root directory. After start ...
0
votes
0
answers
14
views
Event Listener why does it get repeated for each additional character
I am reading this example (first one on page):
https://btholt.github.io/complete-intro-to-web-dev-v3/lessons/putting-it-all-together/events-and-listeners the first one with the click me and alert.
I ...
1
vote
1
answer
26
views
Issues deleting from a React grandchild component
I am having issues using a handleDelete function that is passed down to a grandchild with all the necessary props.
The structure of my components can go either: Deck > CardSlider > Card or Deck &...
1
vote
0
answers
15
views
What would cause a js event handler to only trigger once unless logging the event variable?
On getting an event listener for a button working, I've run into an issue where mystically the anonymous function only runs once unless multiple log statements are used (or if a single log statement ...
0
votes
1
answer
24
views
How to properly set a thread for this case?
I wrote a code for simultaneous bubble-sorting of an array within two threads, with the use of events (important for assignment) and within a WinForm. Unfortunately, i get the following error in two ...
0
votes
1
answer
24
views
Event listner and Toggle click conflict
I have a menu & sub-menu that needs to obey the following behaviour:
Open/Close with an toggle icon press for menu, and down icon row press for sub menu.
Close both when there is a click outside ...
0
votes
1
answer
26
views
How can I add an existing delegate to an event? [duplicate]
I have an object that has events. I want to reset that object to default but keep the existing event subscriptions. My aim is to have a bunch of subscriptions to events on this object (_myRepo), ...
0
votes
0
answers
16
views
Is there a way to add an event listener to a text node?
For work I need to check if some text was clicked, then in the spot that was clicked append an 'anchor' for a sticky note. So I would like to add an event listener to the text node so that way the ...
0
votes
0
answers
29
views
Observe a property for changes in a Class from another Library
Is there a way to observe changes for a property from a class that I did not write?
example:
public ExampleClass{
public int SomeNumber {get; set;}
}
I don't have control of the object that ...
0
votes
1
answer
20
views
How do I get table Data from a row onChange of dropdown menu when an event is fired in React?
Here's the workflow:
User accesses my react component that renders a table
One of the elements within each row has a dropdown menu
User changes the value of the dropdown (flavor)
An event is fired ...
0
votes
1
answer
22
views
Javascript: Window event, document event or element event?
Dispatch a window event:
Dispatch a document event:
Dispatch an event from an element:
All of these methods achieve the same result in this sample below, so what reasons are there for preferring one ...
1
vote
1
answer
26
views
How to pass a form (Radio Button) data from child to parent onChange in REACT
I want to pass the form data from the child component to the parent component I know it's easy to send the data using the event handler called onSubmit but I need this data to pass whenever the form ...
0
votes
0
answers
5
views
Restart execution of file from error handler after rectifying errors in nodejs
If I have 10 lines of code and I get an error on line 3 can I restart execution after rectifying errors or restart execution from line 3 from the same context left at line 2?
I am sure this is a very ...
1
vote
3
answers
42
views
What happens to the addEventListener when I remove node?
I generate objects dynamically, and when they are created, I add click event listener to them:
let elements = document.getElementsByClassName("my-class")
for (let element of elements) {
...
0
votes
0
answers
27
views
Can't use `request.on` event handlers to close stream request on NextJS
I am creating an API endpoint that streams data so I can live update components based on database events.
I almost managed to make everything work, except for the clean up. After I send the request, ...
1
vote
1
answer
23
views
How to prevent `tel:` links from firing a `beforeunload` event?
I have a popup appear before the user refreshes the page by doing this:
window.addEventListener('beforeunload', function (e) {
e.preventDefault();
e.returnValue = '';
});
This is working as ...
0
votes
0
answers
26
views
Input type=["file"] handling events display information only of first element of the map
I am attempting to create an admin table in React that enables an administrator to upload a CSV file to the database. When the administrator selects a CSV file, an onChange handler triggers a function,...
0
votes
1
answer
17
views
why tabBar.rx.didSelectItem didn't emit tap event?
when I tap the tabBarItem "Bookmarks" , I
expect below code block will print : "select tabbar item" ,and don't print "root view tapped " .
but actually console prints &...
0
votes
1
answer
18
views
LibreOffice Calc - attach Javascript macro to group box button event
On my Mint Box 3 (OS is Mint 21) I'm using LibreOffice Calc version 7.3.7.2, I have created a Group Box containing 3 option buttons (mutually exclusive radio buttons). I have been trying to figure ...
1
vote
2
answers
483
views
How to resolve "Could not load type 'Microsoft.Azure.WebJobs.ParameterBindingData'" in Python Azure Function?
I am currently developing an Azure Function in VS Code. I am encountering an error that has already been reported in this GitHub issue. In full, the error reads: Microsoft.Azure.WebJobs.Extensions....
-1
votes
1
answer
26
views
How to fix "e.preventDefault is not a function" error in react js authentication?
I need to make authentication (SignUp, SignIn pages). When I fill email and password fields to create a user on the SignUp page, after pressing Register button I get the "e.preventDefault is not ...
0
votes
0
answers
20
views
MouseListener is not triggered when I am clicking
MouseListener is not triggered when I am clicking. I first tried it without any labels and panel. It worked just fine as I could see the mouse coodinates and key pressed on my console. Here is the ...
1
vote
3
answers
228
views
How to locally develop EventHub Triggered Functions in Python (programming model v2)?
I would like to learn to develop Azure Functions locally using Visual Studio Code. While there are numerous examples and demos available for using an HTTP trigger, I'm struggling to find much ...
1
vote
1
answer
46
views
Implementing LISTEN command of postgres in spring boot
I have created a trigger on a table and using pg_notify to send the event to a channel status_change. Can I implement a listener in spring boot that listens to each event whenever this trigger is ...
0
votes
0
answers
62
views
Custom event not getting triggered for standard table in SAP
I need to have a custom event on a standard table. The event should get triggered whenever there is any new entry added to standard table or changes made in table. Also inside that custom event I need ...
1
vote
1
answer
47
views
I'm trying to add key listeners to a JPanel in Java
There's a lot to understand, so stick with me. I have a JPanel inside a JScrollPane, which is inside a JTabbedPane, which is inside a JFrame. Somewhere in that process, I'm losing the ability to add ...
0
votes
2
answers
30
views
Handling Forms with JavaScript - Checkbox Validation
I'm currently studying JavaScript and still in beginner level. So, I referred given code from a certain Open Learning Platform. Its intention was to validate whether the checkbox is checked or not (...
1
vote
1
answer
50
views
How to simulate keypress events to change text content and submit a form in JavaScript?
I want to create a JavaScript function that can simulate keypress events to change the text content inside a div and then submit it using a button click event.
For example, let's say I have a div with ...
0
votes
1
answer
39
views
Web event handling in multiple windows (Blazor)
I'm just starting out on the web and this time I'm having trouble with event handling. I develop with blazor, but this seems like a universally applicable problem.
Where I'm stuck is this. I want to ...
0
votes
0
answers
40
views
Creation of custom event for standard table AGR_USERS in SAP
How to create custom event on standard table (AGR_USERS) whenever a new entry is created/inserted in the table.
My input
I have tried creating custom event using Transaction code SWEC by copying an ...
0
votes
1
answer
33
views
Is there a better way for a javascript library to provide a cancelable event to a client?
I am writing a 'drag-n-drop' library and want to create certain events for the user to hook on to. For example, before dropping an element onto another one, I create an event 'beforeDrop' with some ...
0
votes
1
answer
82
views
In Google Apps Script, how do I create, dispatch and handle a new event
I have the following js script such that when the event 'SayHelloEvent' is signaled, there are two separate handlers which will handle the event by logging a message to the console.
function ...
-1
votes
0
answers
14
views
How to detect if a user has uninstalled an android app with capacitor v4.0.0
I'm wanting to clear the cache when an Android user has uninstalled an app. I've read that this may be possible with capacitor.
how could this be achieved in React?
0
votes
1
answer
48
views
How do I subscribe to an event using task expressions?
I have a function doSomething : EventArgs -> Task<Unit>, an event source Source and an event Source.OnChanged. How can I subscribe doSomething to Source.OnChanged? In C# we would use an async ...
0
votes
0
answers
35
views
How to pass data from an Angular component being used within an AngularJS app?
Use Case:
I have an Angular component being used within an AngularJS application. The component is supposed to emit an event on button click that will be captured by the parent page AngularJS ...