In the Observer pattern, an event handler is the function or method called on an observer listening for an event dispatched by the subject. Also known as an event listener.
Questions tagged [handler]
3718 questions
1
vote
2 answers
Click function, inside .off removed handler, want it back
Need Your help.
I want to:
Click on DIV makes it .active
Click on SPAN inside DIV removes the .active from THIS DIV
There's DEMO of the way i tried to do this:
http://jsfiddle.net/2RwJJ/
$('div').on( 'click', function() {
if…

Twardy
- 45
- 4
1
vote
3 answers
Launching a new Activity from a Handler
I have a client/server application that needs to be able to launch different Activities. I have a working TCP thread that runs continuously in the background and a working handler in my MainAcitivty which the TCP thread uses to send messages. The…

Steve
- 33
- 7
1
vote
1 answer
Communication from App to a SystemService in Android
I'm essentially trying to create a SystemService in Android. I read that intercommunication from an app to this service should be handled by a Handler?
So what about returning some object from the Service's function to the calling app? How can this…

Adi GuN
- 1,244
- 3
- 16
- 38
1
vote
1 answer
How to trigger the handler of a button?
How is it possible to trigger the handler of a button in gWidgets2? Take this example:
w <- gwindow("Buttons", visible=FALSE)
g <- ggroup(cont=w, horizontal=FALSE)
## various buttons
## without icon
b2 <- gbutton("ouvrir", cont=g)
## with a…

landroni
- 2,902
- 1
- 32
- 39
1
vote
3 answers
android: Handler not working at all
I am tgrying to run a handler that changes the text on a button ever second but it is not running at all, i get no error message or nothing.
here is the code
Button letterButton;
Handler handler;
String[] alphabet = { "A", "B", "C", "D", "E", "F",…

user3439273
- 125
- 1
- 2
- 12
1
vote
1 answer
Thread created in service. After thread is executed, I need to create an activity. Do not know how to start an activity from a background thread
I have a service. The service starts another thread on completion of which I need to start a new fragmentactivity called MapPage.class which displays a google map. The thread gets a json from a server which contains GPS coordinates. I am saving…
user3360010
1
vote
1 answer
Remove Event by Name
i want to Remove a specific handler from a WinForms Control with VisualBasic .Net.
For example:
I have a Windows.Forms.ToolStripButton with a Click-Event registered to save Data.
Now i need to remove this Event from the Button, but I have no access…

gangfish
- 138
- 16
1
vote
0 answers
Synchronizing UI update with PostDelayed()
I'm new to Android development, and running into a synchronization issue. I made a simple matching game where you flip two cards over at a time, and try to find matches. What I want to do is flip the previous two cards over if either:
The user…

Jason D
- 11
- 2
1
vote
0 answers
Handler does not stop on Destroy or on Pause of activity
I am having problem with chatting app , I am trying to run chat receiver functionality using handler such that as soon as messages are received they are taken care of and displayed on screen . But it fails when I try to go back and resume the…

Harshit
- 1,207
- 1
- 20
- 40
1
vote
1 answer
Hooking to HttpApplication.BeginRequest with runtime generated handler causes NullReference Exception
After hooking up to an event HttpApplication.BeginRequest (and some other HttpApplication events) with a runtime generated delegate like
var expr = Expression.Lambda(Expression.Empty(),
new[]
{
…

Vikingkom
- 21
- 2
1
vote
0 answers
orientation changes detection with respect to time
try{
screenOn = intent.getBooleanExtra("screen_state", false);
rotation = intent.getStringExtra("rotation");
orientation = intent.getStringExtra("orientation");
}catch(Exception e){}
if…

Swapnil
- 654
- 7
- 27
1
vote
2 answers
Alternative condition classes and handlers/restarts that can modify the original expression(s)
Inspired by this awesome post I felt like playing around with condition handling a bit more.
I think I got it all figured out for warning and error (didn't check message in detail yet), but out of pure interest at this point I wondered
How the same…

Rappster
- 12,762
- 7
- 71
- 120
1
vote
3 answers
StopService or Remove Handler Callbacks (Battery Consume)
I have a android service wich needs to be running even if activity is closed!
If screen get OFF the service does not need to do anything.
If screen get ON the service start their work!
So my question is, its better remove all handler callbacks…

Trxplz0
- 371
- 1
- 2
- 13
1
vote
1 answer
Passing a parameter though an event handler
I want to pass List < int > ScoresList through -----------------------------------V
private void lstStudents_SelectedIndexChanged(object sender, EventArgs e)
{
int target = lstStudents.SelectedIndex;
if (target != -1)
…

user3390729
- 53
- 6
1
vote
0 answers
Handler executing faster than expected
I am using handler and its postdelayed method to execute a runnable after every 10 seconds. but It looks like it is executed every second. Here is the code:
final Handler handler = new Handler();
Runnable runnable = new Runnable() {
…

Puneetr90
- 199
- 1
- 6
- 18