UPDATED: I'm now overriding the NSView keyUp method from a NSView subclass set to first responder like below, but am still not seeing evidence that it is being called.
@implementation svsView
- (BOOL)acceptsFirstResponder {
return YES;
}
- (void)keyUp:(NSEvent *)event {
//--do key up stuff--
NSLog(@"key up'd!");
}
@end
--OR...
How I can add additional condition of certain keyboard key, say, Ctrl-key state to WPF MouseLeftButtonDown event-handler?
private void Grid_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
...
}
...
There are 3 properties (example 1):
[Bindable] public var name:String;
[Bindable] public var email:Number;
[Bindable] public var address:Boolean;
I needed to have 3 helper methods that will be bindable too (example 2):
[Bindable] public var name:String;
[Bindable] public var email:Number;
[Bindable] public var address:Boolean;
publi...
Hi,
I have a query related to Touch events on the UI controls.
I have 4 controls on the screen ( UITextField, UISlider, UISwitch, UIButton ). If the user touches any of the control on the screen, I want to fire touchesBegan and touchesEnded events on those controls in which I would implement some code.
Please let me know how to fire ...
How can I add an event listener (addEventListener(),attachEvent()) that also accepts a parameter?
The parameter is passed as the element's custom attribute like:
<img src="icon.gif" alt="Test button" command="test" />
<img src="icon2.gif" alt="Test button2" command="write" />
...
Hello,
i want to know a double-clicking functionality for a list-box kann easily be build. I have a list-box with a collection as ItemSource. The collection contains own data-types.
<ListBox ItemsSource="{Binding Path=Templates}"
ItemTemplate="{StaticResource fileTemplate}">
I defined a data-template for my Items, which con...
Say I have an event with 2 subscribers (everything occurs in the same thread) - one subscriber writes to a log file, the other shows a MessageBox.
If the MessageBox is the first on the subscription list, then the log entry is not written until the after the user closes the message box. So the time in the log entry will really be the ti...
In a WPF application, I've got my events centralized in one class like this:
public class EventFactory
{
public static void Button_Edit_Click(object sender, RoutedEventArgs e)
{
MessageBox.Show("you clicked edit");
}
public static void Button_Add_Click(object sender, RoutedEventArgs e)
{
MessageBox.S...
I have two event recievers setup on a list in 2010.
The first is a ItemAdded reciever that works every time:
<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<Receivers ListTemplateId="10000">
<Receiver>
<Name>ListItemReceiverItemAdding</Name>
<Type>ItemAdding...
I'm trying to catch an event, when I switch the stacks of a StackLayoutPanel in GWT 2.0.
The biggest problem is that I don't know which event gets fired and there seems to be no documentation, I have added a ChangeHandler with addDomHandler() but that hasn't worked.
Unfortunately the StackLayoutPanel doesn't implement the getSelectedInde...
For my WPF application I have developed a virtual keyboard. It runs fine on my development machine. However, on slower machines the button click response is slow. After the button is clicked, there is a delay before the display updates with the button down state and the buttons event. What can I do to remove this delay? Is the problem a ...
I want to write some code that assigns the same event handler to several different buttons. Is there a way to implement it without referring to each button by name but by using something generic like self or sender to refer to the button?
...
When I make a dynamic component from unit I have no problem creating the OnClick event.
When I make a dynamic component from unit 2 I am unable to access the OnClick event.
unit Unit1
type
TForm1 = class(TForm)
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
Proc...
Hi!
I need to assign an eventHandler to an object, in this way:
_Element.AddHandler(UIElement.MouseLeftButtonUpEvent, new RoutedEventHandler(Vars.Digit), true);
but, in fact, I only have a string that contains "Digit" or other method name in the Vars object instance.
It is possible to achieve this using reflection or other kind of t...
In my WPF application I would like to attach an input gesture to a command so that the input gesture is globally available in the main window, no matter which control has the focus.
In my case I would like to bind Key.PageDown to a command, however, as soon as certain controls receive the focus (e.g. a TextBox or TreeView control), thes...
Is there an alternative to Attached Command Behaviour for handling events like DataGrid's MouseDoubleClick event, or TextBox's LostFocus event in the ViewModel ?
e.g., View::
<Window ........
DataContext=".......">
<TextBox LostFocus="{Binding Command1}" />
<! -- or -->
<WpfToolkit:DataGrid...
Hi. I have a problem.
I made a wrap widget that implements interface HasChangeHandlers
But i just can't fit events to each other.
public HandlerRegistration addChangeHandler( final ChangeHandler handler ) {
HandlerRegistration registration1 = dateFrom.addValueChangeHandler( handler );// Compile error
HandlerRegistration registration...
I'm working on a program that needs a Java object to have an event. I'm quite familiar with how this works in C#, having had enough experience to learn the pitfalls.
What are the pitfalls of working with events in Java? How are they different from events in C# 2.0?
Example: An object changed event to prompt a save from the owner ob...
I have an object of type SomeObject, with an event StatusChanged.
I have a property in SomeObject of type Status also with an event StatusChanged.
Within a private function in SomeObject, I would like to run some logic (including firing the StatusChanged event) in the event that Status has fired its StatusChanged event. I have been a...
Consider this (psuedo-code):
var country = new Country();
addChild(country);
var state = new State();
country.addChild(state);
var city = new City();
state.addChild(city);
I can dispatch events from the city up to the country like this (in the City class):
dispatchEvent(new CustomEvent(CustomEvent.WHATEVER));
Because events bubbl...