Questions tagged [events]

22713 questions
1

votes
1

answer
658

Views

Laravel-5.5 Event-Listener not working

I want to create rows in carts table for new users When they registered. For this reason, I created UserRegistered (event) and CreateNewCart(listener) classes. I read docs and watch some youtube videos then I tried what they did. But didin't work for me.. Event; public $user; public function __cons...
1

votes
0

answer
187

Views

Google analytics events showing in real-time view, but not archived

I'm using Google Analytics in Appengine. I'm tracking events server side with this code: Map map = new LinkedHashMap(); map.put('v', '1'); // Version. map.put('tid', gaTrackingId); map.put('cid', '555'); map.put('t', 'event'); // Event hit type. map.put('ec', encode(category, tru...
Giovesoft
1

votes
1

answer
221

Views

How to debug request-promise MaxListenersExceededWarning

I've been working on a set-up script for a database and this evening I began getting some MaxListenersExceededWarning warnings in my console. I debugged the warnings to be coming from specific request-promise-native calls. I initially thought it may have something to do with payload size; however th...
E.Arrowood
1

votes
1

answer
300

Views

how to unsubscribe an event with parameter(s)?

In my WPF program, I need to set aircraft failure for a flight simulation software. For example, if I click 'Fire Engine 1' button on MainWindow, private DispatcherTimer DT; private void button_Engine_1_On_Fire(object sender, RoutedEventArgs e) { SettingFailureCondition('Fire engine 1'); } Then a p...
Jeff
1

votes
0

answer
274

Views

JavaFX: detect when Node is rendered

How can I detect when a Node is rendered? I tried with this code in the controller: private boolean isRendered = false; @Override protected void layoutChildren() { super.layoutChildren(); if(!isRendered){ do_something(); } isRendered = true; } And it works quite good, but there is a bit of lag betwe...
GinoC
1

votes
1

answer
42

Views

javascript event targeting a list item but not it's elements

I have this dom and JS: var searchInput = document.getElementById('searchInp'); var suggestions = document.getElementById('suggest'); suggestions.addEventListener('click', function(evt) { var pressed = evt.target.textContent; searchInput.value = pressed; }, false); examplesomething test senten...
Tadas Blinda
1

votes
1

answer
60

Views

Good way to handle global commands with Redux?

I've got a React/Redux application where I have a number of global commands that can be called in various ways - via context menu, via shortcut, or by clicking on a button. These commands are then handled in the place relevant to the command (for example if the command is 'save', it is handled by t...
laurent
1

votes
0

answer
30

Views

FileSystemWatcher: Created event didn't fire on file creation

I have one Window service, which is watching (Subscribing) a shared location on some other server as below (Using FileSystemWatcher): _fileSystemWatcher = new FileSystemWatcher(filePath); _fileSystemWatcher.Created += FileSystemWatcher_Created; _fileSystemWatcher.IncludeSubdirectories = true; _fileS...
Karan Singh
1

votes
1

answer
119

Views

Stopping clicks on object on one stage going through to the nextStage in EaselJS / CreateJS

I have two canvases and two stages in CreateJS / EaselJS. The first stage has autoClear set to false and I am doing dynamic drawing on it starting with a stagemousedown event. The second stage uses nextStage to send mouse events to the first stage. The second stage has interface such as a Bitmap t...
Dan Zen
1

votes
0

answer
30

Views

How to send longpressed KeyEvent with Java code?

How to send longpressed KeyEvent with Java code ? I have seen some examples where they use shell commands to achieve that goal, but I want to know is there a way to do it only by Java. The idea is to send longpressed KeyEvent from the remote controller application to Android Box.
abrutsze
1

votes
1

answer
302

Views

ANGULAR - What event to detect if on pressing a key out of an input [duplicate]

This question already has an answer here: Angular 2 Global Key detection 1 answer I use Angular and i don't found who detect if on pressing key out of an input... I try this : But it does not work If you can help me! :p (Sorry for my bad english)
Kérian Pelat
1

votes
2

answer
618

Views

Should Laravel Eloquent Model observer events return the object?

