dispatcher

Random Access Violation Exception in WPF Application

Hi, I am facing weird problem while running regression tests on my WPF Application. I am getting AccessViolationException with different stacktraces each time. First : Message :Attempted to read or write protected memory. This is often an indication that other memory is corrupt. StackTrace : at MS.Win32.PresentationCore.UnsafeNativ...

Creating a System.Windows.Controls.Image throws an exception - how do I use the dispatcher to instantiate it?

I'm running my unit tests on a piece of code that does the following in the test: Assert.IsNotNull(target.Icon); Inside the getter for the Icon property, I'm doing this: System.Windows.Controls.Image img = new System.Windows.Controls.Image(); That's throwing this exception: System.InvalidOperationException : The calling thread mus...

Why is Dispatcher.Invoke not triggering UI update?

I am trying to reuse a UserControl and also borrow some logic that keeps track of progress. I'll try and simplify things. MyWindow.xaml includes a MyUserControl. MyUserControl has its own progress indicator (Formatting in progress..., Copying files..., etc.) and I'd like to mirror this progress somewhere in the MyWindow form. But, th...

Dispatcher.Invoke blocks forever

I'm trying to invoke a dialog on the UI dispatcher : class DialogService : IDialogService { private readonly Dispatcher _dispatcher = Application.Current.Dispatcher; public bool? Show(IDialogViewModel viewModel) { if (_dispatcher.CheckAccess()) { var dialogWindow = new DialogWindow(); ...

Unit Testing WPF Dispatcher

It's been asked and answered but I'm not getting it. In my NUnit tests, I create a Canvas. I save off the dispatcher. Then I create a thread to "LoadData". From LoadData i need to Dispatcher.Invoke back to the thread. I don't have a strategy for pausing or keeping the primary test thread running, and if I do pause or suspend the prim...

Weird problem with Rails app and Mongrel

I originally posted a question relating to this problem on serverfault.com: http://serverfault.com/questions/152587/apache-mod-proxy-to-another-server I have since realized that this is not an issue with my server setup, but my rails application. I have set this application up server-wise the exact same as another functioning rails app ...

Zend Framwork: Problem with links (like a href)

Hi, I've got a problem with Zend Framework, when calling an action. This action is called "uploadvideo" inside a controller called "UploadInterfaceController". Therefor the view is called "uploadvideo.phtml". Now all this is wrapped in a module called "Upload". The problem is, that I cannot call a link inside the uploadvideo.phtml. I ...

How to update silverlight UI while processing

Hi, I went through several examples posted online but I cant answer my question. I have my 'p' variable that is being increased by 1 in the for loop. I want the UI to display the progress of calculation (to show how 'p' is increasing from 0 to 1000000). I do the calculation on the separate thread and the I call dispatcher to update the...

struts2, problem with oc4j

Hi, I am having trouble using urlrewrite with oc4j (10.1.3.1). It works perfectly on tomcat (6.0). I am not able to forward to struts2 actions. My web.xml: http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"> <display-name>Struts Blank</display-name> <filter> <filter-name>UrlRewriteFilter</filter-name> <filter-class>org.tuckey...

WPF asynchronous invoke question.

What's wrong in my code? It's not updating the TextBox and the ProgressBar while deleting files. Imports System.Windows.Threading Imports System.IO Class MainWindow Private Sub bt_Click(ByVal sender As Object, ByVal e As RoutedEventArgs) Handles bt.Click Dim sb As New System.Text.StringBuilder Dim files = IO...

Django error 'Signal' object has no attribute 'save'

I've been struggling with this problem for 5 hours and I have a feeling it's a simple solution that I'm just overlooking. I'm trying to tie in a third party module (Django Activity Stream) that uses a series of senders and receivers to post data about user activity to a database table. Everything is set up and installed correctly, but I...

Slow request processing in rails, 'waiting for server' message.

I have a quite big application, running from inside spree extension. Now the issue is, all requests are very slow even locally. I am getting messages like 'Waiting for localhost" or "waiting for server" in my browser status bar for 3 - 4 seconds for each request issued, before it starts execution. I can see execution time logged in log f...

How to get the number of exception the service has encountered in WCF?

How will I be able to count the number of exceptions thrown during the execution of a service? Right now I'm using behaviors to hook with the dispatchers using IOperationInvoker and IParameterInspector. But I need to know how can i count the faults and exceptions that occurs in a particular operation or the total occurrence in the whole ...

Elegant handling of a Collection Change that requires changes on the dispatcher thread.

Here's my situation: I've got a User interface ItemsControl "ResultsPresenter" (WPF) pulling from a ListCollectionView that uses a BindingList "Results" from a non-UserInterface class as the ListCollectionView.Source property. Whenever I make a change to "Results" such as an add operation, I get a NotSupportedException, insisting tha...

media site design considerations with multiple ways to invoke site functionality

My mate and I are designing/implementing a web based media application. It will provide media management and distribution abilities. Long story short, as much as we want a web based GUI for users to be able to perform site functionality (CRUD) and also have an administration area to control various aspects of users there is another c...

How to create a control and manage its events in one method?

I'm still stuck. Assume that I've got a user control with a button. And an event called damnIt_ButtonClicked. In the main window I want to emulate the control's lifetime like it is a modal dialog, although it's not. I want to wrap everything into one method, it returns true if the Button on the control clicked. public bool Show() {...

Flash event dispatch question...

Hi guys.. I have a question about the event dispatch. I am trying to write the code for youtube player and find the following link.. http://www.codingcolor.com/as3/as3-youtube-chromless-api/ He has many dispatchEvent call similar like this: dispatchEvent(new YouTubeEvent(YouTubeEvent.ON_IOERROR,event)); For my understanding, cus...

Universal REST frontend - does it exist?

I'm looking for some thin layer on top of handling HTTP requests that can easily do routing to different backends, based on the uri / rest verb / actual service location / .... This layer should also handle encoding into whatever the requested format is (xml / json / returning binary data / etc.). The most important point though is to m...

When to extends EventDispatcher

Hi guys.. Simple question..I was wondering when you guys extends EventDispatcher in your class. It seems to me that as long as we have import event package, we can dispatchEvent without problems....I saw sometime people extends EventDispatcher in their class...not sure why...anyone care to explain? Thanks a million... ...

Getting current url

I have a couple of views which are rendering the same template and I have some {% url %} tags into that template which needs to point to different location based on the current view. Is there any context variable which gives the name of the view(for named urls), like view-1 view-2, so in my template I can use it like this: {% url url-na...