interface

Is there a Hierarchical interface supplied by Microsoft .NET framework?

I want to implement a control with a specifiable DataSource property and it would be great if I could inherit and the type of the DataSource implements some sort of Hierarchical interface with properties and methods ensured. Does .NET supply such an interface? Googling revealed nothing. ...

Python wxPython how to align 2 toolbars on same the row, one aligned left and one aligned right!?

Hello. I use wxPython to sketch up a user interface for the a python program. I need to put 2 toolbars on the same row. One toolbar is on the left while the other is on the right. I use BoxSizer to achieve this (by putting a stretchable space between 2 toolbars) However, the stretchable space produces a blank space between 2 toolbar...

Avoiding many inheriting classes

Lets say I have this class (just as an example): internal class Packet { private readonly UInt32 _length; private readonly Byte _type; private readonly UInt32 _requestId; } There are many different types of packets each of which inherit from this class and each packet type can have any number of properties of varying typ...

Adding Extra method to interface

Hi friends, I have a tricky question on interface. Please try to give me a solution for it. Scenario: I have written an interface with five methods. Also I have implemented more than 100 classes using this interface. Now, I need to add one more method to the interface. Consequently, I will need to define the same method in all classes....

Interface Builder Tab Order Typing

Hi I have noticed, in one of my views in an iPad app I am building the next button on the keyboard goes through all the UITextFields from left to right down the screen. Is it possible somehow to make it go top to bottom then right, top to bottom? So say I have to two long columns of text fields, I wan to go top to bottom not left to r...

Covered from html to aspx page, but the menus disappeared, why?

The Code Part </head> <body> <script src="/c/Currency.js" type="text/javascript" ></script> <form id="form1" runat="server"> <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="true" > </asp:ScriptManager> <div id="Content"> <div class="nobg"> <div id="Top"> <div class="left"> <a hr...

Adding a property to an interface that's a List

This compiles: public interface IBookCatalogueView { Book[] Books { get; set; } } This doesn't, giving the error "Interfaces cannot contain fields" public interface IBookCatalogueView { List<Book> Books { get; set; } } > Why? How can I define a property that's a list in...

Automatic .ToString()?

Hi all, I have a method like this: void m1(string str) and have a class like this: public class MyClass { public bool b1 { set; get; } //and other properties } Now why following code does not cause compile error? IClass2 _class2 = new Class2(); MyClass c1 = new MyClass(); _class2.m1("abcdef" + c1); When I debug it, I real...

Why don't I get a compiler warning when I implement an interface that a base class also implements?

In the following code, I'm implementing an interface, and then deriving from that class and implementing the same interface. When I dispose an instance of the derived class, it only calls the derived implementation. Why wouldn't the C# compiler warn about this? It seems dangerous for a couple reasons. I could implement an interface that...

referencing an interface

Hi, I have a question regarding interfaces. I understood that you cannot create instances of interfaces, right? However I see on a page demonstrating usage of IDictionaryEnumerator interface: // Loop through all items of a Hashtable IDictionaryEnumerator en = hshTable.GetEnumerator(); while (en.MoveNext()) { string str = en.Value.To...

how can i interface with windows application from AIR application ?

Is there any way to interface applications outside AIR application ? some kind of generic interface from AIR and into AIR ? ...

ASP.NET MVC 2. Cannot create an instance of an interface.

I use ASP.NET MVC 2 for my project. I'm trying to edit my product information using next code: [HttpGet] public ActionResult Edit(int id) { IProduct product = productService.getProductById(id); return View(product); } IProduct and other IEntities are instansing using IoC Castle Windsor. Page for Edit i...

ASP.net Drop-In-Forms

Overview: I am looking to create a site that will centralize a lot of repetitive data input. I currently have a wizard built and I would like the Applications list to populate from a list of aspx pages or dll's located in the "forms" folder. While going through the wizard the user will select what applications they want to fill out forms...

Collection of generic types

Hi folks, I have an object (form) which contains a collection (.Fields) which I want to contain instances of a generic class (FormField). The FormField, simply, is defined as such: public class FormField<T> { private Form Form; public T Value { get; set; } public string Name { get; set; } public void Process() { ...

Reusing interfaces throughout your application

I am currently busy refactoring big parts in my application. The main purpose is to remove as much as possible dependencies between the different modules. I now stumble on the following problem: In my application I have a GUI module that has defined an interface IDataProvider. The interface needs to be implemented by the application ...

Java interface question

I'm confused (new to java): When implementing the Runnable interface, one must override the run() method to get thread execution capability. Implementing this interface makes your object a type Runnable (?). How does the thread functionality get "injected" by simply implementing the Runnable interface? Basically when you instantiate ...

Error (no data returned) when ResponseFormat:=WebMessageFormat.Json and attempting to serialize an Interface

Update: I have found that the error is occurring in the System.Runtime.Serialization.Json.XmlObjectSerializerWriteContextComplexJson.VerifyObjectCompatibilityWithInterface method. If I switch the WebMessageFormat to XML then it works fine. Is this a bug in the JSON Serializer? System.Runtime.Serialization.SerializationException occu...

QT Interface with Slots

I made an interface and plugins by following this tutorial: http://doc.trolltech.com/4.6/plugins-howto.html and everything is working fine. But know I would like to connect a Signal to a slot of the plugins. Trying to do that I get an error, that the interface i lacking the Q_OBJECT Macro. When I Add it I get an error that now the Inte...

Why the need for a strict enforcement of interfaces for classes in a Spring MVC service layer?

In the Spring web app I am working on, there is a service layer that relates to the rest of the web app structure like this: com/ myapp/ controller/ model/ service/ This service layer is made up of interface and implementation classes. Why is it so important to have interfaces for all of these classe...

Creating a .swc - why don't interfaces work, when classes do?

I'm making a game which loads map .swfs at runtime. The maps will contain graphics and code, which can both vary from map to map. I've decided to make all the maps implement an interface, so they can all be used in the same way by the game. I'm using a .swc to contain the interface, like in this page. I can get classes to work in the .s...