For example namespace App\Observers; use App\Models\User; class UserObserver { public function saving(User $user) { $user->epoch = time(); $user->save(); // or even this return $user; // should I do this or not? } } I cannot find any good documentation about the model events when they are called...
Thomas
1

votes
1

answer
30

Views

Displaying which list item was clicked

I've been trying to wrap my head around closures in Javascript and how things are executed (or rather - in which order they are executed). Here is my example: lets say I have an unordered list of items and when I click on one of them I want to print out which item was clicked. I know the solution bu...
wasteland_
1

votes
1

answer
187

Views

Button Pass Onclick Event

I have a button.tsx with a onClick property. import * as React from 'react'; interface Props { className?: string; text: string; onClick?(event: React.MouseEvent): void; type?: string; } const submitButton = (event: React.MouseEvent , props: Props) => { event.preventDefault(); props.onClick(event);...
1

votes
1

answer
429

Views

insert event in google calender using php

I am trying to add event in Google Calendar using PHP. Following is my code: $event = new Google_Event(); $event->setSummary('Halloween'); $event->setLocation('The Neighbourhood'); $start = new Google_EventDateTime(); $start->setDateTime('2018-1-19T10:00:00.000-05:00'); $event->setStart($start)...
laurel
1

votes
1

answer
173

Views

Testing assertDispatched only works when using event helper

Registering service provider: public function register() { $this->app->singleton(CartInterface::class, function ($app) { return new SessionCart($app['session'], $app['events']); }); } Firing events within the service above: $this->events->fire('cart.added', $item); Testing the service: public functi...
rzb
1

votes
4

answer
351

Views

Zoom only when Ctrl + scrolling

I've been messing with the D3JS source code. What I want to achieve is only allow zooming with the Scrolling (Just like Google Maps), if CTRL is pressed too. I've been messing with the complete D3: https://d3js.org/d3.v4.js I was trying to achieve this around line 16556: function wheeled() { if (!fi...
CAJ69I
1

votes
1

answer
178

Views

Tooltip with own event listeners

Sorry if this is partially duplicate, couldn't find any satisfactory answer. I have a d3 graph that consists of a line with points. My points have events that make a tooltip appear/disappear, see below: var div = d3.select('body') .append('div') .attr('class', 'tooltip') .style('opacity', 0); var po...
ddsLeonardo
1

votes
0

answer
1.1k

Views

Disable or remove service worker

Hi I would like to stop or unregister the service worker in my server. Upon checking our server through chrome browser its running a service worker. I would like to stop any execution of this script or stop it on the server itself. Is there any way to stop this without renaming the service worker sc...
MadzQuestioning
1

votes
0

answer
34

Views

Is it possible to incorporate html events with java?

I will call the java function to upload file to server once file is changed. Is this possible? If so what do I do to do it? Thanks in advance.
MBJH
1

votes
1

answer
47

Views

Dojo class event listener disappears upon subsequent instantiation

I have a simple class called Draggable, which has a Moveable and a click event listener: define([ 'dojo/dom', 'dojo/query', 'dojo/dom-style', 'dojo/dnd/Moveable', 'dojo/_base/declare' ], function( dom, query, domStyle, Moveable, declare ){ return declare(null, { constructor: function(id){ this.id =...
Asher Chee YiLiang
1

votes
1

answer
184

Views

Workday system event outbound subscriptions

We are working on a use-case where in we need to get real time updates from Workday systems for the events occurring in Workday Systems. I have read some articles stating that this can be achieved using Workday Event Subscription capabilities. However I did not found detailed public documentation av...
user1728578
1

votes
1

answer
218

Views

Listener not triggered by the event dispatcher

I want to execute symfony function after returning response in controller. How can I do that ? Here are all classes I used: Define all events : here we have only one event defined inside this class
user7350434
1

votes
0

answer
72

Views

Request user input in pre or post build event - Visual Studio

I want the user to approve an action in the pre or post build event by requesting an user input - like 'y' or 'n'. Thereby the user can cancel the task if he forgot to switch the Configuration by mistake for example. if $(ConfigurationName) == Release ( //ask user to type in some text ) Can someone...
LM358
1

votes
1

answer
2.1k

Views

ionic 3 Keyboard events, keycode always 0

I am trying to control what a user can type to a specific input in my ionic 3 app. For example i have an input type='text' that i am allowing only numbers and underscores to it, and i am trying to achieve this using keyboard event. This works on browsers but not on actual android, since all keyCode...
George
1

votes
0

answer
58

Views

How to get page cursor position in Input Box

Given a Javascript keyup event in an input box, how do I determine where on the screen that blinking cursor is? I'm trying to position a popup box based off of that cursor position inside the input box. For mouse clicks I get pageX and pageY properties, but not for key events. The best thing I can t...
writofmandamus
1

votes
1

answer
50

Views

JavaScript DOMContentLoaded event is skipped

I made a simple page for testing: // console.log('script run'); // document.addEventListener('DOMContentLoaded', function(event) { // alert('DOMContentLoaded event'); }); Test DOMContentLoaded And, sometimes (maybe once in 30 requests) DOMContentLoaded event is skipped. Perhaps this is due to incor...
Reads
1

votes
1

answer
338

Views

Saga Choreography implementation problems

I am designing and developing a microservice platform based on the specifications of http://microservices.io/ The entire framework integrates through socket thus removing the overhead of multiple HTTP requests (like most REST APIs). A service registry host receives the registry of multiple microserv...
Victor França
1

votes
2

answer
134

Views

ES6 native Promise from Factory Function

I'm doing a deep dive into ES6 native Promises. Along the way I came across some articles that quote Douglas Crockford design choices regarding not using things like new, Object.create, this, etc. Some people are advocating the use of Factory Functions over constructors. I have also learnt that the...
sansSpoon
1

votes
2

answer
43

Views

How can i read, edit an old array and save the new array in Javascript?

I have a small problem please help me!! I have a simple script in JSFiddle. More specifically, first of all i have a txt with coordinates and an id for each pair of coordinates. This txt is shown here: { 'displayFieldName': '', 'fieldAliases': { 'FID': 'FID', 'Id': 'Id', 'Longtitude': 'Longtitude',...
Irini K.
-3

votes
0

answer
16

Views

Why is Safari much slower to handle a click event than chrome or firefox?

I have a grid like visualization created with D3 in which for each row of data, I attach a click handler onto the row label text (svg text element). In chrome and firefox, the click handler receives the event and performs the behavior in less than a second. In Safari, it takes upwards of 10 seconds...
user2518159
1

votes
0

answer
34

Views

C# Charting - How to prevent auto refresh for AddXY Method

I have a windows forms application with a chart. private System.Windows.Forms.DataVisualization.Charting.Chart myChart; Whenever I add points to that chart with: myChart.Series[0].Points.AddXY(x, y); the chart updates and respectivly also raises an event. I don't want to update the chart upon adding...
CaptIglu
1

votes
1

answer
403

Views

Custom Events with different trigger element and listener element

var event = new CustomEvent('custom-event', {bubbles:true, detail:'something'}); var eleA = document.getElementById('A'); var eleB = document.getElementById('B'); eleB.addEventListener('custom-event', function(e) { console.log('custom-event caught in element B', e.detail); }); document.addEven...
RmR
1

votes
0

answer
197

Views

Needed to open infowindow when mouseover polygon in Google maps

I would like to have the same functionality on google maps with the info window on mouse hover over a postal code as they have it on the site in the link below: https://www.bloomberg.com/graphics/property-prices/london/?utm_content=graphics&utm_campaign=socialflow-organic&utm_source=twitter&utm_medi...
user3931314
1

votes
1

answer
117

Views

Freehand drawing Gtk / set_event_compression(false) does not work

I'm developing a graphic software with GTK+ (gtkmm) and want to build a free hand drawing feature. I connect to the signal_motion_notify_event on a Gtk::EventBox and set set_event_compression to false on the event box. I also set set_event_compression(false) on the window containing the event box, b...
Arch Linux Tux
1

votes
0

answer
74

Views

How to find the origin of a browser event

My web application started firing off a ton of events while idle and I've been trying to hunt down who has been firing them. I received a Chrome performance profile from a client and discovered that the events are being fired from the root of execution. This makes me believe that the events are comi...
Jason Lee
1

votes
2

answer
55

Views

Triggering different functions on click event based on innherHTML

When I load page, change to green button displays. When I click on that button, change to purple button displays. But when I click on the button again (based on innherHTML), expected function(onePurple()) is not triggered, but twoGreen() is triggered. I am trying to execute code based on innerH...
user7331530
1

votes
0

answer
260

Views

Greasemonkey Window.open.onload not working

I am writing a greasemonkey script which looks like the following // ==UserScript== // @name Button // @namespace http://test.com // @include * // @version 1 // ==/UserScript== //Creating the button input starts var input=document.createElement('input'); input.type='button'; input.v...
Sarthak Batra
1

votes
0

answer
35

Views

What is the purpose for registering multuple PrintPageEventHandlers to PrintDocument's PrintPage?

If I register two separate PrintPageEventHandler's and print, then the first event fires off and prints the pages, and then the second event fires and starts from the beginning, printing over the original text. What I currently understand is if I register one event, and set PrintPageEventArgs.HasMo...
eaglei22
1

votes
1

answer
51

Views

C# WinForm custom control events not trigger

I am developing a project in visual studio using Winform. A part of project contains displaying pdf files. I am using opensource library installed via nuget - PfiumViewer by Pieter van Ginkel The loading and everything works fine but no clicks events are firing. I have checked the events with all o...
Danish Khan

View additional questions