Search Results

Search found 15729 results on 630 pages for 'event'.

Page 12/630 | < Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • How to get a continuous Touch Event?

    - by daliz
    My class extends View and I need to get continuous touch events on it. If I use: public boolean onTouchEvent(MotionEvent me) { if(me.getAction()==MotionEvent.ACTION_DOWN) { myAction(); } return true; } ... the touch event is captured once. What if I need to get continuous touches without moving the finger? Please, tell me I don't need to use threads or timers. My app is already too much heavy. Thanks.

    Read the article

  • disable event-bubbling c# wpf

    - by Ruben
    Hi, I'm having the following problem: When I got two labels into each other: <Label x:Name="First" MouseUp="Label_MouseUp"> <Label x:Name="Second" MouseUp="Label_MouseUp_1">This is a label into another label</Label> </Label> And the following code: private void Label_MouseUp(object sender, MouseButtonEventArgs e) { Console.WriteLine("Do NOT show me"); } private void Label_MouseUp_1(object sender, MouseButtonEventArgs e) { Console.WriteLine("Show me"); } When i click "Second", I want it to trigger only "Label_MouseUp_1". But in my console i get: Show me Do NOT show me Is there a way to turn off the bubbling events? (also, "First" has to be clickable, so removing the event there doesn't solve the problem) Thnx

    Read the article

  • Programming an Event listener for files in a directory on Linux

    - by Epitaph
    On Ubuntu linux, when you watch a flash video, it gets saved temporarily in the /tmp as flv files while the video buffers. I use vlc to directly play these files. Currently, I have scripted a shortcut that directly scans and opens the latest file in /tmp with vlc, when clicked. But, I want to program a Java application that will continually monitor this /tmp directory for any new flv files, and open it in vlc automatically. I know I can use Runtime.exec() to open the VLC application with the flv files. But, I DO NOT want to run a while(true) loop (with sleep) to scan for files. How can I make use of Event Handling (Java or any other language) on Linux to complete this task?

    Read the article

  • jQuery event handler queue

    - by resopollution
    Overview of the problem In jQuery, the order in which you bind a handler is the order in which they will be executed if you are binding to the same element. For example: $('#div1').bind('click',function(){ // code runs first }); $('#div1').bind('click',function(){ // code runs second }); But what if I want the 2nd bound code to run first? . My current solution Currently, my solution is to modify the event queue: $.data(domElement, 'events')['click'].unshift({ type : 'click', guid : null, namespace : "", data : undefined, handler: function() { // code } }); . Question Is there anything potentially wrong with my solution? Can I safely use null as a value for the guid? Thanks in advance. .

    Read the article

  • jquery target link click event

    - by Don
    $('input[name="iplus"]').click(function() { $(ol).append("<a href='#' title='delposition' class='beschr-"+($("#billsumary ol>li").length+1)+"'>l&ouml;schen</a>"); }); Hi, i like to target the created link like $('a[title='delposition']') and assign a click-event like: $("a[title='delposition']").click(function() { alert("Link klicked ..."); }); ...but this dont work? in order to further on retrieve the classname of that link..

    Read the article

  • Game Key Events: Event or Method Overload?

    - by Ell
    If you were going to develop a game in say, Ruby, and you were provided with a game framework, would you rather act on key up/down events by overloading a method on the main window like so: class MyGameWindow < Framework::GameWindow def button_down(id) case id when UpArrow do_something when DownArrow do_something end end end Or have an event class with which you can make a method and assign a handle to it, like so: class MyGameWindow < Framework::GameWindow def initialize key_down.add_handler(method(:do_something)) end def do_something puts "blah blah" end end Please give your views, which do you think would be better in a game developement area, and thanks in advance, ell.

    Read the article

  • Help with Event-Based Components

    - by Joel in Gö
    I have started to look at Event-Based Components (EBCs), a programming method currently being explored by Ralf Wesphal in Germany, in particular. This is a really interesting and promising way to architect a software solution, and gets close to the age-old idea of being able to stick software components together like Lego :) A good starting point is the Channel 9 video here, and there is a fair bit of discussion in German at the Google Group on EBCs. I am however looking for more concrete examples - while the ideas look great, I am finding it hard to translate them into real code for anything more than a trivial project. Does anyone know of any good code examples (in C# preferably), or any more good sites where EBCs are discussed?

    Read the article

  • AppDomain.UnhandeledException event not fired

    - by Yaakov Davis
    In a WPF application, the app simply crashes, without the above event being fired. (I'm also registered to DispatcherUnhandeledException, which doesn't fire as well.) I conclude that it doesn't fire since the handler is defined to place a log entry. When looking at the log, there's no corresponding entry. It happens in a production environment; I'm unable to point at a particular scenario. I've read few descriptions on scenarios where this might happen, but I still don't have a clear grasp on this. Can anyone share his experience / knowledge on this? How can I find the root of the crash and solve it? Many thanks.

    Read the article

  • jQuery Event Keypress: Which key was pressed?

    - by BlaM
    With jQuery, how do I find out which key was pressed when I bind to the keypress event? $('#searchbox input').bind('keypress', function(e) {}); I want to trigger an submit when ENTER is pressed. [Update] Even though I found the (or better: one) answer myself, there seems to be some room for variation ;) Is there a difference between keyCode and which - especially if I'm just looking for ENTER, which will never be a unicode key? Do some browsers provide one property and others provide the other one?

    Read the article

  • Jquery: change event to input file on IE

    - by cmedeiros
    Hello guys, I already looked all around, and can't find a solution: I have a form to upload files, and it should fire the submit after the file selection. On FF/Chrome it goes weel, and submit the form after file selection, but I can't do this on ie. Already tried with click/propertychange but nothing happens. Some code I already tried: $("#attach").attr("onChange", "alert('I changed')"); $("#attach").live($.browser.msie? 'propertychange': 'change', function(e) { ... }); Any sugestions to I try? Thanks for any help Edit1: I think there's a important information, this input file, is created on the fly, because of it I use .live() to bind the event

    Read the article

  • Catching the Facebook Login Event to change the HTML of the parent page

    - by Arkid
    I am trying to create Facebook based login using Javascript. Once a person clicks a button he should get a div replaced by another div, if he is logged in to Facebook. However, if he is not logged in to Facebook he is asked his Facebook credentials and he logs in. However, we need the user to click the button once more for the div replacement to happen in this case. I want to know if there is a way in which I can catch the Facebook login event and change the div? Is polling a way or there is some other way out. I want to use only Javascript.

    Read the article

  • JavaScript event window.onload not triggered

    - by Bernhard V
    Hi! I've got the following code in a website: window.onload = resize; window.onresize = resize; function resize(){ heightWithoutHeader = (window.innerHeight - 85) + "px"; document.getElementById("haupttabelle").style.height = heightWithoutHeader; document.getElementById("navBar").style.height = heightWithoutHeader; } The onresize works fine, but the onload event never fires. I've tried it in Firefox and Chrome and neither of them works. Thank you for your help and go for the reputation! ;D

    Read the article

  • C# Event Handlers automatically created by WinForms Designer

    - by RHaguiuda
    Just moved from VB.NET to C#. In VB to connect and Event Handler to a Sub we use the Handles clause. From what it seems, this do not exist in C#. After creating a simple application with a button I realize that Window Forms Designer automatically created an EventHandler to my button1_Click function (after I double clicked it), in Form1.Designer.cs with this code: this.button1.Click += new System.EventHandler(this.button1_Click); But, in VB, the WinForms Designer create the Handles clause in my class, in the function header. So, C# create the default EventHandler in designer file, while VB creates in main class with control resides. Is this correct? Am I missing something here?

    Read the article

  • Discrete event simulation framework for .NET

    - by Kuba
    Does anyone have an experience with some discrete event simulation library that could be used in .NET (C#)? Despite the basic functionality for queing events and dispatching them, it would be fine to have some non-deterministic behavior (e.g. failures simulation). I have some tips and I am even considering to write my own, but first, I would like to collect some recomendations. Thanks. Additional info: i'm not looking explicitly for free product, however, the prize matters :) Just to precise the field i need to map, here is the example of a product: http://www.holushko.com/index.html

    Read the article

  • jQuery event binding does not work properly or i can't make it properly working

    - by Saiful
    HTML: <input id="email" name="email" type=text /> <input id="password name="password" type="password" /> JavaScript: var fields = ["email","password"]; for (var i in fields) { var field = $("#"+fields[i]); field.bind({ focus: function() { field.css("border-color","#f00"); }, blur: function() { field.css("border-color","#000"); } }); } My desire action will be as follows: When I place cursor on any of the above fields the input field's border will be red. When I take away the cursor from the field it's border will be black. But the event is occurs only for the password filed whether I place and take away cursor form any of the above fields.

    Read the article

  • How to implement event notification mechanism in AIR

    - by nxhoaf
    Do you know how to implement event notification mechanism in AIR ? For simplicity, consider an example: I want to build two applications: "television" and "remote". Among them, television is implemented using AIR. For the "television" I want to use my remote to send message to the television. How must I do to implement "television" in such way that, it runs in waiting mode and whenever it receives a message from "remote", it will process the message and make a suitable action (i.e. change channel, increase volume...). Thank you in advance.

    Read the article

  • jQuery resize event for div children

    - by Frank Michael Kraft
    $("div.content-left > *, div.content-main > *" ).live('resize',function(){alert("Size changed")}); does not work, because the resize event only applies to window resizes. But in my case the divs change size late, because the content is loaded late by an ajax request - or by clicking a panel menu. I definatley need to avoid to register on all individual events of the children (ajax, click), because that can be very many different events and then it is not maintainable.

    Read the article

  • Event Handling for MFC Dialog

    - by Maksud
    This is my second question of the day, pardon me. I am writing a wrapper library to communicate with a scanner device. The source code was in C++ MFC. I am converting it to a plain Dll which will be invoked from C#. So, I am using DllImport in C# to call the wrapper library. Now I am provided with MFC code and the library is a ActiveX Object, at least I think so. class CDpocx : public CWnd { } So in my wrapper library I will have an instance of CDpocx and will call it via C# P/Invoke. But the problem is CDpocx also throws some events which I need to catch. In traditional app, I would just attach an function with it. But How would I attach the events on non MFC class. I have seen something like: BEGIN_EVENTSINK_MAP(CVC60Dlg, CDialog) //{{AFX_EVENTSINK_MAP(CVC60Dlg) ON_EVENT(CVC60Dlg, IDC_DPOCXCTRL1, 1 , OnReadyDpocxctrl1, VTS_NONE) //}}AFX_EVENTSINK_MAP END_EVENTSINK_MAP() OnReadyDpocxctrl1 is the function that handles 1 (Ready) event. How can I gain simmilar function in non MFC class. Regards, Maksud

    Read the article

  • What is the harm in giving developers read access to application server application event logs?

    - by Jim Anderson
    I am a developer working on an ASP.NET application. The application writes logging messages to the Windows event log - a custom application log just for this application. However, I do not have any access to testing or staging web/application servers. I thought an admin could just give me read access to this event log to help in debugging problems (currently a service that is working in dev is not working in test environment and I have no idea why) but that is against my client's (I'm a consultant) policy. I feel silly to keep asking an admin to look at the event log for me. What is the harm in giving developers read access to application server application event logs? Is there a different method of application logging that sysadmins prefer programmers use? Surely, admins don't want to be fetching logging messages for developers all the time.

    Read the article

  • How can i find the trigger of an acpi event ?

    - by n00ki3
    My Server shutsdown . Evertime at midnight. The acpi Event power_button is triggered. at /etc/acpi/events/power_button power_button: # care about the power button event=button/power.* action=/usr/lib/acpid/power_button How can i find out the "Caller" or the Trigger of this event ?

    Read the article

  • C++ Storing variables and inheritance

    - by Kaa
    Hello Everyone, Here is my situation: I have an event driven system, where all my handlers are derived from IHandler class, and implement an onEvent(const Event &event) method. Now, Event is a base class for all events and contains only the enumerated event type. All actual events are derived from it, including the EventKey event, which has 2 fields: (uchar) keyCode and (bool)isDown. Here's the interesting part: I generate an EventKey event using the following syntax: Event evt = EventKey(15, true); and I ship it to the handlers: EventDispatch::sendEvent(evt); // void EventDispatch::sendEvent(const Event &event); (EventDispatch contains a linked list of IHandlers and calls their onEvent(const Event &event) method with the parameter containing the sent event. Now the actual question: Say I want my handlers to poll the events in a queue of type Event, how do I do that? x Dynamic pointers with reference counting sound like too big of a solution. x Making copies is more difficult than it sounds, since I'm only receiving a reference to a base type, therefore each time I would need to check the type of event, upcast to EventKey and then make a copy to store in a queue. Sounds like the only solution - but is unpleasant since I would need to know every single type of event and would have to check that for every event received - sounds like a bad plan. x I could allocate the events dynamically and then send around pointers to those events, enqueue them in the array if wanted - but other than having reference counting - how would I be able to keep track of that memory? Do you know any way to implement a very light reference counter that wouldn't interfere with the user? What do you think would be a good solution to this design? I thank everyone in advance for your time. Sincerely, Kaa

    Read the article

  • ctrl+click or shift+click not always firing the onclick event

    - by Erik
    Hi, I recently discovered that different browsers handle the onclick event differently when the control of shift key is pressed. Same thing for following links with the middle mouse button. <a href="http://www.example.com/" onclick="alert('onclick');">go to example.com</a> Onclick browser support table Mouse Keyboard Chrome Firefox Safari Opera IE5.5 IE6 IE7 IE8 IE9 Left None yes yes yes yes yes yes yes yes yes Left Ctrl yes yes yes yes ? yes no no ? Left Shift yes yes yes yes ? yes yes yes ? Middle None yes no yes no ? N/A no no ? Can someone please fill in the question marks for me? Also; I'm wondering if the behaviour differs for each version of Chrome, Firefox, Safari and Opera. Finding a logical pattern in this behaviour would be even nicer, but I don't think there is :). Thanks a lot.

    Read the article

  • Calendar gets saved successfully.but edit event force close error

    - by Jast Vacaty
    I am trying to add calendar events with my applicatiom. Event gets saved successfully. However when i try to edit that event in Calendar. I get Force Close error. String calId = ""; Cursor userCursor =getContentResolver().query(Uri.parse(content://com.android.calendar/calendars),null, null, null, null); if(userCursor.getCount() > 0){ userCursor.moveToFirst(); calId = userCursor.getString(userCursor.getColumnIndex("_id")); } ContentValues event = new ContentValues(); event.put("title", "title"); event.put("description", "description"); event.put("eventLocation", "Event Location"); event.put("allDay", 0); event.put("hasAlarm",0); event.put("calendar_id",calId); Calendar mCalendar = Calendar.getInstance(); mCalendar.set(2012, 2, 27,7,00,00); long start = mCalendar.getTimeInMillis(); mCalendar.set(2012, 2, 27,8,00,00); long end = mCalendar.getTimeInMillis(); event.put("dtstart", start); event.put("dtend", end); Uri newEvent = Uri.parse(content://com.android.calendar/events); getContentResolver().insert(newEvent, event); ContentValues values = new ContentValues(); userCursor.close(); But when I change event.put("allDay", 0); to event.put("allDay", 1); Event gets saved successfully and gets edited successfully. How do I fix it? Using 2.3.5 device. Appreciate any help. thanks.

    Read the article

  • Passing additional parameters to JQuery bind event function

    - by kazim sardar mehdi
    To pass the additional parameter to the event function pass an array of key value, as the second parameter to the bind event bind('click', { message: time }, onClick); e.g { message: time } and access it in the function using event(function parameter).data.message(key)   <div id="div1" style="border: 1px solid black; width: 100px; height: 100px">click me</div> <script type="text/javascript"> function onClick(event) { alert(event.data.message); } var time = "loaded at:" + new Date().toString(); $("div.#div1").bind('click', { message: time }, onClick); </script>

    Read the article

< Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >