On Tue, Mar 30, 2010 at 03:48, acassarino <[email protected]> wrote:

>
> Hi Derrell,
>
> I'm ausig Mozzilla Firefox But nothing happens.
>

I spent some time trying to modify your snippet to something that would work
in the playground, but I can't figure out what you're trying to do. Please
do two things and give us the results. This should allow us to help figure
out what your problem is.

1. Test the context menu in the demobrowser and ensure it works properly:
http://demo.qooxdoo.org/current/demobrowser/#table~Table_Context_Menu.html

2. Revise this code to do what you're looking for in the playground:

playground: http://demo.qooxdoo.org/devel/playground/


qx.Class.include(qx.ui.table.Table, qx.ui.table.MTableContextMenu);

this.createTable = function()
{
  //tableModel
  var tableModel = new qx.ui.table.model.Simple();
  tableModel.setColumns(["Default ctx menu #1",
                         "Default ctx menu #2",
                         "Disabled ctx menu",
                         "Context-menu selectable"]);

  var rowData = this.createRandomRows(10);
  tableModel.setData(rowData);

  // table
  var table = new qx.ui.table.Table(tableModel);
  this.getRoot().add(table, { edge : 10 });

/*
  //menu
  var menu = new qx.ui.menu.Menu();
  qx.ui.menu.Menu
    var cutButton = new qx.ui.menu.Button("Cut");
  menu.add(cutButton);
  menu.add(copyButton);

  table.setContextMenuHandler(1,
                              this._contextMenuHandlerEmpty(1,
                                                            1,
                                                            table,
                                                            tableModel,
                                                            menu));
*/
}

this.nextId = 0;
this.createRandomRows = function(rowCount)
{
  var rowData = [];
  var now = new Date().getTime();
  var dateRange = 400 * 24 * 60 * 60 * 1000; // 400 days
  for (var row = 0; row < rowCount; row++)
  {
    var date = new Date(now + Math.random() * dateRange - dateRange / 2);
    rowData.push([ this.nextId++,
                   Math.random() * 10000,
                   date,
                   (Math.random() > 0.5)
                  ]);
  }
  return rowData;
},


this._contextMenuHandlerEmpty =
  function(col, row, table, dataModel,contextMenu)
  {
    return true;
  };

this.createTable();
------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to