events

How events are assigned in .NET

I just realized I don't fully understand why in .NET you assign events using a += symbol. I figured this out yesterday when I needed to remove an event and without thinking I was doing someobject.onsomeevent += null thinking that would just remove the event I had previously assigned. After some investigation, I figured out I had to ...

mouseOver event-mapping on iPad Safari with webkit-user-select: none

I don't have an iPad yet to find this out; have had only a brief opportunity to look at one at the Apple store. Could someone please describe what, if anything, happens to the mouseOver event of an image-map area when the image-map|area has had user-select disabled with "webkit-user-select: none" in the CSS, as described here in section...

epoll_wait: maxevents

int epoll_wait(int epfd, struct epoll_event *events, int maxevents, int timeout); I'm a little confused about the maxevents parameter. Let's say I want to write a server that can handle up to 10k connections. Would I define maxevents as 10000 then, or should it be be lower for some reason? ...

Pass an event into a constructor

I have a class that I want to be able the handle the mouse up event for a grid. I tried to create it with a static method call like this: MyDataBinding.BindObjectsToDataGrid(ListOfObjectsToBind, myGrid.MouseUp); The end goal being that in the method I would assign a delegate to the MouseUp PassedInMouseUp += myMethodThatWillHandleTh...

Why is C# winforms application not working without VS.NET installed?

Hi folks, I have a winforms c# app that has an embedded webbrowser control inside it generated through VS.NET 2008. We sink events by inheriting our events class from HTMLDocumentEvents2. public class IEHTMLDocumentEvents : mshtml.HTMLDocumentEvents2 { public bool onclick(mshtml.IHTMLEventObj pEvtObj) { // Clicki...

jquery event function call with oop?

var objs = new Array(); function Foo(a) { this.a = a $("#test").append($("<button></button>").html("click").click(this.bar)); } Foo.prototype.bar = function () { alert(this.a); } $(document).ready(function () { for (var i = 0; i < 5; i++) { objs.push(new Foo(i)); } }); is it possible to make it so that ...

Is there a way find out which second event will happen in MFC

Hello, I stumbled upon a curious problem with MFC. I have a Dialog where I check every Edit field on ON_EN_KILLFOCUS if it's valid. If validation doesn't go through I set focus back and show error message. This would be fine, if only I would close the dialog. I mean if I leave wrongly entered field and press close button or X, then ON_E...

Implement OPOS Service Object Events

I'm developing a OPOS Service Object for fiscal printers. I came to implement the events. According to the Monroe documentation, the SO initiates events by calling an event request method exposed by the Control Object. So, as far I understand, in my SO I should declare and initialize the Monroe CO and to fire an event I should call the...

Dynamically Change Fusion Chart Value with Slider Event in flex

I am having a set of slider for each bar in the graph. I have bindded all the sliders with their corresponding bars. When i change the value of slider the value in the ArrayCollection changes and i have also used singleData.refresh(); but the values in the chart remains unchanged. How can i update the values in the chart with the...

JQUERY bind .unbind

I have an accordion which has different sections to save and display different types of information. But there is only one save button to handle all the sections. If anyone can please give me a clue on how to achieve this using jquery bind and unbind. ...

How to refresh the properties view in Eclipse RCP?

I am using the properties view in RCP, i.e org.eclipse.ui.views.properties.PropertySheet. I want to be able to refresh the content of these properties programmatically. It seems RCP is geared towards the use case where this changes only when a selection changes. Is there any way I can fire a dummy event to get this to refresh (without ...

Are events in WinForms fired asynchronously?

I recognize this may be a duplicate post, but I want to make sure I ask this question clearly and get an answer based on my wording. I have a collection of forms which inherit from a common visual element: MainVisualForm. This element provides me a way to know when the form is advancing of stepping backwards. What form comes next in th...

event is not defined in FireFox, but ok in Chrome and IE

I generate HTML using jQuery: $("<a />") .append("demo") .click(function () { DemoFunc(event, value.Id) }) This works perfect for Chrome and IE8, but in FireFox I got an error: "event is not defined". I changed the code like this: .attr("onclick", "DemoFunc(event, " + value.Id + ")") It works for Firefox, but not for Chrome...

WPF DataTemplate Event binding to object function.

Hello, I'm currently writing DataTemplate for my custom type lets say FootballPlayer. In this template I would like to put ie. Button and make that button when clicked call some of FootballPlayer functions eg. Run(). Is there any simple or complex, but clean way to achieve this kind of behaviour? The DataTemplate I believe is aware of...

How to send events simply in Java?

I'm writing a basic tic tac toe game in Java. In my Board class I have a swing window which determines which button was pressed. TttGame is the class which has a Board object. The goal of this board is not to act as a fully functional tic-tac-toe board but to serve as a framework where the TttGame class controls all the logic. As such...

Event Interception with Castle DynamicProxy

Hi, In googling I can't seem to find an example of intercepting event on a proxied type and it doesn't seem to be working for me. Is there a way I can do this (ie. use an IInterceptor when an event is invoked)? Thanks. ...

How do you detect the clearing of a "search" HTML5 input?

In HTML5, the search input type appears with a little X on the right that will clear the textbox (at least in Chrome, maybe others). Is there a way to detect when this X is clicked in javascript or jQuery other than, say, detecting when the box is clicked at all or doing some sort of location click-detecting (x-position/y-position)? Tha...

Hook key & key combinations from keyboard with Qt 4.6

Let's say I have a window-less application which has only an icon on the Taskbar (Windows, Mac OS X & Linux). I want it to capture some key & key combinations, let's say Right Control + Right Shift. Upon keying in correct, combination, it will do something, say take screenshot. I can do window-less app, icon on the Taskbar and screen cap...

How to listen to keyboard events in GWT table?

In my GWT program I have a table that has a selected row. I'd like to move the row selection with the up- and down-keys on the keyboard. So I have to catch the key events somehow. The GWT docs handle key events in input fields only. But I don't have an input field! Is this possible at all? Maybe it is a DOM/Javascript restriction that ...

How to subscribe to EventHandler of a private control outside of Form

Hi all, maybe my design is not good, or I don't see the obvious solution, but I want to subscribe to a buttonClick EventHandler of Form1 from outside form1. For example I have a Controller and Form1 who are both instanced in the main function. Now I want to subscribe a function from Controller to the buttonClick event from Button1_Cl...