On Fri, Aug 14, 2009 at 12:21, aditya siram <aditya.si...@gmail.com> wrote:

> Hi all,
> I am using classes to categorize possible errors that can occur. For
> example, base class A has:
> properties {
>   errors : {init : ["GenericError"]}
> }
>
> and class B which extends A has :
> properties {
>   errors : {init : ["Class_B_Specific_Error"]}
> }
>
> I would like class B's 'errors' to also include class A's, so something
> like this:
> ["GenericError", "Class_B_Specific_Error"].


Relying on side effects like that would make for pretty
difficult-to-understand code, I think Instead of extending the property, in
class B's constructor you can do something like this:

construct : function()
{
  this.base(arguments);
  this.setErrors(this.getErrors().push("Class_B_Specific_Error"));
}

Derrell
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to