FAQ Database Discussion Community


Can you pass a variable by reference to a callback method in python?

python,user-interface,callback,tkinter,event-handling
I'm working on a GUI using tkinter in Python 3, and I have an Entry text box named inputFilePathDisplay with the following binding: inputFilePathDisplay.bind("<Key>", lambda event, filePath = inputFilePath: key(event, filePath)) I have the following callback function for when a key is pressed: #input functions -- see if the user...

SSIS, Foreach Loop, Event Handler when it writes 0 records due to file containing zero records

ssis,event-handling
I have a foreach loop container in my SSIS package. the Data Flow task imports xls files from a certain directory. If the xls file contains no data, the package shows in the log that it wrote 0 records. This is fine; however, I would like to envoke an event...

Extjs5 - right click context menu with Ext.form.field.HtmlEditor

javascript,extjs,javascript-events,event-handling
Problem description I have prepared this index.html, which creates a simple Ext.form.field.HtmlEditor. I want to have a right-click-context-menu, which is capable of doing something with words that were marked by the user: <!DOCTYPE html> <html> <head> <script type="text/javascript" src="/ext-5.1.1/build/ext-all-debug.js"></script> <link id="theme1" rel="stylesheet" type="text/css" href="/ext-5.1.1/build/packages/ext-theme-neptune/build/resources/ext-theme-neptune-all.css"> <script...

Execute a script on f:ajax “success” event only when validation has not failed

javascript,ajax,jsf-2,event-handling,composite-component
I have created a composite component that extends the command button and add some ajax functions (onBegin, onComplete and onSuccess), but I have some problems that I couldnt solve: When I click on the button and a validation error occur, in success event function is passed #{facesContext.validationFailed} = false instead...

How to detect a TOUCH event with another finger while an ACTION_MOVE is in process

android,event-handling
I am developing a game and I need to be able to detect that one finger is performing a MOVE while posibly another finger can TOUCH another part of the screen. With the following code I am able to detect both the ACTION_MOVE (on certain region of the screen) and...

How to get immediate value /current value of paper-slider on change event or immediate value change event

javascript,event-handling,polymer
i am trying to change the background color of div on change function of paper slider with slider's current value but failed to get value of slider i have tried on-immediate-value-change or on-change function ,but i don't know how to get current value of paper-slider

Polymer 1.0 how to call a paper-icon-button's tap when a coupled paper-input-container receives the enter key

