Questions tagged [listener]

1

votes
2

answer
48

Views

Observer Pattern on MVC for specific fields

On the MVC pattern, which is the best option for the Model to notify the View (if this is the right approach in the first place) where, from all the fields of data the Model is storing, only a couple of them are updated. Specifically when we only want to update specific fields of the View. I am curr...
Fred
1

votes
3

answer
5.7k

Views

jquery form event listener

it is possible to make an event listener for a form, so that if one did not make an action (select any element from a list for example), the form WILL NOT submit, and eventually display an alert? thank you!
dana
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
2

answer
58

Views

Attatch event listener to all elements by selector in JavaScript from document

In jQuery, you can add an event listener to the document using .on() with a selector as the 2nd argument to listen to all events sent to specific elements, even if the HTML is dynamically changes. It looks something like this: $(document).on('change', 'input:checkbox', onCheckboxChange); How can I d...
Acidic
1

votes
0

answer
34

Views

Make a SQL Server listener

I just finish develop some app that using firebase. In firebase u can make a listener that listen when some data in some table get change. I wondering if there some listener that make the same action but in Sql Server table? Meaning - if some data,- get in, or remove, or just change -in specific tab...
רועי ולנר
1

votes
0

answer
380

Views

Symfony - No Extension Is Able To Load The Configuration (Subscriber/Event Listening) (REST API Exception Handling with JSON output)

