not sure how is the best way d doing what your doing. all I know is that
the prototype is very separate from the constructor. The prototype is
created when the JS parser gets to it. The constructor is not called until
you create an instance of that object.
bottom line. you're on the wrong path : )
GORTSILAS ANDREAS wrote:
> Can you tell me if the following is correct?
>
> function AGVisComp(oOwner, sType, bIsLayer, id, x, y, w, h) {
> if (bIsLayer) {
> this.DynLayer=DynLayer;
> this.DynLayer(id,x||0,y||0,w||128,h||18);
> }
> else {
> this.Object = Object;
> this.Object();
> }
>
> // Propeties
> this.type = sType || 'label';
> this.owner = oOwner || ApplObj;
> this.container = null;
> this.isLayer = bIsLayer || false;
> }
> AGVisComp.prototype = (this.isLayer)?new DynLayer():new Object();
>
> I want an object (AGVisComp) inherited by the DynLayer or by the Object
> (bIsLayer parameter)
>
> Thanks
>
> Andreas Gortsilas
>
> _______________________________________________
> Dynapi-Help mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/dynapi-help
--
Michael Pemberton
[EMAIL PROTECTED]
ICQ: 12107010
_______________________________________________
Dynapi-Help mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/dynapi-help