event-handling,polymer,web-component
I have a paper-input-container next to a paper-icon-button and want to trigger the same function that is wired to the paper-icon-button's on-tap handler when a user hit's enter while the input has focus... anyone know how to do this. <html> <head> </head> <body> <dom-module id="example-stuff" > <style> :host { display:...

How to check if key pressed when clicked event in java

java,event-handling,mouseevent,keyboard-events
I want to catch the Clicked event in java when key pressed (not ctrl, or shift, or alt), or check if key "A" press druing key "D" pressed. How can i do that, something like the method isshiftdown ?

iOS handle didSelectRowAtIndexPath in custom class

ios,objective-c,swift,delegates,event-handling
I've seen a way how to set handler for events in custom classes. Something like this: @implementation CustomClassWithTable { void (^_cellHandler)(Cell *cell); } ... - (void)setCellHandler:(void (^)(Cell *))handler { _cellHandler = handler; } ... - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { ... if (_cellHandler) { _cellHandler(cell); } } then in controller...

parameters in event handlers - Javascript

javascript,events,parameters,event-handling
I have an event listener which includes an event handler with parameters ... and it works ... and, from what I have read, it is not supposed to. When I include the event handler in an anonymous function, like (I think that) I'm supposed to, it stops working. I have...

event handling in enyo js

event-handling,enyo
I want to perform dynamic binded actions on click of buttons and checkbox ticks all together to be reflected in a statement of the class results (name results, box-container) <!--[if lt IE 9]> <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> <script src="http://enyojs.com/enyo-2.0b/enyo.js"></script> <script src="enyo-master/enyo.js"></script> <link rel=stylesheet href="http://enyojs.com/enyo-2.0b/enyo.css> <link rel="stylesheet"...

Laravel. Pass parameters to an event subscriber

php,events,laravel-4,event-handling
Im developing a task system and i want to mark as viewed a task and do other things when a user request the task I wrote a Task Event Subscriber like this <?php namespace Athena\Events; class TaskEventSubscriber { public function onCreate($event) { // Here we can send a lot of...

jQuery event.preventDefault() don't work unless debugging

javascript,jquery,events,javascript-events,event-handling
I am trying to use this approach in order to convert GET parameters to POST. I also want the anchor to be properly handled even if the middle mouse button is clicked. This is how I did the the event handlers binding: $(document).ready(function () { $(".post").each(function(){ $(this).mousedown(function(evt){ switch(evt.which){ case 1:...

Make input value depend on `select option` selection

javascript,php,jquery,event-handling
Basically if male is selected, make the input named pronoun have a value of his. Else, make the input named pronoun have a value of her. <select name="sex"> <option value="male">Male</option> <option value="female">Female</option> </select> <input type="text" name="pronoun" value="" placeholder="pronoun" /> ...

After Creating a Control, automatically add it to specific panel

c#,winforms,user-controls,event-handling
I have UserControls that are "Buttons" for Menu purposes. Those Buttons shall automatically add to the right Panel. So basically, if I write: MenueButton button1 = new MenueButton(); the button shall automatically be added to MenuePanel on GUI Form. (Maybe Some easy action handler?) Is there a way to achieve...

PHP jQuery trigger button on dom change

php,jquery,dom,event-handling
I have this scenario: I have a simple php file with only few html elemnts: a div called switch, another called lamp and a couple of buttons. The two buttons are labeled On and Off. The lamp div is empty. The switch div is empty too, but is updated using...

Execute Commands after print window is closed

javascript,jquery,events,javascript-events,event-handling
I'm printing a web page using the code below: window.print(); I want to execute a few commands after the Print dialog is closed. How can I detect it?...

Argument in Event Handler using Lambda

c#,lambda,event-handling,printdocument
I've read a bunch of these similar topics and I can't seem to figure this one out. Before I had something like this: PrintDocument pd = new PrintDocument(); pd.PrintPage += PrintPage; pd.PrinterSettings.PrinterName = photoPrinter; pd.Print(); private void PrintPage(object sender, PrintPageEventArgs e) { Image i = Image.FromFile(@"C:\workspace\FullSizeRender.jpg"); Point p = new...

osgWidget label within frame won't trigger the callback

c++,callback,event-handling,openscenegraph
Here's my problem I'm new to osg and I'm trying to create something like a dropdown list by adding osgWidget::Labels to a osgWidget::Box and then setting this same box as a osgWidget::Frame's window and all this works fine until the part where my callback "labelClicked" is never actually triggered once...

C# Displaying String of ObservableCollection on event CollectionChanged

c#,event-handling,observablecollection
I'm just learning events in C# and was given the following example in a tutorial. My question is how I can display the contents of the string added/removed in my event handler. using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.Text; using System.Threading.Tasks; namespace SubscribeTest { class Program {...

Where does a browser event's timeStamp come from in Javascript?

javascript,event-handling,timing
Event objects passed to event handler callbacks contain an event.timeStamp of when the event occurred, but where is the timestamp produced? Is it something that bubbles up from the underlying OS, or is it generated by the browser? I'm interested in gauging the reliability of the timestamp and recognise that...

dynamically added event handler disables the previous one in Javascript

javascript,javascript-events,event-handling
I am creating buttons dynamically in Javascript. Also adding dynamically an eventhandler to each button. For the last button it works but the previous ones simply are not working any longer. Here's my small piece of code. What do I do wrong? <html> <head> <script> var id = 0; function...

why can't i delete a row in table from javascript?

html5,checkbox,input,event-handling,event-listeners
I'm trying to build a table out from JavaScript, so far so good. The main idea is that the last column will be a checkbox, and when it will be checked the row will delete. before i delete it, i need to know what was written in this row, so...

jQuery selector precedence when using pattern matching

javascript,jquery,javascript-events,jquery-selectors,event-handling
I am creating a form that implements a bunch of similar elements. They are custom select boxes, created out of <ul>s. Some of these elements are slightly different in the way I want the mousedown event to be handled though. The way I have it set up currently is that,...

Push a Value of the Selected List in an Array and Calculate

javascript,jquery,event-handling
here's my code at the moment. I wanted to push only or all the object that is selected in an array. $('.checkbox-wrapper').delegate('input:checkbox', 'change', function () { //Use this is if you want to uncheck other checkbox if another checkbox is checked //$('input').not(this).prop('checked', false); var $lis = $('.list > li').hide(); $('input:checked').each(function...

Event Handlers not being invoked in IE 9

javascript,dom,event-handling,internet-explorer-9
I am trying to add event handlers to the option elements contained inside a select box. The relevant code is as follows: $(document).ready(function(){ $('.custom_select_option_1').mousedown(function(event){ event.preventDefault(); var opt= event.target; var scroll_offset= opt.parentElement.scrollTop; opt.selected= !opt.selected; opt.parentElement.scrollTop= scroll_offset; update_selections(opt.parentElement); }); $('.custom_select_option_1').mousemove(function(event){ event.preventDefault(); }); }); My code works fine in Chrome, but in IE-9...

How do I prevent any button click events from queuing until the event handle is finished with the first call

c#,winforms,event-handling
I want to prevent a button click from queuing. In testing I have a Form, a Button and in the Code-Behind I have the event handler: private void button1_Click(object sender, EventArgs e) { if (_codeRunning) return; _codeRunning = true; //Application.DoEvents(); //button1.Enabled = false; _click ++; Debug.WriteLine("Click Number: " + _click);...

Unity3d - Input.GetKey returns true more than once

c#,unity3d,event-handling,keyboard
I want to move my object on scene using keyboard inputs. To do this work, I create an empty game object and attach a .cs file to it. Code of this .cs file is below : void Update() { if (Input.GetKey ("up") ) { Debug.Log("up"); } else if (Input.GetKey ("down")...

addActionLister parameter

java,swing,event-handling,awt
I am getting expected output when i am using "this" reference in addActionListener() call, how can I achieve it using the object call directly ? When i am using jb.addActionListener(new EventHandling1()); I am getting error -"Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException". Also which object needs to be passed to this method...

visibilitychange event is not triggered when switching program/window with ALT+TAB or clicking in taskbar

javascript,html5,events,javascript-events,event-handling
Basically, the problem is with the behaviour of the event "visibilitychange". It's triggered: - when i switch to a different tab inside the browser window when i click in minimize / restore buttons for the browser window (this is ok) It's not triggered: - when i switch to a different...

Consecutive and sequence insert in node.js sqlite

node.js,asynchronous,sqlite3,event-handling
my code is: var json = [1,2,3,4,5,6,7,8,9]; async.forEach(json, function (that, callback) { sqlitedb.run("INSERT INTO mytable (name) VALUES ("+that+")" , function () { console.log(that); callback(); }); }); The callback() placed on after insert item. but when i execute, my json items inserted on no squence and result is like: 7 8...

Event subscription on async method

c#,asynchronous,event-handling
I wanna launch the LoadDataAsync in 2 ways. First by an event with the subcription in FormLoad() and by a classic method ManualLoad(). But I can't make it work. I can't make subscription on task return. With void it's works, but with void can't await in the ManualLoad() method. How...

Handling offline events

android,caching,event-handling,offline-caching,android-handler
I am doing offline caching.I want to allow user to make events even when he/she is offline.For that I am using a handler that checks every second whether net connection is there or not and whenever net connection is there it executes the task associated with the event.For example if...

YAML list -> Python generator?

python,event-handling,yaml,pyyaml
I was wondering whether there is an easy way to parse a YAML document consisting of a list of items as a python generator using PyYAML. For example, given the file # foobar.yaml --- - foo: ["bar", "baz", "bah"] something_else: blah - bar: yet_another_thing I'd like to be able to...

Web Audio API- onended event scope

javascript,event-handling,web-audio
I'm having a tricky issue with the Web Audio API AudioSourceBufferNode and its onended event. Basically what I'd like to do is have two AudioSourceBufferNodes that are each triggered when the other one finishes and keep playing back-and-forth. I understand that AudioSourceBufferNodes are pretty much done once you call start()...

jQuery - How can I make sure a function only runs once with multiple bindings and events firing?

javascript,jquery,javascript-events,event-handling
So I'm working with jQuery.payment on a credit card number text input field. When the user enters any 4th number (4, 8, 12) the plugin automatically puts in a space for a nice look. Because of this, only the keyup event fires, not the input event. However, if the user...

Handling click events with jquery in Google Chrome

jquery,html,google-chrome,event-handling
I'm trying to add an event handler in Google Chrome to handle click events using jquery. Here is code from modal.php: <script> $('.event-sel').on('click', function(event){ console.log('handling event selection'); }); </script> <form> <select> <option class=".event-sel">This is an option</option> </select> </form> This code is meant to handle click events for all items of...

Invoke marshalled COM interface multiple times

javascript,javascript-events,com,event-handling,activex
I am writing a COM object for JavaScript consumption. JavaScript code is turn runs in an hosted WebBrowserControl. I need to fire some events from COM object to JavaScript, the excellent guide to which at Dr. Dobbs e.g. I have following in my *.idl IJSCallback { void Listen(IDispatch* pJSMethod); }...

C#: How to register a function from all subclasses of an interface to a single event in least redundant manner

c#,events,unity3d,event-handling
Implementing Unity3D, I have an event FrameUpdateEventHandler that triggers every frame update: public delegate void FrameUpdateEventHandler(float deltaTime); public class API { public static FrameUpdateEventHandler FrameUpdateEvent; public void OnFrameUpdate(float deltaTime) { if(FrameUpdateEvent != null) FrameUpdateEvent(deltaTime); } } //Included as a script in a single Unity component public class UnityScript : MonoBehaviour...

How to Handle events from a control array VB.net

vb.net,event-handling,control-array
To start, hi to everyone im new to stackoverflow, and also new to programing (on 1º year). I've been searching but ive found nothing that answer my question, or maybe im just to newbie to understand the answers, so im sorry if its too simple, i cant see it! /*...

Android application with Parse - How to respond to events on the server side

android,parse.com,event-handling,server-side,cloud-code
I'm trying to write an android application, and I chose to handle the server side with parse. Suppose I have three tables, TableA, TableB and TableC. I want to call a server-side function each time a row is added to one of my tables, that is: call fa when a...

jQuery mobile radio button changed event always fires even if already checked

jquery,jquery-mobile,event-handling,radio-button,onchange
I'm using a radio button group containing two radio buttons to dynamically change the content of my page depending on which radio button is checked. The content should be updated, when the selected radio button changes. Therefor i added an event handler to the radio buttons. html: <fieldset data-role="controlgroup" data-type="horizontal"...

Javascript : Replace Event Listener

javascript,event-handling
I am listening to an event and want to call different methods. For example, I am listening to animation end event and the code is something like this: this.inAnimationCallback = function() { console.log('In'); _this.elem.className = _this.settings.className; }; this.outAnimationCallback = function() { console.log('Out'); _this.elem.parentNode.removeChild(_this.elem); }; this.elem.addEventListener(animationEvent, this.inAnimationCallback); setTimeout(function() { _this.elem.addEventListener(animationEvent, _this.outAnimationCallback);...

How can I remove an EventFilter in JavaFX created with a lambda

lambda,event-handling,javafx-8
I would like to be able to remove an event filter which was set up with a lambda. I am not sure if this is possible? I have seen this example using inner classes: http://www.java2s.com/Tutorials/Java/JavaFX/1120__JavaFX_Event_Filter.htm However if I create my filter like so: addEventFilter(MouseEvent.MOUSE_CLICKED, event -> { PaneWithSelectionListener parent =...

Portlet IPC after recieved Event

jsf,events,event-handling,ipc,portlet
I have a Navigation portlet which schows all Students, when a Student gets clicked im sending a event with the id of the clicked student to other portlets. Sending and receiving the event is not the problem, that works fine. What i don't get, is how to proceed with the...

jQuery one event prevents other event from being fired

jquery,javascript-events,event-handling,listener
I'm unsure about what I am overlooking. If my design is just bad or if there is a smart way of solving this. Given: 1 input field 1 hidden button Logic: If the input field is focused, the hidden button gets shown. If the input field is unfocused, the button...

Handling events in WinForm UI that have been raised in instance of a SignalR persistent connections endpoint class

.net,vb.net,event-handling,signalr
So, I have put together a simple class to create a SignalR server and starts the Owin.HttpListener and allow clients to connect which has worked fine so far: Create server object , server object starts listener, client connects to listener, blah, blah, it works. However, the issue I am having,...

Should all Objects that register events be IDisposable

c#,events,event-handling,destructor,idisposable
As per my understanding when an Object is no longer required it is best practice to unsubscribe all event handlers in any Objects that subscribes to events. This is done to avoid handling an event within an Object when the given Object may reside in a invalid state (no doubt...

How to wait for a return value from an event handler without blocking main UI thread

c#,multithreading,asynchronous,xamarin,event-handling
So I have this method this uses a library to generate an external webpage to allow the user to enter their Facebook credentials for verification. Upon entering it we are creating a profile based on the that user's account and saving it to a database. Once we save it to...

JavaFX confusing event handling on System Exit

javafx,dialog,event-handling,alert
The code bellow generates an Alert Dialog with two buttons, Ok and Cancel; and it also works as expected: if I click Ok, the system exits, otherwise the dialogs vanishes. The strange thing is: if I ommit the else block handling the event, the platform will always exit, not considering...

Windows Phone: how to handle an event from a web page in a WebView?

events,webview,event-handling,windows-phone,handler
Which callback/delegate is the one to intercept the event of a user clicking on a link within a WebView? I'd want that URL. I just need to know if it is possible and how should I do in some way.

Why does the event listener only register on the last element created in for loop? [duplicate]

javascript,html,for-loop,event-handling,innerhtml
This question already has an answer here: Is it possible to append to innerHTML without destroying descendants' onclick functions? 8 answers I am creating checkboxes using JavaScript, adding the onchange listener to them and adding them to a div using a loop. However, only the last checkbox has the...

What is preventing my event handler method from completing?

c#,wpf,concurrency,exception-handling,event-handling
I'm using a SerialPort, WPF for user interface, a 'ui' object to handle application logic, and a wrapper around SerialPort. The method in question is called when the SerialPort.DataReceived event is fired. It begins to run, then after reading the data, just seems to exit, even though it has tons...

Angular: Changing path inside event handler not working

angularjs,google-maps,event-handling,ng-map
I'm new to angular, and am having a problem changing the location inside of an event handler. The handler is for a marker positioned on a google map. I am using ng-map (which is pretty awesome). Here's the code that creates the markers (this runs inside the success callback of...

jQuery on() method only works indirectly via childSelector

javascript,jquery,event-handling
Any ideas what could be the reason that the code $('body').on('click', '.btn_add', function(e) {alert("test");}); works, but $('.btn_add').on('click', function(e) {alert("test");}); does not? Thanks,...

How to store and mark all mouse-clicked-point on an Image loaded in JPanel?

java,event-handling,jframe,jpanel,mouseevent
Up till now I have used the code given below to load image in a new new JFrame and coordinates of pixels of image are hard-coded in the code itself. However, I wish to do it dynamically i.e mark points clicked by mouse and store all the coordinates in an...

Handling events for a collection of JButtons

java,swing,arraylist,event-handling
I'm attempting to create dynamic interface that essentially creates a grid of a growing number of panels that look similar to the picture below. I've got some rough code to achieve that. I have an issue in regards to handling events for the JButtons that i've added to an ArrayList....

Java: Action Handler

java,button,event-handling
I am working on a problem for school and I am having an issue with the CalculateButtonHandler. I am also using an ExitButtonHandler but that is not giving me any issues. I have tried re-reading my textbook and have searched the web. After racking my brain over this issue I...

How to handle event from multiple buttons of same name

javascript,html,button,event-handling,elements
I am working on a small practice program where I have 3 white boxes in a row. My goal is (using Javascript) for any of the boxes to change from white to red when the mouse is over the box, and then to turn yellow when the mouse comes off...

React event-handling (onClick) inconsistency

javascript,onclick,event-handling,reactjs
Sup. The following alerts on render, but not onClick: render: function(){ return ( <div onClick={alert('I alert on render, but not onClick.')} /> ); } Same for the following: foo : function(text) { alert(text) }, render: function(){ return ( <div onClick={this.foo('I also alert on render, but not onClick.')} /> ); }...

Cannot read property 'addEventListener' of null on slider

javascript,javascript-events,event-handling
I have a slider which when the mouse move event is fired by it I want to display its value inside a paragraph. This is the code I am using: var exit = document.getElementsByTagName("p"); var slide = document.getElementById('slider'); window.addEventListener("load", function(){ slide.addEventListener("mousemove", function() { console.log(slide.value); }); Html <input type="range" value="0" min="0"...

Custom Event Listener not working

actionscript-3,events,event-handling,custom-events
I am new to as3 and I recently saw creation of custom events in as3 in a tutorial and I wanted to incorporate in my game. When i did the tutorial, it all seemed well for that project. But it doesnt seem to work with the new project. Here is...

C# Event Handling - Event Handler remains null

c#,events,event-handling,eventhandler
I am a beginner to C# programming. When I run this program, the eventhandler named - newMessagePublishedEventHandler of the class MessagePool is always null while executing the OnNewMessagePublished() function of the same class. Can anyone please tell me why? and also how could I resolve this? namespace ConsoleApp { public...

Register multiple EventHandlers for one portlet

event-handling,liferay,portlet
I would like to register more than one EventHandler in a Portlet in my portlet.xml. Right now it looks like this: When trying to add a second block of init-param i get an error: Than i tryed to add multiple EventHandler in one init-param block, but i get this error:...

jquery cookie issue: $.cookie is not a function

javascript,jquery,event-handling
I know this question has been asked multiple times. I looked at many answers but couldn't find a solution. I am trying to load jquery.cookie.js script. Here is how: <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js"></script> <script type="text/javascript" src="scripts/jquery.cookie.js"></script> <script type="text/javascript" src="scripts/javascript.js"></script>...

JAVA: How to listen to calling of event handler/How to get returned result of an event handler?

java,android,event-handling,java-websocket
I am creating an Android chat application wherein I am using WebSockets and on top of that I want to create a custom implementation of Application protocol. I am stuck in a situation. Essentially, what I want is a way to know that an event handler method has been called...

Cancel some keyboard events on a control

c#,.net,datagridview,event-handling
I have a DataGridView with KeyDown and KeyUp handlers. Under some conditions I want to disable the default behavior of the Enter key down (unselecting text and focusing on the next row), pretty much like this: private void View_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Enter && Condition) {...

Why is 'event' available globally in Chrome but not FF?

javascript,jquery,javascript-events,event-handling,global
While working on an answer for another question, a strange bug came up related to the event object being available in an anonymous function without being passed in. In Chrome the below works fine, but FF throws an error. $(document).ready(function() { $("#uspsSideboxTrackingClose").click(function() { event.preventDefault(); console.log(event); }); }); Chrome: FireFox: ReferenceError:...

Ignoring Listcontrol 'DELETE_ALL_ITEMS' Event when closing application

c++,mfc,event-handling,listcontrol
I have a MFC ListControl in my application. I have an event that occurs when "all items in the view were deleted". The event throws an error message and then closes the program. My problem is that the event also gets called if the X(close) button is clicked. Here is...

Triggering a change event for Internet Explorer

javascript,jquery,internet-explorer,event-handling
I have several select menus that needs that need to have their change events triggered on page load, so that they can automatically use the change behavior from an on('change', ...) handler. I have it working fine in Firefox, but apparently this doesn't work in Internet Explorer. Example var changeEvent...

How to ignore events in LabView triggered outside of a particular sequence frame?

events,event-handling,workflow,labview
Using event structures in LabView can get confusing, especially when mixing them with a mostly synchronous workflow. My question is, when an event structure exists in one frame of a sequence, how can I force it to ignore events (e.g. mousedown on a particular button) that were triggered while the...

Setting a Firemonkey control OnMouseMove method

c++,event-handling,firemonkey,c++builder-xe7,tgrid
I have a custom control for which I am trying to define an OnMouseMoveFunction. Essentially, the control functions as a search bar, and is made up of an edit box with a child custom TGrid control for displaying results. I am handling several mouse events for the TGrid already, however...

Jquery Click event dosen't fire on paranet div that has same size as descendent img?

jquery,javascript-events,event-handling
The HTML code is as below (the img fits to the div parent) : <div id='draggable_task' style='display: inline-block; position: relative; overflow: hidden'> <img src='../Content/BPMN Icons/Big Icons/BigTask.png' /> <p style='position: absolute; top: 20%; left:20%;'>Task name</p> </div> The JavaScript code is as below (DrawArea is the top container): $("#DrawArea").on("click", function (e) {...

Qt: Connect inside constructor - Will slot be invoked before object is initialized?

c++,qt,event-handling,signals-slots
I am learning Qt framework (C++) and was wondering if QT has any mechanisms to protect slots from being called before an object is fully initialized. Consider Class A constructor: A::A() { mTreeView = new QTreeView(); ... connect(mTreeView, &QTreeView::customContextMenuRequested, this, &A::OnContextMenuRequested); ... } My worry is the user would be...

JQuery - Add click event to multiple elements

jquery,event-handling
I have the following: $('#applicationsGrid tbody').on('click', 'td.details-control', function () { var formattedData = dosomething(); $(this).parent('tr').after(formattedData); }); $('#applicationsGrid tbody').on('click', 'td.child-details-control', function () { var formattedData = dosomething(); $(this).parent('tr').after(formattedData); }); $('#applicationsGrid tbody').on('click', 'td.grand-child-details-control', function () { var formattedData = dosomething(); $(this).parent('tr').after(formattedData); }); How can I combine all the...

How to make TDBCheckBox update its DataField immediately after click?

delphi,checkbox,event-handling,delphi-xe3,data-aware
I have a form with several controls where the first one is a TDBCheckBox that is bound to DataField := 'enabled'. When the checkbox is clicked I want all the remaining controls to be enabled / disabled. procedure TMyAdapter.DataSourceDataChange(Sender: TObject; Field: TField); var Enabled: Boolean; begin Enabled := FModel.DataSet['enabled'].AsBoolean; FView.Label1.Enabled...

How to modify tags in Tkinter Canvas by events

python,canvas,tkinter,event-handling
I am programmatically adding tag_binds to all objects on my canvas that have the tag "tag": self.canvas.tag_bind("tag","<Button 2>",self.tag_highlight) self.canvas contains all the objects that the user has added (all tagged with "tag". However, in tag_highlight, I would simply like to have a handle on the actual element within the canvas....

Disabling sorting on nested DOM Element

html,sorting,event-handling,datatables,jquery-datatables
I'm working with Datatables and have a TH with a nested checkbox: <th class="sku-checkbox-wrapper sorting_desc" rowspan="1" colspan="1" aria-label="Select All">Select All<br> <input type="checkbox" id="sku_select_all" class="checkbox"></th> Currently, this TH has a sorting event handler attached to it. I would like to de-couple the nested checkbox from this event. I have the TH...

What is the difference between “!window” and “!!window”?

html,event-handling,addeventlistener,web-worker
I know my question is a bit vague but really like to know a bit more. Thanks in advance. Just need a good, quick and easy run down of this.

check child check box by parent check box in jquery

javascript,jquery,html,event-handling
I am trying to check child check box by parent check box in Jquery. But code work properly for first time next its stop working $(document).ready(function () { $("#append").delegate("#p0", "click", function () { if (this.checked == true) { $("#submenu0 input").attr('checked', true); } else { $("#submenu0 input").attr('checked', false); } }); HTML...

WPF Detecting Window Close Event and coupling with a button event

c#,wpf,button,event-handling
For two days, I have tried various methods for making it so that on loadButton click, it opens a secondary window and disables the loadButton; Then, when that secondary window has been closed, the loadButton will be re-enabled. Although, obviously all of my attempts have been unsucessful. I have been...

If checkbox checked, instantly alert

javascript,html,event-handling
So, my goal is this: if the checkbox is checked by the user, do something (let's say just an alert). Here's my code, that is not working: function validate() { if (document.getElementById('LetterNeed').checked) { alert("checked"); } else { alert("You didn't check it! Let me check it for you."); } } <input...

VB NET. How fire an event when other event is fired?

vb.net,events,user-controls,event-handling
Best regards. I'm here, developing in VisualBasic.Net again. I create a UserControl who can create buttons in execution time and I need a way to execute a function in the Form where I use the UserControl every time I click one of the buttons. I was thinking handdle my function...

JQuery event propagation (return false)

javascript,jquery,javascript-events,event-handling
Why clicking on the male radio button does not work? <div id="m_wrapper"> <input id="m" type="radio" name="sex" value="male" />Male<br> </div> <input id="f" type="radio" name="sex" value="female" />Female <input id="o" type="radio" name="sex" value="other" />Other $("#m_wrapper").click(function(e){ $("#m").prop('checked', true); return false; }); I know that here -> return false is equivalent to call e.preventDefault() AND...

How can I trigger a value change event in a subvi, that has a reference to the possible changing value?

event-handling,onchange,labview
I have a subvi that receives two references to paths as input. The subvi does its thing and changes the value of the second path, based on the first one. (it adds a folder of the user's choice) One can consider the first path reference to truly be an input...

HDFS - insert new file trigger

json,hadoop,event-handling,hdfs
Is there such thing as an event, hook or trigger that gets fired when a new file or file version gets added to HDFS? I'm working on a system where we would like to write JSON files to HDFS. The clients writing to the HDFS should be ignorant of the...

Node JS TCP Proxy: Reuse socket in callback function

node.js,networking,tcp,proxy,event-handling
I'm trying to implement a TCP proxy in Node JS. I only have some experience with Javascript so I met a lot of problems along the way. I've done a lot of searching for this one but had no luck. The problem occurs when browser sends a CONNECT request for...

MVC of a button to implement different types of button.Looping of the button element doesnot display all the elements in div

javascript,html,model-view-controller,event-handling,javascriptmvc
I want to implement MVC of a button. I have created a button using var btn = {btnElem : document.createElement('button')} ; now i want to inherit this button into different types of buttons like arthimetic or logical button. so I used this btn object to get the arthimetic button var...

Rails fullcalendar

javascript,jquery,ruby-on-rails,event-handling,fullcalendar
So this is the thing when i add event click in my fullCalendar script in events.js.cofee it crashes with turbolink SyntaxError: [stdin]:7:24: reserved word 'function' <%=javascript_include_tag 'application', 'data-turbolinks-track' => true %> Now this is my orginal events.js.coffee without adding eventClick Note: with this it doesnt crash and works perfectly but...

Detect if Application was suspended in OnNavigatedFrom for Windows Phone 8

c#,events,event-handling,windows-phone
Is there anyway to know in the OnNavigatedFrom if the App is navigating from this page because it is being suspended? I have event handlers that update the UI, that I dont want them unsubscribed from if I am just suspending the App

Stop fadin/fadeout event jquery

javascript,jquery,animation,event-handling
I have a dive that flashs once on click. If you press the button multiple times it will keep flashing until the click count has been executed. I would like to so then if the user was to click the button multiple times, it would stop flashing after the last...

Removing/Consuming Lamda expression events on javafx

java,javafx,event-handling
So, I created an event with lambda expression in a canvas using javafx and I want it to be removed after used, here's the event: can.setOnMouseExited(event->{ gc.clearRect(0, 0, 100, 100); gc.setStroke(Color.BLACK); gc.strokeRect(0, 0, 100, 100); }); ...

How do I access the child element of a Frame?

c#,wpf,xaml,event-handling,frame
I have frames in my main window which are set to visible/collapsed based on user input: <Grid> <ScrollViewer x:Name="ScrollViewer1" Grid.Row="1" Grid.ColumnSpan="3" Margin="10,0,0,0" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto"> <Frame Name="InputsFrame" Source="Inputs.xaml" NavigationUIVisibility="Hidden" Visibility="Visible" ScrollViewer.CanContentScroll="True" /> </ScrollViewer> <ScrollViewer x:Name="ScrollViewer2" Grid.Row="1" Grid.ColumnSpan="3" Margin="10,0,0,0"...

Event emitter, object is not function

javascript,node.js,events,event-handling
I created an event in node.js but when I try to trigger the event and pass arguments to the callback I get eventEmitter("dataIn", null, message); TypeError: object is not a function. Looking at similar stack overflow questions the problem was not using new to create the eventEmitter, but I am....

Giving NumericUpDown Events in Flow Layout Panel (C#)

c#,event-handling,flowlayoutpanel
I'm using the following code to generate NumericUpDown's inside of a FlowLayoutPanel but I can't figure out how to add a Value Changed event handler. string numericUpDownText = "captchaNumericUpDown"; NumericUpDown newNumericUpDown = new NumericUpDown(); newNumericUpDown.Name = textboxID.ToString() + numericUpDownText; newNumericUpDown.Width = 50; itemFlowPanel.Controls.Add(newNumericUpDown); I want all of them to do...

Show what the user typed in the body

javascript,jquery,events,event-handling
I have a code and I want that after the user type something in the textfield and press enter, what he typed appears on the screen. But I'm not being able to do that, I'd like some help here guys. Thanks. <!DOCTYPE html> <html> <head> <title>Tasks for the day</title> <script...

Need help getting this simple ferenheit to celcius application working in java

java,swing,event-handling,awt
I need this application to convert the number entered by the user in the JTextField into celsius and display it in a JLabel. It seems to be having problems parsing the the data entered into a double? This is one error among many. Can anyone help me figure out whats...

I cannot get the id of the span using jquery

javascript,jquery,html,event-handling
Hi how can I get the id of my span using jquery. I tried some attempt but it's not working nothing is being log in console. $(function () { for (var id = 0; i < data.length; i++) { var dynamicli = '<li class="">' + '<img src="path/to/image" class="_xy">' + data[i].name...

WPF MouseEnter event is fired if spacebar is pressed

c#,wpf,button,event-handling,mouseenter
I want to handle a buttons MouseEnter event only for mouse actions. So I have to detect if MouseEnter is triggered by mouse or by keyboard. private void button_onMouseEnter(object sender, MouseEventArgs e) { Button button = (Button)sender; if (!button.IsMouseOver) return; // not working if (!button.IsMouseDirectlyOver) return; // not working ......

Trouble with a common-class object listener in Javascript?

javascript,events,event-handling,onbeforeunload
I have the following Javascript: function save_data_check(e) { var input_value = $('.input-right').text(); if (input_value !== "") { if(!e) e = window.event; e.cancelBubble = true; e.returnValue = 'You have unsaved data on this page.'; if (e.stopPropagation) { e.stopPropagation(); e.preventDefault(); } } } window.onbeforeunload = save_data_check; The intended function of this code...