Search Results

Search found 8111 results on 325 pages for 'events'.

Page 7/325 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • What are lightweight events?

    - by Vitali Climenco
    Ran a handful of times into the term lightweight event. The texts were not accompanied by any code snippets to figure out the idea behind the term. I would really appreciate it if anyone could explain what are lightweight events about and throw in an example.

    Read the article

  • Where to wire up events?

    - by Jeffrey Cameron
    I'm using Ninject (1.5 ... soon to be 2) and I'm curious how other people use Ninject or other IoC containers to help wire up events to objects? It seems to me in my code that I'm doing it herky-jerky all over the place and would love some advice on how to clean it up a bit.

    Read the article

  • waiting for 2 different events in a single thread

    - by João Portela
    component A (in C++) - is blocked waiting for alarm signals (not relevant) and IO signals (1 udp socket). has one handler for each of these. component B (java) - has to receive the same information the component A udp socket receives. periodicaly gives instructions that should be sent through component A udp socket. How to join both components? it is strongly desirable that: the changes to attach component B to component A are minimal (its not my code and it is not very pleasent to mess with). the time taken by the new operations (usually communicating with component B) interfere very little with the usual processing time of component A - this means that if the operations are going to take a "some" time I would rather use a thread or something to do them. note: since component A receives udp packets more frequently that it has component B instructions to forward, if necessary, it can only forward the instructions (when available) from the IO handler. my initial ideia was to develop a component C (in C++) that would sit inside the component A code (is this called an adapter?) that when instanciated starts the java process and makes the necessary connections (that not so little overhead in the initialization is not a problem). It would have 2 stacks, one for the data to give component B (lets call it Bstack) and for the data to give component A (lets call it Astack). It would sit on its thread (lets call it new-thread) waiting for data to be available in Bstack to send it over udp, and listen on the udp socket to put data on the Astack. This means that the changes to component A are only: when it receives a new UDP packet put it on the Bstack, and if there is something on the Astack sent it over its UDP socket (I decided for this because this socket would only be used in the main thread). One of the problems is that I don't know how to wait for both of these events at the same time using only one thread. so my questions are: Do I really need to use the main thread to send the data over component A socket or can I do it from the new-thread? (I think the answer is no, but I'm not sure about race conditions on sockets) how to I wait for both events? boost::condition_variable or something similar seems the solution in the case of the stack and boost::asio::io_service io_service.run() seems like the thing to use for the socket. Is there any other alternative solution for this problem that I'm not aware of? Thanks for reading this long text but I really wanted you to understand the problem.

    Read the article

  • How to load dynamic events in Flex

    - by user309010
    Hi All, I have a small flex application. What I want to achieve is, I want my user to pass the script as a parameter. so he has the flexibility to do anything with the buttons-like add event, hide the other buttons. Something like this(below) <param name="script" value="import flash.events.Event;\n private function printMessage(event:Event):void {\nmessage.text += event.target.label + " pressed" + "\n";\n}"> Thanks.

    Read the article

  • Strategy for wiring up events?

    - by Jeffrey Cameron
    I'm using Ninject (1.5 ... soon to be 2) and I'm curious how other people use Ninject or other IoC containers to help wire up events to objects? It seems to me in my code that I'm doing it herky-jerky all over the place and would love some advice on how to clean it up a bit. What are people doing out there to manage this?

    Read the article

  • Flex Flash Action Script Form Events

    - by peiklk
    Doing some development in Flash Builder 4 using Action Script 3.0. I'm trying to have some code run each time the form is displayed. The form is not always recreated, but sometimes hidden and reused. Visual Basic used to have an Activate event that does similar to what I want. I tried Render, but that fires every time the form changes (via click, text-edit, etc.) We tried the FlexEvent.ADD, but it only fires when the form is first created, same as creation_complete. Is there a good resource that shows the form "life cycle" and all the events and when they are fired and in what order? TIA! NOTE: I'm trying to get our forms to close when the ESC is pressed.

    Read the article

  • jqtransform form events problem

    - by Newbie
    I'm a web designer with css experience, but I'm not a JS developer. I used jqtransform to style a search form , the problem is it removes all events from selectors and the search button . here is the code before jqtransform <input id="go-search" type="button" name="btn_search" value="search" onclick="searchLocations()" /> and after applying the script, the button doesn't do any thing I opened the page source and here how it looks like: <button class=" jqTransformButton" type="button" name="btn_search" id="go-search"><span><span>search</span></span></button> Please help me !

    Read the article

  • One project in Delphi 2007 doesn't show procedure name in the IDE Obj Inspector's Events

    - by lgallion
    I have a Delphi project in 2007 that doesn't show the procedure names in the Object Inspector's Events such as Form OnClose, OnCreate or OnShow in the IDE. The code is there and if you click on OnCreate (for example) you are taken to the code and the IDE fills in the name of procedure. However on reload, the procedures are missing from the IDE again. This same project causes various error messages when Delphi closes also, but I am not sure if this is related (no other project developed under this Delphi does but this one is the largest app and uses several 3rd party add-in libraries). I have moved this app to various Delphi 2007 installations and it reacts the same, so it isn't a corrupt Delphi situation. Is there any way to rebuild or fix a corrupt project like this? Any help would be appreciated.

    Read the article

  • MooTools events not firing in IE8

    - by gregory
    I have a Mootools asset created like so: // Create a new asset var asset = new Asset.image(path, { title: this.language.download, events: {click: this.download.bind(this, link)}, }); I have a method of a MooTools object defined as such: download: function(e) { // The path to download console.log('download: ' + e); }, In Firefox the console.log print shows up. In IE8, however, I have no luck. Am I missing something? Any tips or advice would be greatly appreciated. TIA!

    Read the article

  • How to give highest priority to events generated from main thread than those generated from secondar

    - by martjno
    I have a c++ application written in wxWidgets, which has a main thread (GUI) and a working thread (calculations). The working thread executes commands requested by the main thread and communicates the result to the main thread posting an event after every step of the processing. The problem is that when the working thread is sending many events consecutively, the gui requests made by the user (i.e. interrupt the processing clicking a button) won't be processed by the event handler until the working thread has finished. This is actually happening on OSX, on Windows it works perfectly. I've tried to wxThread::SetPriority and wxThread::Yield but nothing changes. It is working if I put wxThread::Sleep in the working thread, but this slows down very much the processing.

    Read the article

  • Querying current number of touches on screen without using events on iPhone

    - by nikhil
    I have an application that starts playing a sound when user touches the uiview and changing to different tones as the user slides the finger on the screen. The sound stops when the user lifts the finger. I am using the touchesBegan, Moved and Ended Events for this. My problem is touches Ended (and/or cancelled) is sometimes not fired properly and the sound keeps playing even after the finger is lifted from screen. So as a workaround I would like to implement a timer that would check for the number of touches on the screen and if it is zero it will check and stop the audioplayer if playing. I have been searching for some code that could get me the number of touches like UITouch *touches=[self getAllTouchesonScreen]; or something :)

    Read the article

  • Capturing USB Plug/Unplug events in Firemonkey

    - by radsdau
    [RAD Studio XE3 / C++] I have a FMX project running in Windows only at this stage, but I need to detect events when USB devices are connected and disconnected. I have a similar VCL app that can do this fine, but the Application-HookMainWindow is not exposed in FMX (only VCL). Is there an elegant way to handle this? Or do I have to hack some VCL stuff into my FMX app to make that work? I'd imagine I have to abstract it so I can support other platforms down the track. For the meantime though I need to get the Windows solution working. If the 'VCL hack' thing is required, how would I reference the vcl::Forms::Application from within my Fmx app? Cheers.

    Read the article

  • Race condition firing events in AS3

    - by crispclean
    Hello I have some troubles firing and removing events in the right chronicle order. The code below gives the following output: save poster into db, and dispatch event calling service, dispatch event removed = false calling service, dispatch event removed = false calling service, dispatch event removed = true save poster into db, and dispatch event save poster into db, and dispatch event of course this should be more something like: save poster into db, and dispatch event calling service, dispatch event removed = true save poster into db, and dispatch event calling service, dispatch event removed = true save poster into db, and dispatch event calling service, dispatch event removed = true Can someone help me with this? I'm running out of ideas on how to tackle this. thx! for(var i:int = 0;i< 3;i++){ createPoster(); } function createPoster(){ Main.db.savePoster(); Main.db.addEventListener(Config.evt_SAVEPOSTER_READY, callService); } function callService(){ Main.db.removeEventListener(Config.evt_SAVEPOSTER_READY, callService); }

    Read the article

  • Opting out of `dragenter` and `dragover` events (html5)

    - by aaaidan
    I have a collection of draggable "content" elements, and a root-level "feedback" UI element which is displayed above them to provide feedback during drag and drop. The problem is, during the drag operation, hovering over the "feedback" element causes the dragenter and dragover events to be fired on that element, rather than the underlying content element. It effectively "blocks" the dragenter event from firing on the correct element. Is there a way for an element to cancel, or "opt out" of a dragenter/dragover event? I could display the feedback element underneath the content, but I'd rather not do that. jsFiddle: http://jsfiddle.net/jact8/1/ I'm using the HTML drag/drop api, not jQuery or anything like that.

    Read the article

  • flex custom events bubbling

    - by Rajeshbabu TRC
    Dear Richard Szalay, i go through your answers regarding bubbling, i want explore bubbling more. Please see my sample below <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" xmlns:view="com.view.*" > } ]] In my custom event class i set bubbling=true, cancelable=true I can understand from previous answer that bubbling only affects UI components; events fired from custom classes will not bubble, even if the bubbles argument is set to true. My question is how can i prevent panelClickHandler function got fired when i click button in the "Load" (custom component)?? pleas explain bubbling with good example ( like to have with custom event classes)?

    Read the article

  • Limited options for accessing events in derived classes?

    - by maxp
    Im refactoring a class, and moving sections into a base class. I have a few events similar to public event EventHandler GridBinding; Which are now in the base class, but i am finding i cannot now check to see if the event is null in my derived class. Doing so gives me the error: The event 'xyz.GridBinding' can only appear on the left hand side of += or -= (except when used from within the type 'xyz._MyBaseClass'). Is this correct, am i missing anything, or is there any way to get around this or is writing an accessor the only way to do this? I am using c#/.net 4.0

    Read the article

  • Send Keyboard Events from one Form to another Form

    - by thalm
    Hello, my question is quite simple: Our C# application has one MainForm with a menu and several keyboard shortcuts associated with the menu entries. Now we need to trigger the menu entries from some child forms too. But since the MainForm is inactive when one of the child forms is active, the shortcuts do not work. Is there a simple way to propagate all keyboard events from the child form to the 'Owner' form? Or just to another form in general? Ah, and we cannot use some low level windows stuff, because we need to run the application on Mono/Linux too.

    Read the article

  • Passing arguments and values form HTML to jQuery (events)

    - by Jaroslav Moravec
    What is the practice to pass arguments from HTML to jQuery events function. For example getting id of row from db: <tr class="jq_killMe" id="thisItemId-id"> ... </tr> and jQuery: $(".jq_killMe").click(function () { var tmp = $(this).attr('id).split("-"); var id = tmp[0] // ... } What's the best practise, if I want to pass more than one argument? Is it better not to use jQuery? For example: <tr onclick="killMe('id')"> ... </tr> I didn't find the answer on my question, I will be glad even for links. Thanks.

    Read the article

  • Question about when and when not to raise events (C#)

    - by NoPyGod
    I am programming an instant messaging library for MSN Messenger, and I have a simple question about raising events. When logging in, should I be raising UserAdded for each user that is synchronized (already on the contact list), or should the UserAdded event be reserved for when a new user has been added to the contact list via the AddUser method? Should I perhaps use another event, UserDownloaded for when a user is downloaded? Similarly, when I call logout, should I call UserRemoved? I hope this makes sense. Thank you

    Read the article

  • MooTools - Programmatically fired events not working with event delegation

    - by Anurag
    Would really appreciate if anyone can help me figure out why I am unable to fire events programmatically when using event delegation in MooTools (from the Element.Delegation class). There is a parent <div> that has a change listener on some child <input> elements. When the change event is triggered by user actions, the handler on the parent div gets triggered, but when I fire it programmatically with fireEvent on any child input, nothing happens. The basic setup is: html <div id="listener"> <input type="text" id="color" class="color" /> ????????????????????????????????????????????????????????????????</div>??????????? js $("listener").addEvent("change:relay(.color)", function() { alert("changed!!"); }); $("color").fireEvent("change"); // nothing happens The event handler on the parent div does not get called. Any help is appreciated. Cheers!

    Read the article

  • Manage multiple Jlabel's events

    - by IMAnis_tn
    I have a left Panel with multiples Jlabels which i use them as buttons to change a Main Panel's content which is layouted with a CardLayout. I cant work perfectly with these events: mouseEntered : to make highlight effect to the jlabel mouseExited : to take off the highlight effect. mouseClicked : to change the content of the main Panel and start some threads The problem here that can't found an event or a method tell me that another Jlabel has been clicked so i can stop my threads started in the mouseClicked event, OR an event or method tell me that a JPanel in the CardLayout has been displayed or hidden.

    Read the article

< Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >