Hi,

Instead of var p = PanelBar.prototype = new DynLayer
it should be var p =
dynapi.setPrototype('PanelBar','DynLayer');

Ahhh, that makes everything clear! Works now. Will this be changed in the CVS too?

This does not solve the problem I have with the constructor. I saw
a discussion about the PanelBar before where someone suggested to
move stuff out of the constructor. Will there be any fix to the
PanelBar regarding this "issue" (not able to subclass it)?

Keep up the good work,

Peter


--
Raymond Irving

--- Peter Romianowski <[EMAIL PROTECTED]> wrote:

Hi,

I have two problems here. First I cannot subclass
PanelBar until I comment out some stuff in the constructor like that:


function


PanelBar(lyrmnu,lyrcnt,mnuheight,x,y,w,h,mnucss,cntcss,minimized)


{

  this.DynLayer = DynLayer;
  this.DynLayer(null,x,y,w,h,null);

if (lyrmnu) {
this.x = x;
...



this.menu.setHTML(this._mnuhtml.replace('[EMAIL PROTECTED]',this._mnuhtmlmax));


  }
                
  this.onPreCreate(PanelBar.PreCreateEvent);
  this.onCreate(PanelBar.CreateEvent);
}
}

Is there any common pattern how to avoid problems
with subclassing? Or am I doing something totally stupid in trying to
subclass PanelBar?


The next problem is that I can't enable the
dragevents on my subclass of PanelBar until I change dragevent.js line 225
(enableDragEvents):


if(lyr.isClass('DynLayer'))
lyr.addEventListener(DragEvent.lyrListener);

to

lyr.addEventListener(DragEvent.lyrListener);

That is bruteforce, I know ;) I just tried to figure
out where the problem is. And I found that
myPanelBarSubclass.isClass('DynLayer') yields false which I consider as wrong - it is a
DynLayer since it is a subclass of PanelBar which is a subclass of
DynLayer! The quickest fix I can imagine is to rewrite the isClass-method to tell
whether any superclass matches the argument. I don't know if
this breaks something, so I didn't try that yet.


If I am trying to do something totally wrong then
please tell me! Otherwise I will gladly help "fixing" the issues.


Regards,
Peter

default disclaimer: DynAPI rules! ;)





-------------------------------------------------------


This SF.net email is sponsored by: The SF.net
Donation Program.
Do you like what SourceForge.net is doing for the
Open
Source Community?  Make a contribution, and help us
add new
features and functionality. Click here:
http://sourceforge.net/donate/
_______________________________________________
Dynapi-Dev mailing list
[EMAIL PROTECTED]


http://www.mail-archive.com/[EMAIL PROTECTED]/



__________________________________ Do you Yahoo!? Exclusive Video Premiere - Britney Spears http://launch.yahoo.com/promos/britneyspears/


------------------------------------------------------- This SF.net email is sponsored by: The SF.net Donation Program. Do you like what SourceForge.net is doing for the Open Source Community? Make a contribution, and help us add new features and functionality. Click here: http://sourceforge.net/donate/ _______________________________________________ Dynapi-Dev mailing list [EMAIL PROTECTED] http://www.mail-archive.com/[EMAIL PROTECTED]/



-- Peter Romianowski

coreg
Brunnenstraße 153
10115 Berlin

Telefon: 030 / 41 72 42 31
Fax:     030 / 41 72 42 39

Email:   mailto:[EMAIL PROTECTED]
Website: http://www.coreg.de



-------------------------------------------------------
This SF.net email is sponsored by: The SF.net Donation Program.
Do you like what SourceForge.net is doing for the Open
Source Community?  Make a contribution, and help us add new
features and functionality. Click here: http://sourceforge.net/donate/
_______________________________________________
Dynapi-Dev mailing list
[EMAIL PROTECTED]
http://www.mail-archive.com/[EMAIL PROTECTED]/

Reply via email to