Hello Qooxdoo'ers

I am trying to make a ToolBar Button call a function, my code is only a
slight variant from the ShowCase Toolbar code. I keep getting the message
"object doesn’t support this action".

Main Calls _createToolBar:

Button Created in a function "_createToolBar":
//    New / Open Buttons
var part = new qx.ui.toolbar.Part;
tb.add(part);
part.add(createButton(this, "New", "document-new", "New Portfolio",
this._uiActNewPortfolio));

//TOOL BAR
function createButton(app, text, icon, toolTip, callBack, clazz, checked)
{
  if (!clazz) {
    clazz = qx.ui.toolbar.Button;
  }
  var button = new clazz(text, "icon/22/actions/" + icon + ".png");
  button.addEventListener("click", function(e) { alert("Hi"); }, app); 

  button.setToolTip(new qx.ui.popup.ToolTip(toolTip,
"icon/16/status/dialog-information.png"));
  if (checked) {
    button.setChecked(true);
  }
  return button;
}

This may be a newby question, but I have searched the API and tried
different things for a while now and can't get it working.


Thanks for your time,

Jared Broad

No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.476 / Virus Database: 269.10.2/890 - Release Date: 7/07/2007
3:26 p.m.
 


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to