interface

jQuery Interface Fisheye left align issue

Using the groovy Fisheye function from the jQuery plugin Interface, and setting "halign" to "left" the effect seems to apply to the next image in the list rather than the one that the mouse is actually over. link ...

How do I make an abstract class properly return a concrete instance of another abstract class?

I recently reworked one of my own libraries to try out separating interface from implementation. I am having on final issue with a class that is meant to return an instance of another class. In the interface definition, I do something like struct IFoo { virtual const IBar& getBar() = 0; } and then in the concrete Foo getBar look...

iPhone Deck Game interface

Hello I wrote the code of a card game .. but now it's time todo the graphic and Interface What's the best approach to represent a card ?? a) CALayer b) UIView c) UIButton Which one is best to animate and receive user touches??? What do you recommend?? Thanks in advance ...

@Override on Implementation

Would you put the annotation in implementation class methods? Does it serve any purpose? If you mistype or don't have it, it is a compile error anyway. ...

C# Interfaces: Is it possible to refer to the type that implements the interface within the interface itself?

Hello, What I basically wish to do is design a generic interface that, when implemented, results in a class that can behave exactly like T, except that it has some additional functionality. Here is an example of what I'm talking about: public interface ICoolInterface<T> { T Value { get; set; } T DoSomethingCool(); } public cl...

iPhone search bar design

I currently am implementing a search bar for one of my apps and I am having a problem with the indexed search overlapping it. I need to move the search field a little to the left so that way the index search is completely visible and not overlapping my search bar. I have tried a few things in interface builder but nothing is working. If ...

In Interface Builder, can I change the parent view of a view without changing its position?

I have a .xib file that I have many views in. I would like to move these many views into a subview, to allow my code to easily move everything all at once under a new condition in my app (I want to slide the entire display up while a keyboard is displayed). When I drag a view (button, image view, label, etc) to a different view in order...

Should I use an API/ABC when designing a class used by several in C++?

Hi, I am about to add a class X that will be used by my three previously designed classes (A, B and C). The new class X will contain data and functions for new features as well as provide services to the classes that use it to hide lower layers. The problem is that A, B and C will use class X quite differently, that is, use different ...

How to implement an interface explicitly with a virtual method?

I can't do this interface InterfaceA { void MethodA(); } class ClassA : InterfaceA { virtual void InterfaceA.MethodA() // Error: The modifier 'virtual' is not valid for this item { } } Where the following works class ClassA : InterfaceA { public virtual void MethodA() { } } Why? How to circumvent th...

Sharing Interface between different processes..

Currently I am working on a problem which is implemented as a combination of different modules. Each module is written in C# and is supposed to run as separate Process. I have an Interface I, and a class, Let's call it X, which implements this I. This class encapsulates information that is required by all the modules. Now what would be ...

Design question: Different types of transactions in a system

In my framewrok I have an ITransaction interface. It implements some basic operations like Commit() and Rollback(), it is being used for flat files and other data sources. However NHibernate has an ITransaction interface as well. It is not the same as my interface since there are some database specific methods but there are similarities....

A design problem involving Collections, Generics and Interfaces in C#

This post contains a lot of code, but I would really appreciate it if you took the some to read and understand it...and hopefully come up with a solution Let's assume that I am structuring a network-game where the entities need to be drawn and some of them updated from the server accordingly. The Drawable class is in charge of drawing ...

Why does a method prefixed with the interface name not compile in C#?

Why does the following not compile? interface IFoo { void Foo(); } class FooClass : IFoo { void IFoo.Foo() { return; } void Another() { Foo(); // ERROR } } The compiler complains that "The name 'FooMethod' does not exist in the current context". However, if the Foo method is changed to: public void Foo() { return; } ...

C# - How to test at runtime which COM coclass was used to instantiate an interface?

Suppose you have a COM interface ICOMInterface that is implemented by coclasses Coclass1 and Coclass2. Neither of these coclasses have interfaces of their own (for simplicity's sake and to illustrate my issue). In C#, you can create an instance of a COM interface from a coclass like so: ICOMInterface myComInterface = new Coclass1(); ...

Explaining Interfaces to Students

For a few years I was a teaching assistant for an introduction to programming module - Java for first year undergraduates. Mostly it went well and we managed to get object-oriented programming across to the students quite well, but one thing that students rarely saw the point of was interfaces. Pretty much any explanation we gave eithe...

Is there any way to create default property implementations for C# interfaces

I like the technique of creating extension methods against interfaces to provide default functionality. One of the places it is very handy is in putting some meat on dummy classes for unit tests. For example, public interface IEmployee { IAddress Address { get; set; } IAddress GetAddress(); void SetAddress(IAddress addres...

interactive cd-rom software

hi Could someone please recommend any software that can be used to create interactive CDROMs? we have a possible job whereby an interactive CD ROM with basic animation is required. Company information is to be placed in various "Pages", and if possible some kind of "catalogue system" for a lot of PDFs would be available. Any suggestio...

Java: implementing MutableTreeNode, remove similar old methods?

Hello everybody, I'm getting closer to fully implementing a JTree to represent a collection of Series. The hierarchy is Show > Season > Episode. These are all classes and each one of them implements the MutableTreeNode interface. When starting this project I didn't know that I was going to need this interface, so I defined methods lik...

Automapper: Formatter for Interface Property

If I have some classes that implement the same interface, so they all contain the same property. Is there a way to add a formatter to these properties? I only found the possibility to add a formatter to a specific property type. Here's some code that should clarify what I mean: public interface ITaggable { IList<string> Tags { get;...

Difference between usage of Interfaces and implementation classes in Java

Possible Duplicate: Type List vs type ArrayList in Java Why is it recommended to do this: List<String> myArrayList = new ArrayList<String> or same with Map interface and HashMap class rather than: ArrayList<String> myArrayList = new ArrayList<String> ...