class

C++ - "Member function not declared" in derived class

I have a problem in MSVC++ 2008 where VS2008 is throwing this compile error: error C2509: 'render' : member function not declared in 'PlayerSpriteKasua' Now, what's confusing me is that render() is defined, but in an inherited class. The class definition works like this: SpriteBase -Inherited By-> PlayerSpriteBase -Inherited By-> Pl...

Reference or tutorial to clarify object reference confusion

Working with my ongoing TFrames-based component set project, I'm coming across various instances where I am wanting to replace one of the TFrame's components (usually non-visual) at runtime with one that is generated dynamically at runtime. I think I've probably found the answer to my immediate problem here, but in my own digging arou...

How to make class not derivable at all. is there any way?

Hi any one let me know How to make class not derivable at all. is there any way? please let me know. regards Hara ...

PHP Class arguments in functions

Hi, I'm having trouble using an argument from my class in one of that class's functions. I have a class called company: class company { var $name; function __construct($name) { echo $name; } function name() { echo $name; } } $comp = new company('TheNameOfSomething'); $comp->name(); When I instantiate...

PHP stdClass question

Scenario: $x = json_decode( $x ); foreach ( $x as $item ) { $info[] = $item; //ERROR } I am looping though a datafeed to get the data. I want to add items to a stdClass object in a loop. How would I do that? I'm not that familiar with stdobj's. ...

Is it possible to save arbitrary data to a file in C#?

I have a class with many collections loaded in memory. Is it possible to some how save this class with all its data to a file to be able to simply reload it to memory later? Is there an interface that would handle all this? ...

C++ Class Extension

Hi Is there a way to add new methods to a class, without modifying original class definition (i.e. compiled .lib containing class and corresponding .h file) like C#'s class extension methods? ...

AS2 to AS3 time function.

hello All. I use to do this on AS2 code. this.pause3Seconds = function () { trace(_global.something(_root.somthing)); clearInterval(myInt); }; var myInt = setInterval(this, "pause3Seconds", 3000); Now trying to worked out this into a class.as file got all type of migration errors and warning. So here I'm. anyb...

Declaring an object at class level, problems. iPhone Objective-C

Objective C on iPhone: I am attempting to declare the following object at class level so that i do not have to re-connect this socket every time I write something to it. (Writing things multiple times a second) whenever i am writing a steady stream of live data, about every 2 seconds it freezes. I don't know why, but it does. Code: Soc...

Find where a class was instantiated

I have trying to solve the error : Fatal error: Cannot redeclare class I have been looking everywhere and I can't find where the class was instantiated. Is there anyway I can print debug info about the existing instance of that class. ...

jQuery hover callback function problem

I'm trying to get an image to stay opaque when clicked on, along with a fade in/out function on hover. When clicked it will remove one class and add a 'selected' class to the element. Problem is that altough the original class is removed, the callback still executes as if the class is still in the element. Thus, if you click on it, it ch...

Is there an elegant way to add multiple HTML classes with XSLT?

Let's say I'm transforming a multiple-choice quiz from an arbitrary XML format to HTML. Each choice will be represented as an HTML <li> tag in the result document. For each choice, I want to add an HTML class of correct to the <li> if that choice was the correct answer. Additionally, if that choice was the one selected by the user, I wan...

Python __getattribute__ (or __getattr__) to emulate php __call

I would like to create a class that effectively does this (mixing a little PHP with Python) class Middle(object) : # self.apply is a function that applies a function to a list # e.g self.apply = [] ... self.apply.append(foobar) def __call(self, name, *args) : self.apply(name, *args) Thus allowi...

BlazeDS and Java class in WAR file

Hi I have a java class which has been deployed as WAR web application in a BlazeDS/Spring server sitting on JBOSS. Apart from the Flex application which will access the WAR file, I also need to start some server side process's which will initiate BlazeDS "pushes" to the Flex client via AMF messaging. What is the best way to implement t...

C# Generics : List<Object> or new class extends List <Object>

I have a class called Product in my Business object and in another class i want to return a list of objects of this class.Which approach i should use ? public static List<Product> GetProductList() { .... } or create another class in my Business object namspace called ProductList which extends List <Products> as follows: public class...

VB6 Collection Remove Doesn't Fire Class_Terminate

I apologize in advance; this is a long question. I've tried to simplify as much as I can but it's still a bit more long-winded than I'd care to see. In some legacy code, we've got a VB6 collection. This collection adds objects via the .Add method and removes them via the .Remove method. However, via tracing I can see that sometimes w...

c++ class with templates compilation error

I'm not an experienced C++ programmer and I'm having problems compiling. I've got a Heap class that uses a template: template <class T> class Heap { public: Heap(const vector<T>& values); private: vector<T> d; // etc. }; And then in a separate implementation file: template <class T> Heap<T>::Heap(const vector<T>& val...

how to solve this problem with a cast of iterator ?

The compiler (VC8) error is: error C2680: 'std::_Tree<_Traits>::iterator' : invalid target type for dynamic_cast the source code to simulate the error : [EDIT]source fixed now #include <map> #include <string> struct tag_data { int in; int on; std::string sn; }; class myclass { private: typedef std::map<std::string, tag...

what are the maximum length of PHP variable/function/class name ?

Please if you know, make a response. thanks ...

Generic function on a list of derived class

Hi; I feel my question is pretty dumb, or another way to put it is : I'm too lost in my code to see a workaround for now. Stay too long on a problem, and your vision becomes narrower and narrower ><. Plus I'm not good enough with inheritance, polymorphism and so Here is the idea : I have multiple list of derived class, and I would like...