event-handling Questions

7

Solved

Below I am creating an object in JavaScript. Within the constructor I am setting up an event listener. The problem is that when the event gets fired, this.prop cannot be found, and undefined prints...
Parenthesize asked 4/7, 2009 at 4:35

3

Solved

I want to developt my own Button component and be able to handle event modifiers, like this: <MyButton on:click|preventDefault={handler}>Click me</MyButton> But I get the following err...
Transcendent asked 19/10, 2021 at 11:59

1

Solved

I'm new to Python and trying out Turtle through Tutorials. This question turned out to be verbose, my bad. I have designed 2 Games handled by 2 Functions (in a separate module) which are called fro...

8

Solved

I have a method to detect the left click event that visual studio made by double clicking on the form. private void pictureBox1_Click(object sender, EventArgs e) { MessageBox.Show("Left click"); ...
Tress asked 18/10, 2013 at 11:15

2

Solved

In Android NDK, what is the difference between ALooper_pollOnce() and ALooper_pollAll()?
Normalie asked 23/12, 2015 at 6:6

2

Solved

I was just playing around with event listeners with DOM and Javascript and did notice this: function chained(msg) { console.log(msg, event); } function onClick() { chained('the body was clicked'...

6

Solved

Is there any way to listen to the event of volume change on Android, without just taking over the volume buttons? The only thing I've found that works is here, but it works only after the volume co...
Magnuson asked 3/7, 2012 at 20:47

11

Solved

I'm trying to detect if the scroll event is up or down, but I can't find the solution. import React, { useState, useEffect } from "react"; import { Link } from "react-router-dom&quot...
Sheepdip asked 21/6, 2020 at 10:10

5

Solved

I have a GUI-thread for my form and another thread that computes things. The form has a richtTextBox. I want the worker-thread to pass strings to the form, so that every string is displayed in the...
Gastroenteritis asked 21/8, 2012 at 13:1

3

For clarify purposes I want to see the exact command Node.js runs versus the shell/cli. Unfortunately I can't seem to find out how... https://nodejs.org/api/child_process.html#child_process_child_...
Ingaborg asked 24/2, 2016 at 18:11

6

Solved

I'm writing a simple Mines app to help me get to know SwiftUI. As such, I want primary click (usually LMB) to "dig" (reveal whether there's a mine there), and secondary click (usually RMB...
Termless asked 11/12, 2019 at 6:53

6

Solved

function doSomethingWith(param) { document.body.addEventListener( 'scroll', function() { document.write(param); }, false ); // An event that I want to remove later } setTimeout( function()...
Invalid asked 14/4, 2011 at 7:51

7

Solved

I'm adding ImageViews to parent layout dynamically and performing zoom in/out operations with onTouch on the added image. I want to remove the added view with an onLongPress of it. img.setOnLongCli...

5

Solved

I am trying to fire the event handler assigned to my timer mock. How can I test this private method here? public interface ITimer { void Start(); double Interval { get; set; } event ElapsedEven...
Overword asked 20/1, 2012 at 11:49

4

I'm trying to add a react-hook-form to my react.js project. The form is defined as: <form onSubmit={handleSubmit(onSubmit)} ref={submitRef}> //some input elements <div className='d-flex ...
Altimeter asked 21/9, 2022 at 9:18

7

Solved

I'm currently developing a React app and I want to detect swipe events (left, right) on a div element (on mobile devices). How do I achieve this without any additional libraries?
Suffruticose asked 6/1, 2022 at 19:41

15

Solved

I am taking an input from the user of the card number and wants that the length entered by user must not be less than and more than 12. Here is the declaration of my textfield. <TextField id="...
Prehensible asked 29/8, 2017 at 13:2

3

Solved

Is it possible in JavaScript to listen for a change of attribute value? For example: var element=document.querySelector('…'); element.addEventListener( ? ,doit,false); element.setAttribute('somet...
Valleau asked 2/1, 2017 at 10:25

2

Solved

The code I’m testing has a lot of <a> tag elements that render with an href tag but shortly after page load are given some click event that does something different (such as opening a modal)....
Babblement asked 2/11, 2023 at 20:55

10

Solved

Is it possible to override onBackPressed() for only one activity ? On back button click I want to call a dialog on a specific Activity, but in all other activities i want it to work as it worked ...
Phonograph asked 20/8, 2013 at 14:23

3

Solved

How can I handle close and terminate app events in SwiftUI? View { ... }.onDisappear { //My code } Working only when I change view, not when I close or terminate my app.
Breger asked 10/9, 2020 at 7:40

5

Solved

I would like to prevent the default event from a focusOut (or blur) event and keep the focus set to the specific input field. This is what I have already tried: using event.preventDefault() at t...
Odoriferous asked 30/1, 2013 at 21:7

6

Solved

I need to figure out which character was typed into a text field from within the handler that is called by jQuery's keydown function. key.which gives me only the keycode, but I need to figure out w...
Giltzow asked 8/2, 2010 at 7:57

41

Solved

How do you tell if a browser has auto filled a text-box? Especially with username & password boxes that autofill around page load. My first question is when does this occur in the page load se...
Ideality asked 29/7, 2012 at 9:20

5

Solved

// this e works document.getElementById("p").oncontextmenu = function(e) { e = e || window.event; var target = e.target || e.srcElement; console.log(target); }; // this e is undefined funct...

© 2022 - 2024 — McMap. All rights reserved.