Purpose Hello, I am fairly new to Symfony and am trying to create an exception/error handling functionality for our Web API. Requirements When a user makes an invalid request to our API, we want to return a simple JSON object that looks something like the following: {'errorCode': 1234567, 'errorMess...
khgm13
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
0

answer
52

Views

Enter not selecting item from JComboBox in JTable

I have a table with one column of JComboBoxes used for selecting from 3000 IDs from a database. I have implemented an autocomplete function into the ComboBox. When I edit a value from the combobox, and select another value with the arrow keys and press the enter key, it does not set the selected ite...
Muzgar15
1

votes
0

answer
40

Views

get spark stage total number when application starts

I want to calculate rate of process on Spark .Using Spark Listener,running stage id can be acquired . But how can I acquire total number of stages the application contains.Should I make it manually? Thanks.
shicheng
1

votes
0

answer
236

Views

Is there any method similar to getEventListeners that can be used in chrome extensions or even pure JS?

Basically I'm making an extension that provides analytics based on the elements of a page. As the total number of elements often reaches numbers >5,000 but the elements with click events tied to them (the only ones I care about) are usually
jamezyx
1

votes
0

answer
255

Views

Disable Notification Pop Up in Status Bar Notification in Nougat

I am using NotificationListenerService to clear the notification as soon as it is posted. I am using the following code to achieve it. public class NotificationListener extends NotificationListenerService { Context context; @Override public void onCreate() { super.onCreate(); } @Override public void...
Rahul Sharma
1

votes
0

answer
361

Views

Count notification from Firebase notification in Android

I want to count notification when received before make Shortcut Badge on my app icon. Now, I can make Shortcut Badge and create php file for send notification from Server sucessful. But I have a problem I can't count notification for show number by Shortcut Badge. I will try NotificationListenerSe...
sirinan jirinsa
1

votes
1

answer
118

Views

Call a command within a listener

I have a pretty complex command (not written by me) in my symfony API to send notifications, and I would like to have it run everytime a PostPersist event happens. For this, I've set up a listener triggered by the PostPersist event and this part works perfectly. However, I can't manage to launch th...
SKMTH
1

votes
1

answer
124

Views

LabVIEW: How to listen to property changed in .NET from LabVIEW

I am writing a .NET library for LabVIEW to control our camera. I am not sure how to read property changed in .NET from LabVIEW. For example, when we want to capture 10 images I want LabVIEW know when the 10th image is ready. In the .NET library I have Camera::Status property and this property gets...
user1296153
1

votes
3

answer
232

Views

Clear Non Removable Notifications

I am making notification blocker which removes selected applications Notifications. I have used the snippet in my Notification Listener Service as, @Override public void onNotificationPosted(StatusBarNotification sbn) { if(SettingsActivity.SettingsInfo.getInt(sbn.getPackageName(), R.drawable.unblock...
Jyoti JK
1

votes
1

answer
134

Views

Selenium + Node.js: is it possible to listen for reoccurring events?

I am working on a site that is heavily powered by AJAX/REST API calls, which broadcast events on completion/failure. What I am trying to accomplish is to listen for these document events and trigger a function in Selenium (Node.js) -- right now I'm settling for a console.log() -- and keep that liste...
Doug
1

votes
0

answer
37

Views

EventListeners for log\history. Doctrine2, Symfony

I want to make custom log \ history in order to track what happened. I have such Entities: -Category -Item -AttrValue -Attributes All of them are related to each other like this: I read it and decided to use EventListeners and write events to the table using doctrine. You do not need to offer to use...
Dialkord
1

votes
1

answer
957

Views

Type error: Argument 1 passed to App\Events::__construct() must be an instance of App\Events, instance of Illuminate\Support\Collection given

I want to send email in laravel 5.5 using Event and listener. But when calling Event on controller I got this Error Message. Type error: Argument 1 passed to App\Events\EMailNotif\UserWorkflowEmail::__construct() must be an instance of App\Events\EMailNotif\App\WFApprover, instance of Illuminate\Su...
Dian.Y
1

votes
4

answer
1.5k

Views

toggle class to show cards

I am writing a memory game in JavaScript. I am at the step where I should add toggleClass, so when the cards are clicked they will be shown. I was told that I should solve this issue with event.target. When I click the cards are being shown, but in tiny icons and not in the boxes where they belong....
melinda
1

votes
1

answer
32

Views

javascript pass media EventListener to html (html5) media.currentTime

*update here is my code edit as you see working) https://codeshare.io/a3ZJ9g i need to pass on a javascript varible to a html link... my original question was here HTML5 video get currentTime not working with media events javscript addEventListener working code: var media = document.getElementById(...
Nance S
1

votes
1

answer
73

Views

SWT Table - Checkbox / Highlight Listeners

I have a SWT Table with check boxes enable on the rows to allow TableItems to be selected. I currently have a listener on there myTable.addListener(SWT.Selection, new Listener() { public void handleEvent(Event selectionEvent) {}}); This listener fires both when a check box for a row is checked and...
Chris Brown
1

votes
1

answer
47

Views

Unir y - how i Put marker in object 3D (.obj) and get the touch listener of it

Ji, im new in unity, im doing an app that is a body of a person, then you can tap/hit on you’re mobile for Example the head and the app changes the to another scene. So what i wanna do is put like kind of buttons in some parts of the body and when the users click it, changes the scene, the proble...
Oscar.Aldaz
1

votes
0

answer
322

Views

WinRM listening on incorrect IP

I have a server where I have configured WinRM using the IP address and HTTPS using the command below. New-Item -Path WSMan:\LocalHost\Listener -Transport HTTPS -Address 'IP:x.y.z.10' -CertificateThumbPrint '' –Force The listener shows OK using the WinRM command. winrm e winrm/config/listener Liste...
user240384
1

votes
2

answer
507

Views

RecyclerView, adapter, click listener and AsyncTask

I'm facing a issue while trying to implement AsyncTask (to fetch datas from USGS site). I've created an adapter to deal with datas and my recycler view. Before implementing the AsyncTask I had an ArrayList of datas already populated and that worked fine. Now I want to make the request dynamic by fet...
Gilles
1

votes
1

answer
157

Views

Notification Listener - onNotificationPosted doesn't work

I'have tried all kind of solutions and code but any of this solutions worked for me, and I don't know why. Please help me. My MainActivity code is: if(isNotificationServiceEnabled()) { Intent i= new Intent(this,NotificationsService.class); i.putExtra('command', 'get_status'); startService(i); } else...
1

votes
0

answer
215

Views

Listen/Watch Azure Blob Storage Containers and download new blobs

I'm trying to create Windows Service, that will listen Azure Storage Account (Containers), and download new files to local folders. I've already created functionality in other direction, which watch (FileSystemWatcher) local folders and send files to the same azure storage. I found that this can be...
1

votes
1

answer
58

Views

symmetry in backref relationships not working as expected with event listeners

I used to think that, in many to many relationships (perhaps for all of the relationships available) parent.children.append(child) and child.parents.append(parent) Were equivalent. I have, however, a rather complex set up which fires up event listeners for the append and remove methods of my classes...
bluesmonk
1

votes
0

answer
178

Views

How to make sure BackHandler doesn't double up for the same event?

So I have the following routes: } drawerLockMode={'locked-closed'}> } title='Help' drawerLockMode={'locked-closed'}> } title='Settings' drawerLockMode={'locked-closed'}> } title='QR' drawerLockMode={'locked-closed'}> in my NavDrawer, I have the following to handle hardware back button: handleBackBut...
Ray Jonathan
1

