I am now refactoring a code written by someone else and I have found a construct that I have mixed feelings about. There is a ListView-like control and each of its items can raise 'DialogOpened' event. However, it may be cumbersome to register external event handlers to each of the items (and the items may be added or removed dynamically...
I am now trying to understand some code and I have found a pattern, which seem a bit strange to me. There is a user's control class with 'EditorOpen' event. At first, I thought this name is incorrect, because it does not end with '-ing' or '-ed', as MSDN suggests. However, later I have found out, that this event does not INFORM about som...
It seems that the WPF Rectangle shape does not have the Click event defined. What am I supposed to use instead?
It does have MouseUp, but it's not quite the same behavior.
...
I'd like to know what you think of the following design options.
I have an 'AgendaController' (.NET MVC project) which handles user actions like viewing their agenda, making appointments, etcetera. When a user makes an appointment, the appointment is saved in a database. Then, there is a 'secondary' task that has to be done, in this cas...
I'm currently implementing a small application driven by a YUI DataTable. For this DataTable I need two configuration arrays, which I both get from server with an XHR. However, my current implementation makes me wonder how these things are done properly.
What I have now is two asynchronous AJAX requests which both set their respective d...
Hi,
I have next situation:
I load dynamic controls during on init, and I do correct initialization.
I add dynamic control before postback
I don't add anything later in load
control is loaded and diplayed correctly
I press postback and nothing happens
Why I really don't know.. I tried everything. So control IS properly initialised. __...
I am trying to get the new System.Diagnostics.Eventing event logging working in a simple .Net app before integrating it into my application.
Working off of this page, I created a manifest, built a simple app that fires an event and registered the provider to see it in the event viewer. I don't get any errors in event viewer or my sampl...
Design Question – Polymorphic Event Handling
I’m currently trying to reduce the number of Event Handles in my current project. We have multiple systems that send data over USB. I currently have a routine to read in the messages and parse the initial header details to determine which system the message came from. The headers are a lit...
As the title implies, I'm using jQuery's show and hide functions to hide and show elements. However, I don't want to scale in the height of the element, just the width.
I was thinking about using the animate function but I wasn't sure if this was the best way to go about it.
Also, I'd prefer not to have to set the height in the javascr...
How can I prevent the firing of multiple events of the same kind triggered by a single action?
For example, I have a ListView containing some items. When I select or deselect all items, the SelectedIndexChanged event is fired once for each item. Rather, I would like to receive a single event indication the user's action (selection/desel...
I have a button on my MasterPage and I want the ContentPage to handle the Click event of the button. Here's what I have so far:
//Event in MasterPage
public event EventHandler Search_Submit;
//ButtonClick event in MasterPage
protected void SearchButton_Click(object sender, EventArgs e)
{
if (Search_Submit != null)
...
I'm building a concert calendar that's very heavy on javascript (using jQuery). I'm having trouble synchronizing various events throughout the app, and I'm looking for suggestions for how to do this.
An example of a simple use case:
User clicks a month
Calendar skips to that month
An example of a more complex use case:
User selec...
If my software has two object instances, one of which is subscribed to the events of the other. Do I need to unsubscribe them from one another before they are orphaned for them to be cleaned up by the garbage collector? Or is there any other reason why I should clear the event relationships? What if the subscribed to object is orphaned b...
I am building a autocomplete feature for input text field. Currently I could use mouse click to choose the selection, I'd like to add keyboard control to allow autocomplete control. I monitored the keycode in onkeyup event, it appears for up/down key, the key codes are both 0.
I am wondering whether there is any better way to do so.
T...
I have a Dell Inspiron E1505 and as you can see in this image it has some buttons on the front for mute, play/pause, stop, volume control, etc. The mute and volume buttons actually affect the volume settings for the computer itself, but the others can also be used to control some other applications, such as Windows Media Player and even ...
I’m working with basic HTML <input type="text"/> text field with a numeric value.
I’m adding JavaScript event keyup to see when user presses arrow up key (e.which == 38) – then I increment the numeric value.
The code works well, but there’s one thing that bugs me. Both Safari/Mac and Firefox/Mac move cursor at the very beginning when I...
Hello,
Please read THIS post. I have the same problem as described in this post but I am trying to do in in VB.net rather than c#.
I am pretty sure to do this I have to use a custom event. (I used a code conversion site to get to learn about custom events.) So in the IDE when I type the following:
Public Custom Event AddRemoveAtt...
Below I am creating an object in Javascript. Within the constructor I am setting up an event listener. The problem is that when the event gets fired, this.prop cannot be found, and undefined prints out. How do I solve this?
var someObj = function someObj(){
this.prop = 33;
this.mouseMoving = function() { console.log(this...
Suppose I have a JEditorPane in a JPanel. I want to be able to execute a callback each time the user enters/pastes text in the JEditorPane component. What type of listener should I create?
...
I have a Word userform with 60+ controls of varying types. I would like to evaluate the form every time a control_change event is triggered and change the enabled state of the form's submit button. However, I really don't want to write and maintain 60 on change event handlers.
Could anyone help me out?
Cheers
...