So, hypothetically, I'm building some sort of real estate application in C#. For each type of property, I'm going to create a class such as ResidentialProperty and CommercialProperty. These two classes as well as all other property classes will share some common properties, such as Id, Title, Description, and Address information.
What I...
I am currently trying to develop a cross-platform solution that will make some UI components that are not already part of the java standard library available to my java code. I am writing xlib code for X11 and using the relevant win32 api's for windows.
Is it possible (or even recommended?) to setup a java and c code build system using ...
With the new extended RTTI in Delphi 2010, can a Delphi application (at run time) build a list of all classes which implement a given interface?
...
I got this question for homework, and I'm not sure how to answer it. Could you help me out? :)
...
for reasons beyond the scope of this discussion (say xcopy an aspx page to a directory, so that we dont have to get a new build out) , we would like to implement an interface in an aspx page.Say, if the page is myPage.aspx, it is usually your class in the codebehind mypage.aspx.cs which implements the interface. When I do something like...
Hi All,
I would like to know the significant use of Interface. I have read many articles but not getting clearly the concept of interface.
I have written a small program. I have defined the Interface Itest.Class(Manager) has implemented the Interface.Another class(Employee) has not implemented interface. But defined the same method(DoS...
I wonder if it is in any way possible to specialize generic interface methods somehow in C#? I have found similar questions, but nothing exactly like this. Now I suspect that the answer is "No, you can't" but I would like to have it confirmed.
What I have is something like the following.
public interface IStorage
{
void Store<T>(T ...
Hi all,
I want to have an interface A parameterised by T A<T>, and also want every class that implements it to also implement Comparable (with T and its subtypes). It would seem natural to write interface A<T> extends Comparable<? extends T>, but that doesn't work. how should I do it then?
...
Is there any specific reason why interfaces are not compiled into MyInterface.java compiled into .interface file?But any class is compiled into .class file.!
...
Hi,
I want to know how to create an object to an interface ie @protocol in Objective-C?
...
I ran into some code today that I found questionable. Here's a simplified example (not realistic).
public interface IListable {
//returns first n items from list
public ArrayList getFirstNThings(int n);
//returns last n items from list
public ArrayList getLastNThings(int n);
}
Then there's an implementor like so:
pu...
I have some code that works without having referencing outlets for the controls - just event ties in Interface Builder. Is this ok and is a referencing outlet only necessary to change the state of a UI control?
Thanks.
...
Hello,
I need to develop an application which has a interface which implements methods of 3 protocols.
Assume protocol A extends protocol B and protocol C, and interface implements protocol A.
This is how my code looks,
// This is in MyClass.h file
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import "protocol_A"
@interfac...
Hello,
how to assign object of interface to a protocol's object?
i've a protocolA and protocolB. all the methods of both the protocols is implemented in MyClass.How to restrict the access to only protocolA's methid and protocolB's methods ?Coding is done in Objective-C for iPhone application.
...
I've been reading through the book Working Effectively with Legacy Code and I've been playing around with the concept of overriding difficult to test methods in unit tests via the creation of a fake. I put together an example of what I thought would work and it ended up behaving differently than I had been expecting. I think I've just di...
I know the interface of the .class file
lets say Boolean xy(); is the only method.
I want to execute the method of an unknown .class file which implements that interface on my server.
The Method should be able to call some Methods of my classes.
How can i be assured or test that no dangerous stuff is executed in the method?
...
I was wondering why the sort method of the Arrays class is asking for a parameter of type Object[]. Why the parameter is not of type Comparable[]. If you don't pass a Comparable[] it's generating a ClassCastException.
Why ... public static void sort(Object[] a) and not public static void sort(Comparable[] a) ?
Thanks
...
In PHP, can I specify an interface to have fields, or are PHP interfaces limited to functions?
<?php
interface IFoo
{
public $field;
public function DoSomething();
public function DoSomethingElse();
}
?>
If not, I realize I can expose a getter as a function in the interface:
public GetField();
...
Hi,
Firstly, I want to apologize for my English, not my strongest side.
To the question. In my current project, I have interfaces to my entities so I can use Subsonic attributes at my head entites and I want to be able to seamlessly switch O/R mapper in the future.
Anyway, I get an error when I try to use my interfaces and SimpleReposit...
I'm coding an iPhone app annd I currently have a View that looks like this:
I'm wondering if there is a way to make it shiny and glossy like the Phone.app call screen.
Thanks!
...