events

jQuery - char counter doesn't work with paste event

I wrote a jQuery character counter, it works when I type, but not when text is pasted. The function is executed upon paste, but count doesn't change. I am not sure if val() function is correct or really in synch with DOM. Any ideas? counter = function() { $j("strong#status-field-char-counter").text($j("#Panel1messagesmessage").v...

How to solve this missing update() on custom image to org.eclipse.swt.widgets.Group?

I have an interesting aspect to submit to your attention. I am pretty sure the solution to this will prove to be very easy, and yet... i am unable to find it. Here it is what i did : i've drawed a Group on top of a Shell, and i've used this code : String message = "My message"; Image img = ....//some image group.addListener(SWT.P...

C#: Is there way to ensure an object is only accessible through its events?

Is there a way to create some sort of interface that only allows the object to be accessible through events? ...

How to unbind event from asp.net control?

I have the following dropdownlist control. <asp:dropdownlist ID="ddlFeeds" AutoPostBack="true" OnSelectedIndexChanged="ddlFeeds_OnSelectedIndexChanged" runat="server"></asp:dropdownlist> How do i unbind ddlFeeds_OnSelectedIndexChanged from ddlFeeds? ...

What should I return from an NHibernate Event Listener?

public class MyUpdateListener : IPreUpdateListener { public bool OnPreUpdate(PreUpdateEvent @event) { // What do I return from this method - true or false? } } ...

How to download files in a blocking/synchronous manner?

Hi, I am pretty new to silverlight and was very surprised to see that only asynchronous file downloading can be done. Well, I've attempted to counter act this by just setting a flag and waiting on it to change.. This is my simple code void MainPage_Loaded(object sender, RoutedEventArgs e) { WebClient webClient = new WebClient(); ...

How to simulate click on (x, y) point of HTML document with Yahoo UI (JS) ?

DOCS http://developer.yahoo.com/yui/3/event/#eventsimulation . but I do not understand how to do it( So how to simulate a mouse down at point ( X, Y) in the client area of some HTML Object with YUI? ...

Can I use switch - case, in actionPerformed method in Java

I would like to check on which actionEvent has occurred with 'ActionEvent e' and 'e.getSource'. Can I use a switch case for this? public void actionPerformed(ActionEvent e){ switch(e.getSource()){ case radius: double r = validate(radius.getText()); break; case height: double h = validate(height.getText()); break; ...

C# How do I use an event to get my GUI update on change of an object?

C# How do I use an even to get my GUI update on change of an object? I have a GUI program that creates an object and displays the object in a data grid through reflection. When the user updates the information I want to be able to verify the new information and send feedback to the user. I have a method that does the verification of th...

Visual Studio pre-build scripts can't find exe files in windows/system32

I'm stumped. All of a sudden Visual Studio cannot find exe files in the Windows/System32 directory (such as xcopy, attrib etc). I have some pre-build and post-build events that execute batch files that use xcopy and attrib. Previously they were working fine but today, during the build process, Visual Studio cannot find them. The error i...

How call function jquery in the event inserted of a formview

Is it possible to call the inserted event of formview in asp.net? from jquery for example: $ ('#FormView1').Inserted (function () (/ / code .... how do it??? ...

Vb6.0 How to bind a function/sub-procedure to external event as an event handler??

I need to construct a VB6.0 ocx that will be used as a plugin for some external VB6.0 applications This ocx contains several sub procedures that are supposed to work as event-handlers for some of the external events (External to ocx). The problem is, the users who use this ocx will only call one of my ocx sub procedures once and only ...

What are pros and cons of consuming web services with 1. events / 2. IAsyncResult?

I made a WPF example that consumes a web service (www.webservicex.com/globalweather.asmx) in two different ways: with events like this: public Window1() { InitializeComponent(); DataContext = this; Location = "loading..."; Temperature = "loading..."; RelativeHumidity = "loading..."; client.GetWeatherCompleted ...

How to subscribe to an event inside a facade class

I have two projects 1: windows forms project and 2: a business logic project that recursively walks the file system looking for specific files. I want the windows project to subscribe to an event buried in a class called recurse. The problem I have is the instance of the recurse class is instantiated inside a facade class in the busines...

Event displaying in fullcalendar

I want to display event of json from mysql database. But i can't display it in calendar. I think there are some mistakes in events. But i can't point it out. Here is my code: calendar.php: $(document).ready(function() { var date = new Date(); var d = date.getDate(); var m = date.getMonth(); var y = date.getFullYear(); $(...

How can I fire event before item is added to collection in C#?

I would like to do some processing before an item is added to a BindingList. I see there is an ListChanged event but this is fired after the item is added. The AddingNew event is only fired when the AddNew method (not the Add method) is called. Has anyone done something like this before? UPDATE: I have created the following classes ...

Android EditText boxes

I want to cause the focus of one edit text box to move to another on editting (meaning you can only type on letter before it automatically moves on to the next edit text). It's the "on edit" that I can't get my head around. Can anyone help me out with a simple example? Theres a lot I need to implement it into, so just a basic understand...

How call function JQuery send information before the content disappears in a control asp.net

Hi guys, I have a problem apart of my face, I send information after the event insertedItem of FormView to silverlight control, because my problem is that the silverlight control is closed just before the call to the function in jquery therefore can not receive that information that is sent. can you help me? please? ...

vb.net - Events with a handled property. Is this way save?

Ok, I have a winforms app and my code works fine. But I want to know if my code is bullet proof or if it only works without load. Let me explain it: I have a windows form where I have overridden the OnKeyDown method: Protected Overrides Sub OnKeyDown(ByVal e As System.Windows.Forms.KeyEventArgs) dim args as new ActionEven...

C# - what's the best way to track & avoid dead events

Hi Guys, Too many times we find out that strange behavior / performance issues in the system are caused by "dead" events - events that invoked on freed objects. It looks like you need to always release (-=) existing event before registering a new one. This looks like best practice but how can we detect such a situation in existing cod...