events

How do I update ItemTemplate after scrambling ObservableCollection(Of ObservableCollection(Of object))

I am learning vb.net, wpf and xaml with the help of sites like this one. The project I am currently working on is a 4 x 4 slide puzzle. I cannot get the buttons in the grid to scramble to start a new game when calling a new game event. Any help will be greatly appreciated. If no answer is can be provide, a good resource to research woul...

Will SerialPort DataReceived Event trigger repeatedly?

Suppose I read data from SerialPort whenever there is 100 bytes available or else nothing is done. That means, the remaining data will still be available in the SerialPort Buffer. This reading is done inside the event handler of DataReceived. Now suppose a situation arises, when there there is, say 50 bytes in the SerilaPort Buffer and ...

[WPF] Find out source of raised Routed Event

I've small trouble. I don't know why my controls firing events twice. I know it was discussed few times on stackOverflow, but still i cannot find out cause. Is there any way to debug application and find what is the main cause of raised event? I'm not good at (at this moment) profiling, but mayby it's the good path. Thx ...

How to load dynamic events in Flex

Hi All, I have a small flex application. What I want to achieve is, I want my user to pass the script as a parameter. so he has the flexibility to do anything with the ...

WPF UserControl event called only once?

Hi Everyone, I need to bind two-way a property of a user control to a property of a containing user control. I also need to set a default value to the property from code in the child (cannot be done easily from XAML tags). If I call my code from the child constructor, the value is set in the parent but the change callback routine is no...

How to detect if object was updated using Nhibernate?

I need to find out how to perform some action (flush cache) when an object of type X is updated. So when I save object of type Y, nothing is done, when I save unchanged object of type X nothing should happed, but when this object is changed and UPDATE is made, I want to know it. I tried various NHibernate events (IPostUpdateEventListe...

How to add a click event to a textbox created in code

I'm using silverlight 3 and i'd like to create a handler and event wired up to a mouse click in a text box that was created in code behind. Can someone point me in the right direction. I need to make it so that some things fire off when that textbox is clicked into. if you have an example in vb.net that would be even better. thank...

Detect shaking when using the draggable interaction

Something like this perhaps? $('#drag').draggable({ shake: function(){ alert('Shake event invoked'); } }); ...

Self-updating collection concurrency issues

I am trying to build a self-updating collection. Each item in the collection has a position (x,y). When the position is changed, an event is fired, and the collection will relocate the item. Internally the collection is using a “jagged dictionary”. The outer dictionary uses the x-coordinate a key, while the nested dictionary uses the y-...

MooTools event listener disappears after element.innerHTML is changed

Hi everyone, I am trying to achieve this task using MooTools. Description: I attached an event listener to myButton link. A click on this link initiates an AJAX request and updates myDiv content based on the response text. During this request a POST variable is being sent to "button.php", but it's not used at the moment.. (i wish to us...

Is there a better way to avoid an infinite loop using winforms?

I am using .Net 3.5 for now. Right now I am using a using trick to disable and enable events around certain sections of code. The user can change either days, hours, minutes or total minutes, and that should not cause an infinite cascade of events (e.g. minutes changing total, total changing minutes, etc.) While the code does what I wan...

Is it possible to disable textbox from selecting part of text through double-click.

The default behaviour of doubleclicking in a textbox is select part of text. I wanna override it with selecting a word. But I found handling the doubleclick event(or override the OnDoubleClick method) actually do the default behaviour first, then execute my code. Is it possible to disable the default behaviour. ...

SDLJava joystick events in a thread

I have a class which uses SDLJava to process events from multiple joysticks. When I put a 'main' in the class and run the file, all the joysticks are correctly detected and all events at received and processed in the class. When I add a 'run' method (which does the same as 'main') and run the class as a thread, all joysticks are detect...

bubble click event on Flex Bubble Chart

How do i write a event listener for a Flex chart (Bubble-Series), tried itemClick on Chart and click on BubbleSeries. I can see the events. but how do i get the series item which is under the mouse click. ...

how to clone forms in javascript preserving event bindings

I am about to clone a part of form which has some actions bound to click events. I want to change all occurences of word TEMPLATE in attributes to 'n_'+ID. I want to abstract from structure of cloned part - It would be one TEMPLATE or 10. I tried to something like this but the bindings are lost: insert = function(){ var old = $('#T...

Calling notifyDataSetChanged doesn't fire onContentChanged event of SimpleCursorAdapter

I have this scenario onResume of an activity: @Override protected void onResume() { if (adapter1!=null) adapter1.notifyDataSetChanged(); if (adapter2!=null) adapter2.notifyDataSetChanged(); if (adapter3!=null) adapter3.notifyDataSetChanged(); super.onResume(); } Adapter has been defined as: pu...

onHide() type event in jQuery

Does anyone know of an onHide() event or something similar in jQuery? I tried: $(this).bind('hide', function(){ console.log('asdasda') }) But apparently that doesn't work. Edit: Just to clarify, it's being hidden using CSS display:none. I'm aware of the callback function but as I'm not hiding it (the CSS is) I can't use it....

Image MouseDown event not firing

I have a problem on one of my user’s PC’s where she cannot click on an image (well, she can click on it, but nothing happens). The image has the following XAML: <Image Source="./Images/flag.jpg" Name="image1" Stretch="Uniform" Height="40" HorizontalAlignment="Right" VerticalAlignment="Top" ...

JavaScript onload/onreadystatechange not firing when dynamically adding a script tag to the page.

I am developing a bookmarklet that requires a specific version of jQuery be loaded on the page. When I have to dynamically insert a jQuery script tag to meet the requirments of the bookmarklet I want to wait for the onload or onreadystatechange event on the script tag before executing any function that requires jQuery. For some reason t...

Is there a way to detect when a WSS default.aspx page is updated?

That is detect when the user makes web part changes and selects to exit editing the page. I want to be able to capture a page event, then create a SharePoint task to instruct a user to translate that page to another language (note that MOSS and variations is not an option because the client wants to use the free version of SharePoint). S...