In an application I'm working on I've implemented a MVC pattern to use different views for displaying parts of a UI. In an overall UI there's an entry box, in which the user can give commands or queries. The idea is that this entry box generates a few basic events, like "ValidEntry", "InvalidEntry" and "EmptyEntry". Each one of the contr...
My little brother is just getting into programming, and for his Science Fair project, he's doing a simulation of a flock of birds in the sky. He's gotten most of his code written, and it works nicely, but the birds need to move every moment.
Tkinter, however, hogs the time for its own event loop, and so his code won't run. Doing root.ma...
Does anybody know of a method to trigger an event in Prototype, as you can with jQuery's trigger function?
I have bound an event listener using the observe method, but I would also like to be able to fire the event programatically.
Thanks in advance
...
Hi,
I was wondering what's the proper way of raising events from C++/CLI. In C# one should first make a copy of the handler, check if it's not null, and then call it. Is there a similar practice for C++/CLI?
...
I have a data template with a textbox and a button with some styles on it. I would like to have the button show the mouse over state when focus is on the textbox beside it. Is this possible?
I figure it would involve something like this. I can get the textbox through use of FindVisualChild and FindName. Then I can set the GotFocus even...
I am very new to WPF, and I have a very basic WPF question:
Suppose we have a custom dll with some business logic that fires events such as
ModemIsConnected. On the UI side (.xaml) there is a label that changes its value to OK once that event is fired. I would like to offload the event handling portion (changing label's status and other...
Does anyone know a good (free) C# eBook for Intermediate programmers? I want something that covers generics, threads, events, delegates, etc.
See also: http://stackoverflow.com/questions/391523/what-are-some-good-free-programming-books#392926
...
I need to take an existing winforms application and drop into an event tracing mode, with hopefully as little friction as possible.
I would like to see every action the user takes as a simple stack trace-looking thing:
MainForm.LaunchThing_Click
ThingWindow.NameInput_Focus
ThingWindow.NameInput_TextChanged
ThingWindow.AddressInput_Focu...
I have a custom control with a LinkButton on it. When I click the LinkButton, its click event does not fire.
[ToolboxData("<{0}:View runat=server></{0}:View>")]
public class View : Control
{
private LinkButton lbNextPage;
protected override void CreateChildControls()
{
lbNextPage = new LinkButton() { ID = "lbNextPag...
I'm implementing a project in MVP pattern and I've got some interfaces like this:
public interface IWizardStep {
event EventHandler NextStep;
}
public interface ISubmitable {
event EventHandler Submit;
}
public interface IStep : ISubmitable, IWizardStep {
string SomeProperty { get; set; }
}
My presenter class then has this:
...
I have a console application that contains quite a lot of threads. There are threads that monitor certain conditions and terminate the program if they are true. This termination can happen at any time.
I need an event that can be triggered when the program is closing so that I can cleanup all of the other threads and close all file ha...
I understand that one can raise an event in the class that the implementation declaration occurs, but I wish to raise the event at the base class level and have the derived class's event be raised:
public interface IFoo
{
event EventHandler<FooEventArgs> FooValueChanged;
void RaiseFooValueChanged(IFooView sender, FooEventArgs ...
So i have a design problem. I have a mouse class that has delegates and events. ie MouseButtonPressed, MouseMoved. and such that are getting called by a state engine.
What i want to have happen is to create an interface like IClickable or IDraggable or somthing and have events inside those interfaces that get called when the mouse even...
I've never really had the need to use any drag functions until now, so let me fill you in on what I've discovered so far:
Drag events are events that take place when the user is dragging an object. This is "proper" OS dragging, eg: hiliting some text and dragging it, or even dragging in something from outside of the browser.
While dr...
Hi,
I know that when an item is restored from the recycle bin, the ItemAdded event is fired.
However, how can i detect if the item added comes from the recycle bin or if it is a new file.
Thanks
...
Has anybody ever seen this error in their Application event log. If so, have you found a way to fix this? THanks in advance for any help.
1) Exception Information
Exception Type: System.Exception
Message: User profile returned from SharePoint as Nothing for UserID 'S-1-5-21-59715478-2608859843-3034944815-2139'.
Data: System.Collection...
I'm wondering if this is possible in JQuery.
I have some Javascript code that creates DOM objects on the fly, in response to user actions. Some of those DOM objects are in a specific structure - the container always has the same "class" attribute.
What I'd like to do is, every time a new instance of a DOM object with class "X" is creat...
Hi, I cannot get my SelectedIndexChanged of my dropdownlist to fire. I have the following:
<form id="form1" runat="server">
<div>
<asp:GridView id="grdPoll" runat="server" AutoGenerateColumns="false">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:DropDownList ID="DropDownList1" runat="server"...
What's a jQuery like and/or best practices way of getting the original target of an event in jQuery (or in browser javascript in general).
I've been using something like this
$('body').bind('click', function(e){
//depending on the browser, either srcElement or
//originalTarget will be populated with the first
//element that in...
Lets say I have a component called Tasking (that I cannot modify) which exposes a method “DoTask” that does some possibly lengthy calculations and returns the result in via an event TaskCompleted. Normally this is called in a windows form that the user closes after she gets the results.
In my particular scenario I need to associate so...