behavior

How to apply two Endpoint Behaviors to one behavior configuration?

This question is a follow up to @joshperry's answer on CustomQueryStringConverter. I implemented this solution with a small modification. My version converts System.Int32[] instead of string[]. However, I have a problem with my WCF configuration. My service dishes out SOAP, XML and JSON. SOAP wasn't a problem, this solution works fo...

diffrent response IE-8 and FF getElementById()

i have a function what does the following function test() { document.getElementById("main").innerHTML="show wait"; // do stuff document.getElementById("main").innerHTML="show finished"; } In FF the div will show "show wait", do the other stuff for 4 seconds and then show "show finished" In IE it will only show "show fin...

Silverlight DataStateBehavior, initial value not used

Hi, I am trying to use the Silverlight DataStateBehavior, it works fine in most cases where I click a button which sets say a 'Selected' Property in the view model to either false or true. The DataStateBehavior then tells the VisualStateManager to go to the relevant state. Like this: <Button...> <i:Interaction.Behaviors> ...

flex datagrid custom tab behavior

Hello, I have two datagrids and I want to override the behavior of the tab-key event, so that it goes to the next datagrid, when the cursor reaches the end of the first datagrid columns. Any hints are appreciated! Markus ...

Does 1 always equal '1' in SQL?

I am trying to determine that standard SQL behaviour for comparing a number to a character or string version of the same number. Does SELECT 1 = '1' (or the like) always return some sort of "truthy" value (true, 1, 't', etc.)? I have confirmed as much on PostgreSQL and MySQL, but I cannot find a resource for SQL as a whole. Update: The ...

AssociatedObject.FindName in Silverlight behavior OnAttached method returns null

I'm making a Silverlight behavior to enable dragging an element by a contained "drag handle" element (rather than the whole element being draggable). Think of it like a window title bar. In the OnAttached method I am calling: AssociatedObject.FindName(DragHandle) but this is returning null. I then tried handling the AssociatedObject's ...

jQuery textarea append newline behavior

I'm trying to append a strings which end in newlines to a textarea using jQuery. However, different newline tokens show different behavior in Firefox3.5 and IE8, and I can't seem to find a way to use something that works for both browsers. \n works in FF but not in IE <br/> and \r\n work in IE but not in FF No luck using <pre></pre> ta...

Silverlight 3 - Passing a binding value to a behavior through XAML

Hi, I have created a custom behavior that I can pass properties to fine, currently just strings, my behavior looks roughly like this: public class ImageSourceBehavior : Behavior<Image>, INotifyPropertyChanged { public static readonly DependencyProperty ImageDirectoryProperty = DependencyProperty.Register("ImageDirectory", type...

Java Swing: separating UI component from logic behaviour - how do you approach this?

What I do, in NetBeans for example: create a UI component class, suffixed with Swing component type, e.g. JPanel, e.g. MyUIWidgetJPanel create a logic/behaviour class to handle the behaviour/logic, i.e. what happens when the UI component is used, e.g. buttons within it pressed etc., MyUIWidgetLogic I may also link components/logic to...

How to override preUpdate action to not modify my `updated_at` field in Doctrine?

Hi, I want to disable the automatic behaviour of changing the 'updated_at' field when an object is updated. I want to do it manually; or at least, have the posibility to disable it as wanted. I know I can do this by building my own behaviour as in this great answer. But I was searching for something 'cleaner' modifying a listener of th...

glDeleteTextures, leaking?

Hi I found a rather disguting behaviour of glDeleteTexture, deleteing only parts of the aqcuired memory (GPU side and as Textures get saved back for the sake of speed in RAM), which in my case, is a showstopper bug, my program eating up all memory. I don't want/require you to read all of the code, it's just a demo, I'd rather know how ...

Strange CSS behavior when running through VS Web Server vs IIS

So the question basically says it all -- I've got a site that looks one way when I run it locally through the visual studio web server (http://localhost:3452/) and on IIS7 (http://server/myproject/). At first I thought there was something wrong with my CSS that was not resolving properly, but I believe I've checked all of those things a...

How to implement this with NestedSet behavior in doctrine?

Task: columns: name: string(100) parent_id: integer relations: Parent: class: Task local: parent_id foreign: id foreignAlias: Subtasks ...

Where to save customized behavior for doctrine in a symfony1.4 project?

So that the behavior template can be autoloaded when necessary. I'm confused by the complex settings. ...

How can I debug a 'Default Membership Provider could not be found' error with WCF and a Custom ASP.NET membership provider?

This is problem for me with .Net 3.5 SP1 running on IIS7.5 64 bit (I tried forcing 32 bit but got the same result). I have a WCF service that I want to use authentication-services with. When I have no behavior the WCF service paints (replies) without any error. Other services also work with other behaviors As soon as I add userNameAuth...

wpf Interactivity.Behavior<T> vs attached properties

Hi, I'm trying to find some differences between these approaches. Is there any situation where behaviors are used and the same functionality could not be done with attached properties? ...

Undefined, unspecified and implementation-defined behavior

What is the difference between these three? ...

Use of class definitions inside a method in Java

Hi public class TestClass { public static void main(String[] args) { TestClass t = new TestClass(); } private static void testMethod(){ abstract class TestMethod{ int a; int b; int c; abstract void implementMe(); } class DummyClass extend...

Attching a Behaviour to a dynamically created table in Doctrine

How do I programmatically attach a Doctrine Behaviour to a table dynamically created through $conn->export->createTable('MyTable', $definition)? For example, if I have the following code: $definition = array( 'id' => array( 'type' => 'integer', 'primary' => true, 'autoincrement' => true ), 'name' => ...

Emacs next-error (C-x `) visualization.

Hello, when I get a compiler error (in my case gcc) in Emacs (version 23 for information) I use next-error Lisp function to jump to the next error :) But when I do this the window is split vertically, but I want this to be done horizontally. Anyone know how to modify this behavior? Thanks ...