event-handling

Silverlight MVVM: where did my (object sender, RoutedEventArgs e) go?

[亡魂溺海] 提交于 2019-12-06 06:12:31
I am using commanding in my viewmodel to handle events. like for example I am handling a button click event like this: XAML <i:Interaction.Triggers> <i:EventTrigger EventName="Click"> <i:InvokeCommandAction Command="{Binding mvvmButtonclick}" /> </i:EventTrigger> </i:Interaction.Triggers> Viewmodel Code public ICommand mvvmButtonclick { get; private set; } Viewmodel Constructor code to wireup the command this.mvvmButtonclick = new ActionCommand(this.ButtonClickedEvent); Actual method in the viewmodel that gets called on button click private void ButtonClickedEvent() { MessageBox.Show("worked!!

Jira: How to obtain the previous value for a custom field in a custom IssueEventListener

吃可爱长大的小学妹 提交于 2019-12-06 06:09:54
问题 So how does one obtain the previous value of a custom field in a Jira IssueEventListener? I am writing a custom handler for the issueUpdated(IssueEvent) event and I would like to alter the handler's behavior if a certain custom field has changed. To detect the type of change I would like to compare the previous and current values. (I'm am not asking about how to obtain its current value - I know how to get that from the related Issue) I am developing against Jira 4.0.2 on Windows. Is the best

Tkinter keybinding for Control-Shift-Tab

佐手、 提交于 2019-12-06 06:05:09
What's the key-binding for Control-Shift-Tab? I've tried lots of things and nothing seems to work. I'm already aware of tkinter.ttk.Notebook.enable_traversal. If you know of a handler for tabs being activated, that would suffice, too. Armin The general format for representing an event is: <[event modifier(s)-]...event type [-event detail]>. For key-binding Ctrl+Shift+Tab the format would be: 'Control-Shift-KeyPress-Tab'. In this case the event modifiers would be: Control- Shift-, the event type: Keypress, and the event detail: -Tab The following code (in python 2.7.6) should make it clear:

Preventing JavaScript click event with Scriptaculous drag and drop

余生颓废 提交于 2019-12-06 05:31:38
问题 I have some elements on a page which are draggable. These same elements have a click event which navigates to another page. I'm trying to determine the best way of preventing the click event from firing if the user is dragging but still allow the click event if not dragging. Anyone have any ideas of the best way to accomplish this? 回答1: I solved this by using something like the following: new Draggable('id', { onStart: function() { dPhoto = $('id'); Event.stopObserving('id', 'click'); },

Webbrowser: sequencing activites when no DocumentCompleted is fired by a link on hosted webpage

余生长醉 提交于 2019-12-06 05:24:43
Given this method to work on a HTML page in a webbrowser: bool semaphoreForDocCompletedEvent; private void button12_Click(object sender, EventArgs e) { checkBox1.Checked = false; //unchecked if the NAvigating event is fired and Checked after DocumentCompleted is fired, only to have a visual reference on the Form HtmlDocument doc = Program.wb.Document; HtmlElement ele = doc.GetElementById("menuTable"); foreach (HtmlElement sub in ele.All) { if (sub.GetAttribute("href").Contains("something")) { ele = sub; break; } } //PHASE 1: clicking on a Web link to navigate to a page that contains other

how do I handle messages asynchronously, throwing away any new messages while processing?

∥☆過路亽.° 提交于 2019-12-06 05:08:09
I have a C# app that subscribes to a topic on our messaging system for value updates. When a new value comes in, I do some processing and then carry on. The problem is, the updates can come faster than the app can process them. What I want to do is to just hold on to the latest value, so I don't want a queue. For example, the source publishes value "1" and my app receives it; while processing, the source publishes the sequence (2, 3, 4, 5) before my app is done processing; my app then processes value "5", with the prior values thrown away. It's kind of hard to post a working code sample since

value changed eventhandler

佐手、 提交于 2019-12-06 04:49:24
I want to react, whenever an integer value has changed. So, is there a possibility to write an own eventhandler? I need to get the old value and the new one, because I have to de-reference some events for an object in a list with the index of the old value and reference these events to the listitem with the index of the new value. Something like this (really abstract): value.Changed += new Eventhandler(valuechanged); private void valuechanged(object sender, eventargs e) { list[e.Oldvalue] -= some eventhandler; list[e.newValue] += some eventhanlder; } Thanks. Omar You can do something like this

How to get notified about changes on SharePoint groups.

与世无争的帅哥 提交于 2019-12-06 04:43:15
问题 I'm actual looking for a way to get notified about any changes on a SharePoint group. First I though I would be able to this by attaching a event handler to some kind of group list. But unfortunately there are no such list representing SharePoint groups. My second attempt was to bind a event handler to the content type SharePointGroup but this didn't work either. So are there any other options to get notified about events on a SharePoint group? EDIT: Thanks for the reply so far. I forgot to

Are handlers always called synchronously during jQuery click()?

前提是你 提交于 2019-12-06 04:39:19
问题 Through some brief testing it appears that click() will trigger any applicable handlers synchronously (that is, the handlers are all invoked before click() returns), which is desirable for what I'm developing. However, the jQuery documentation does not seem to guarantee (does not mention one way or the other) that handlers are invoked synchronously. Is a synchronous behavior guaranteed somewhere, or otherwise safe to assume as cross-browser and future-proof? 回答1: Yes, behind the scenes all

Event Handling in IE

℡╲_俬逩灬. 提交于 2019-12-06 04:27:24
I have the code included below that allows me to do something the first time a user mouses over an element and then remove the event. It plays nice in the W3C event model browsers but keeps throwing an error in IE6-8. I got the code from another question and believed it would handle IE. Anyone see what I'm doing wrong? <script type="text/javascript"> function setMouseEvent() { //Tel: 01 8279 400 event = addEvent(document.getElementById('contactButton'), 'mouseover', changeText); } function changeText() { alert("worked!"); removeEvent(document.getElementById('contactButton'), 'mouseover',