votes
1

answer
11

Views

Does adding the same listener to a control/property allocate extra memory for the listener spot?

When creating a listener like: InvalidationListener progressListener = new InvalidationListener() { public void invalidated(Observable o) { updateValues(); } }; and then adding the listener multiple times to the same instance/property like: model.getMediaPlayer().currentTimeProperty().addListener(p...
Kevin C
1

votes
0

answer
20

Views

Can you make an ActionListener that would act on JFrame's resizing?

As stated above, I'm trying to make an ActionListener act, when user resizes the window in order to rescale the image i print within it. Is this achievable? In what way? Thanks in advance, nfsu Note: I know this can be achieved via paintComponent method, but i want to do this using this approach if...
nfsu
1

votes
0

answer
127

Views

FirebaseMessagingService not firing callbacks

I wrote a code with a FirebaseMessagingService to read notifications. The app is part android and part react-native. PROBLEM: The FirebaseMessagingService onCreate() is getting called but the onMessageReceived callback is not firing even when the app is in the foreground. Moreover, the notification...
Thanatos
1

votes
2

answer
77

Views

Symfony show EventListener changes in Form

I use Symfony 3.4 and doctrine and have a problem with data changed by an Event Listener. If a form is submitted and a Doctrine PreUpdate EventLister changes an entity value, this is not visible in the form. Example with an entity called Activity which has an attribute $number: /** * @ORM\Entity *...
Sascha
1

votes
0

answer
26

Views

Eventhandler when iframe DOM loaded

I have an iframe with an independent page displayed inside. What i need is an eventhandler on the outer page to be executed when somehow the location/url inside the iframe is changed (like when clicking a link on the inner page that leads to another page, which is then displayed again inside the fra...
Felix
1

votes
0

answer
53

Views

How to check from which satellites gps receives data?

I wrote listener which is getting data from sensor gps(like lon lat etc). I wrote listener which is getting GNSSStatus and calculate constalation. But now how can i know from which constalation(galileo/gps/glonas/...)? I can't use update flag in one listener to gain data from second couse when scree...
ppqq
1

votes
4

answer
314

Views

Listener is Null

I am 100% sure onAttach method is called before onCreate, so how my listener is null? How can I fix that? Basically, if I can get the values from the NameDialog, I will call the another activity(let's say game) that implements NameDialogListener interface, so I will be able to override getTexts meth...
1

votes
1

answer
69

Views

JavaFX - Setting focusedProperty Listener on a custom node

I have a custom TimePicker node that I have made and it is mostly working, but I need to be able to add a listener to check when it Gaines or looses focus. The issue is that it is not detecting when I am focused on it. public class TimePicker extends HBox { private NumberField nbxH; // NumberField i...
MakPo
1

votes
1

answer
219

Views

Symfony get data in controller from a form event listener

I'm using Symfony 3.4, I have a FormType and a Listener for this form on preSubmit and postSubmit In my FormType I run the listener like : $builder->addEventSubscriber(new MyListener()); My problem is, I need in the postSubmit or preSubmit check a condition for get un boolean, and I need this boole...
1

votes
0

answer
36

Views

symfony fos user parameter listerner injection fail

I'm using FOSUserBundle to manage users. I needed to rewrite the listener related to this event. The latter is defined with dependencies as follows: user.password.change: class: AppBundle\Listeners\PasswordResettingListener arguments: ['@router', '@listener1', '@listener2'] tags: - { name: kernel.ev...
Olivier FIllol
1

votes
0

answer
298

Views

Phone State Broadcast Receiver not working

I am trying to get caller phone number and date/time of the call after an incoming call ends then start an activity and pass the data but the Broadcast receiver doesn't work. I added a code to print an message on the console to check if the onReceived method gets called but it never prints. My Andro...
Victor Inyang
1

votes
1

answer
103

Views

matlab figure event listener does not trigger when widow resized

Version: Matlab R2014b XY problem disclaimer: my objective is to make MATLAB format ticks in my graphic with a certain custom function that takes as argument the tick position and outputs a string. Default tick placement is ok but I want to control the labels. Failure to execute the callback functio...
JM114516

View additional questions