Hi Sebast, :-) > Hi Ken, > > thank you for your patch. Good idea but with some problems in it: > > * A statusbar should IMHO directly inherits from QxHorizontalBoxLayout. > I have no idea why you came up with the idea to use QxCommonViewPane.
QxCommonViewPane was not even an idea..... I just put it there. I do not like the hierarchy created through layout classes. It is not logical and difficult at manipulation. I think the layout class of a widget should be a subclass of the widget and not a superclass. There is not inheritance which is natural!!! This is how it should be for any widget. It is fundamental for OO code, as you try to do it more OO. Additionally, you can then easily change the layout class for any widget, such as a toolbar, menubar etc. There won't be any dependence of layout by inheritance.... > * This would also reduce your code from the additional > horizontalBoxLayout which you, just to mention it, have created in the > from place: "applyInitialStyle" is to apply initial styles, like the > name says - not for creating additional sub-widgets. These should be > created inside the constructor whereever possible. This reduction is a minor problem! Less here, more in other places. > * Other things like the disposer integration looks good. > > By the way, I am not sure if this statusbar has some real effort. I > would like it better to create a more complex one. Like the ones in > typical applications, which consists of multiple text blocks and divider > between them. I agree! It was not really a try, only a start. I will upload a QxStatusBarPane class as in typical applications. Inside this QxStatusBarPane you can add any reasonable widget you wish. Additionally, I would like to see more than multiple text blocks. More changes to come. Kent > Regards, > > Sebastian > > > > > > Kent > > > > Here comes the code... > > > > QxStatusBar.js > > -------------- > > /* > > **************************************************************************** > > > > qooxdoo - the new era of web interface development > > > > Version: > > $Id: QxStatusBar.js,v 1.1.2.2 2005/11/22 23:50:35 kols Exp $ > > > > Copyright: > > (C) 2004-2005 by Schlund + Partner AG, Germany > > All rights reserved > > > > License: > > LGPL 2.1: http://creativecommons.org/licenses/LGPL/2.1/ > > > > Internet: > > * http://qooxdoo.oss.schlund.de > > > > Authors: > > * Kent Olsson (kols) > > <kent dot olsson at chello dot se> > > > > **************************************************************************** > > */ > > > > /* > > **************************************************************************** > > > > #package(statusbar) > > > > **************************************************************************** > > */ > > > > function QxStatusBar(statustext) { > > QxCommonViewPane.call(this); > > > > if (statustext.isValidString()) { > > var statusL = this._statusText = new QxLabel(statustext); > > > > statusL.setPadding(1, 4); > > statusL.setSelectable(false); > > statusL.setCursor(QxConst.CORE_DEFAULT); > > > > layout.add(statusL); > > }; > > }; > > > > QxStatusBar.extend(QxCommonViewPane, "QxStatusBar"); > > > > > > > > /* > > ------------------------------------------------------------------------------------ > > STYLES & BEHAVIOR > > ------------------------------------------------------------------------------------ > > */ > > > > proto._applyInitialStyle = function(statustext) > > { > > this.setBorder(1, QxConst.BORDER_STYLE_INSET, "windowtext"); > > this.setBackgroundColor("threedface"); > > > > var layout = new QxHorizontalBoxLayout; > > this.add(layout); > > }; > > > > /* > > ------------------------------------------------------------------------------------ > > UTILITIES > > ------------------------------------------------------------------------------------ > > */ > > > > proto.getStatusText = function() { > > return this._statusText; > > }; > > > > /* > > ------------------------------------------------------------------------------------ > > DISPOSER > > ------------------------------------------------------------------------------------ > > */ > > > > proto.dispose = function() > > { > > if (this._statusText) > > { > > this._statusText.dispose(); > > this._statusText = null; > > }; > > }; > > > > ------------------- > > Changed QxWindow.js > > ------------------- > > the section where it is created: > > > > // *********************************************************************** > > // STATUSBAR > > // *********************************************************************** > > > > this._statusBar = new QxStatusBar("Ready"); > > > > another change... > > > > proto._modifyStatus = function(propValue, propOldValue, propData) > > { > > this._statusBar.getStatusText().setHtml(propValue); > > > > return true; > > }; > > > > removed the following in the dispose() method... > > > > if (this._statusText) > > { > > this._statusText.dispose(); > > this._statusText = null; > > }; > > > > > > > > > > > > ------------------------------------------------------- > > This SF.net email is sponsored by: Splunk Inc. Do you grep through log files > > for problems? Stop! Download the new AJAX search engine that makes > > searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! > > http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click > > _______________________________________________ > > Qooxdoo-devel mailing list > > [email protected] > > https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel > > > > ------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. Do you grep through log files > for problems? Stop! Download the new AJAX search engine that makes > searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! > http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click > _______________________________________________ > Qooxdoo-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click _______________________________________________ Qooxdoo-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
