Hello List,
I'm new to Qooxdoo and having a little bit of trouble to get into it.
It's quite hard for a newby.
It would help a lot if you could offer some "complete" Applications on
the Qooxdoo homepage so you can
see how the parts work together (Client + Serverside eg). The
Bibliothekar application for example is awesome !!
I'm currently experimenting with the functions and classes I've allready
know (which aren't too much :-)) but
I ve got stuck. No idea to get this solved. I hope somebody can give me
the needed hint.
My Problem occurs on the ending of the Listing:
qx.OO.defineClass("custom.Application", qx.component.AbstractApplication,
function () {
qx.component.AbstractApplication.call(this);
this.barview = new qx.ui.pageview.buttonview.ButtonView;
});
qx.Proto.main = function(e)
{
/** Generate the Basic UI with the Button-Bar */
this.barview.set({ left: 20, top: 48, right: 335, bottom: 48 });
this.barview.setBarPosition("top");
this.barview.addToDocument();
/** Create the Pages for the Button-Bar View */
this._createPage(this.barview,
"Home","icon/32/wordprocessor.png",this._createHome(), "threedface");
this._createPage(this.barview,
"Settings","icon/32/wordprocessor.png",this._createSettings(),
"threedface");
/** check the HOME Button */
this.barview.getBar().getChildren()[0].setChecked(true);
};
qx.Proto._createPage = function(barView, title, iconUrl, widget,
backgroundColor, scrolls) {
var bt = new qx.ui.pageview.buttonview.ButtonViewButton(title, iconUrl);
if (barView.getBar().isEmpty()) { bt.setChecked(true); }
barView.getBar().add(bt);
var page = new qx.ui.pageview.buttonview.ButtonViewPage(bt);
barView.getPane().add(page);
page.set({ left:0, right:0, top:0, bottom:0 });
widget.setLocation(0, 0);
widget.set({ left:0, right:0, bottom:0, right:0 });
if (!scrolls) { widget.set({ height:null, width:null,
overflow:"auto" }); }
if (backgroundColor) { page.setBackgroundColor(backgroundColor); }
page.add(widget);
return page;
}
qx.Proto._createHome = function(){
var main = new qx.ui.layout.HorizontalBoxLayout;
main.setPadding(10); main.setSpacing(10);
var l1 = new qx.ui.basic.Label("Not much to read here right now");
l1.setStyleProperty("fontSize", "22px");
l1.setStyleProperty("fontWeight", "bold");
l1.setStyleProperty("fontStyle", "italic");
l1.setStyleProperty("textDecoration", "underline");
l1.setStyleProperty("textTransform", "uppercase");
main.add(l1);
return main;
}
qx.Proto._createSettings = function(){
var tabview1 = new qx.ui.pageview.buttonview.ButtonView;
tabview1.setLeft(20);tabview1.setTop(30);tabview1.setRight(30);tabview1.setBottom(30);
var tvb1_1 = new
qx.ui.pageview.buttonview.ButtonViewButton("Allgemein");
var tvb1_2 = new
qx.ui.pageview.buttonview.ButtonViewButton("Icons/Colors");
tvb1_1.setChecked(true);
tabview1.getBar().add(tvb1_1, tvb1_2);
var tvpage1_1 = new
qx.ui.pageview.buttonview.ButtonViewPage(tvb1_1);
var tvpage1_2 = new
qx.ui.pageview.buttonview.ButtonViewPage(tvb1_2);
tabview1.getPane().add(tvpage1_1, tvpage1_2);
var p7_navorientation = new qx.ui.layout.CanvasLayout;
var p7r_caption = new qx.ui.basic.Atom("Configure the Position
of the Navigation Bar");
var r1 = new qx.ui.form.RadioButton("Top", "top", null, true);
var r2 = new qx.ui.form.RadioButton("Right", "right");
var r3 = new qx.ui.form.RadioButton("Bottom", "bottom");
var r4 = new qx.ui.form.RadioButton("Left", "left");
p7_navorientation.set({
top:5,left:5,width:250,height:100,border:"1px solid
black",backgroundColor:"#FFFFAA"});
p7r_caption.setTop(5);p7r_caption.setLeft(5);
r1.set({ top:30,left:50 });r2.set({ top:50,left:100 });r3.set({
top:70,left:50 });r4.set({ top:50 });
p7_navorientation.add(p7r_caption,r1, r2, r3, r4);
tvpage1_1.add(p7_navorientation);
// ---- PROBLEM OCCURES HERE ------- //
var rm = new qx.manager.selection.RadioManager(null, [r1, r2,
r3, r4]);
rm.addEventListener("changeSelected", function(e) {
this.barview.setBarPosition(e.getData().getValue()); //
<- This is my PROBLEM
//alert(e.getData().getValue()); // <- Returns what I
expected - eg "right"
// ---- PROBLEM OCCURES HERE ------- //
});
// this.barview.setBarPosition("right"); // WORKS FINE !!!!!
// Icon & Color Themes
qx.manager.object.ImageManager.getInstance().createThemeList(tabview1,
0, 5);
qx.manager.object.ColorManager.getInstance().createThemeList(tabview1,
200, 5);
return tabview1;
}
The Call of "this.barview.setBarPosition" works just fine as long as I
do it OUTSIDE the RadioManager Event-Handling. But why !?
How can I solve this !?
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel