I want to extend the FileReference class of Flex to contain a custom property. I want to do this because AS3 doesn't let me pass arguments to functions through event listeners, which makes me feel sad, so I need this property to exist on the event target, so I can access it.
I also want to be able to cast extant FileReference objects to...
In all the languages that I understand this is not possible but someone was telling me it was possible in C++ but I have a hard time believing it. Essentially when you parameterize a class you are creating a unique class in the compilation stage aren't you?
Let me know if I am not being clear with my question.
Here is my attempt at ex...
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 this question might be frowned upon, but actionscript is a dynamic language similar to javascript and in javascript I can take an object from a library written by someone else and dynamically (at runtime) add/remove/modify functions, properties, prototypes etc. this is kind of like dynamically extending an object to make it work w...
class SomeModel < ActiveRecord::Base
named_scope :recent, lambda { { :conditions => ['created_at > ?', 1.week.ago] } }
end
I want to extend the AR::Base class to have this named_scope for all models, how I can do this ?
...
Hi, I'm new to PHP oop stuff.
I'm trying to create class database and call other classes from it. Am I doing it the right way?
class database:
class database extends mysqli {
private $classes = array();
public function __construct() {
parent::__construct('localhost', 'root', 'password', 'database');
if (mysqli_connect_error()) {...
Hello all,
I created a simple custom control that only inherits from the Literal control, and doesn't have any extensions yet, code is empty.
Namespace: CustomControls
Class name: Literal : System.Web.UI.WebControls.Literal
Next thing I do is registering this control in the aspx page as following:
<%@ Register TagPrefix="web" Namesp...
I want to extended, not just create a new instance of a class I have sitting in my vendors directory. I googled and read the docs but I see no support for it.
Can I do an app import of the 3rd party class, then write up the extended class followed by a component that will use my child class?
i.e
/* vendors/yahooapi/yahoo.class.php */...
I'm presently working on a project in Dashcode, and am getting increasingly frustrated at how the default classes have very little in the way of bind-able events much like jQuery uses. Dashcode doesn't let me edit the files, which I'm guessing is because until the project is exported they're a standard set of core classes. I'm thus conte...