Hi Jim
>Delphi for PHP does not always include qx.js, it depends on the controls on
>the form. If you have a form that only has an edit box on it, then qx.js is
>not included. And if you then try to create a qx control via code, you will
>get this error. This is why I asked all the questions, I wanted to get a
>better idea of what he was trying to do. The only time I have every received
>that error is when I was trying to do things in code without having a
>qooxdoo control on the visual form. If this is his scenario, just drop a
>Window on the form and set the visibility to hidden. This will force
>qx.jstro be loaded and manual code should then work correctly.
>
No just drag and drop - with the dbgrid (a la qx.table).
Here's the html generated
HTH
D
<!-- Unit4 begin -->
<html >
<head>
<script type="text/javascript"
src="file:///e:/codegear/delphi4php/1.0/vcl/js/common.js"></script>
<script type="text/javascript">
var
xajaxRequestUri="http://localhost:3569/unit4.php?restore_session=1&DBGSESSID=1";
var xajaxDebug=false;
var xajaxStatusMessages=false;
var xajaxWaitCursor=true;
var xajaxDefinedGet=0;
var xajaxDefinedPost=1;
var xajaxLoaded=false;
function xajax_ajaxProcess(){return xajax.call("ajaxProcess",
arguments, 1);}
</script>
<script type="text/javascript"
src="file:///e:/codegear/delphi4php/1.0/vcl/xajax/xajax_js/xajax.js"></script>
<script type="text/javascript">
window.setTimeout(function () { if (!xajaxLoaded) { alert('Error: the
xajax Javascript file could not be included. Perhaps the URL is
incorrect?\nURL:
file:///e:/codegear/delphi4php/1.0/vcl/xajax/xajax_js/xajax.js'); } },
6000);
</script>
<title>Test Grid</title>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1" />
<script type="text/javascript"
src="file:///e:/codegear/delphi4php/1.0/vcl/qooxdoo/framework/script/qx.js"></script>
<script type="text/javascript">
qx.log.Logger.ROOT_LOGGER.setMinLevel(qx.log.Logger.LEVEL_FATAL);
qx.manager.object.AliasManager.getInstance().add("static",
"file:///e:/codegear/delphi4php/1.0/vcl/qooxdoo/framework/resource/static/");
qx.manager.object.AliasManager.getInstance().add("widget",
"file:///e:/codegear/delphi4php/1.0/vcl/qooxdoo/framework/resource/widget/windows/");
qx.manager.object.AliasManager.getInstance().add("icon",
"file:///e:/codegear/delphi4php/1.0/vcl/qooxdoo/framework/resource/icon/VistaInspirate/");
</script>
</head>
<body style=" margin-left: 0px; margin-top: 0px; margin-right: 0px;
margin-bottom: 0px; " bgcolor="#837C83" >
<form style="margin-bottom: 0" id="Unit4" name="Unit4" method="post"
action="/unit4.php">
<script type="text/javascript">
var d = qx.ui.core.ClientDocument.getInstance();
d.setOverflow("scrollY");
d.setBackgroundColor(null);
</script>
<table width="800" style="height:600px" border="0" cellpadding="0"
cellspacing="0" bgcolor="#837C83" ><tr><td valign="top">
<div id="ddzones1_outer" style="Z-INDEX: 0; LEFT: 96px; WIDTH: 502px;
POSITION: absolute; TOP: 232px; HEIGHT: 321px">
<input type="hidden" id="ddzones1_state" name="ddzones1_state"
value="" />
<div id="ddzones1"></div>
<script type="text/javascript">
var d = qx.ui.core.ClientDocument.getInstance();
var inline_div = new qx.ui.basic.Inline("ddzones1");
inline_div.setHeight("auto");
inline_div.setWidth("auto");
// table model
var ddzones1_tableModel = new
qx.ui.table.SimpleTableModel();
ddzones1_tableModel.setColumns([
"zone_id","zone_country_id","zone_code","zone_name" ]);
ddzones1_tableModel.ColumnNames=new Array(
"zone_id","zone_country_id","zone_code","zone_name");
var rowData = [];
var oData = [];
rowData.push([
"1","223","AL","Alabama" ]);
oData.push([
"1","223","AL","Alabama" ]);
rowData.push([
"2","223","AK","Alaska" ]);
oData.push([
"2","223","AK","Alaska" ]);
rowData.push([
"3","223","AS","American Samoa" ]);
oData.push([
"3","223","AS","American Samoa" ]);
rowData.push([
"4","223","AZ","Arizona" ]);
oData.push([
"4","223","AZ","Arizona" ]);
rowData.push([
"5","223","AR","Arkansas" ]);
oData.push([
"5","223","AR","Arkansas" ]);
rowData.push([
"6","223","AF","Armed Forces Africa" ]);
oData.push([
"6","223","AF","Armed Forces Africa" ]);
rowData.push([
"7","223","AA","Armed Forces Americas" ]);
oData.push([
"7","223","AA","Armed Forces Americas" ]);
rowData.push([
"8","223","AC","Armed Forces Canada" ]);
oData.push([
"8","223","AC","Armed Forces Canada" ]);
rowData.push([
"9","223","AE","Armed Forces Europe" ]);
oData.push([
"9","223","AE","Armed Forces Europe" ]);
rowData.push([
"10","223","AM","Armed Forces Middle East" ]);
oData.push([
"10","223","AM","Armed Forces Middle East" ]);
ddzones1_tableModel.originalData=oData;
ddzones1_tableModel.setData(rowData);
ddzones1_tableModel.setColumnEditable(0, true);
ddzones1_tableModel.setColumnEditable(1, true);
ddzones1_tableModel.setColumnEditable(2, true);
ddzones1_tableModel.setColumnEditable(3, true);
var ddzones1 = new qx.ui.table.Table(ddzones1_tableModel);
ddzones1.setBorder(qx.renderer.border.BorderPresets.getInstance().shadow);
ddzones1.setBackgroundColor("white");
ddzones1.setLeft(0);
ddzones1.setTop(0);
ddzones1.setWidth(502);
ddzones1.setHeight(321);
ddzones1.getSelectionModel().setSelectionMode(qx.ui.table.SelectionModel.MULTIPLE_INTERVAL_SELECTION);
ddzones1.getTableColumnModel().setColumnWidth(0,100);
ddzones1.getTableColumnModel().setColumnWidth(1,100);
ddzones1.getTableColumnModel().setColumnWidth(2,100);
ddzones1.getTableColumnModel().setColumnWidth(3,100);
function ddzones1_rpcdatachanged(event)
{
var obj;
obj=this;
data=event.getData();
modifiedRow=data.firstRow;
row=this.getRowData(modifiedRow);
orow=this.originalData[modifiedRow];
qx.Settings.setCustomOfClass("qx.io.Json",
"enableDebug", true);
var rpc = new qx.io.remote.Rpc();
rpc.setTimeout(10000);
var mycall = null;
rpc.setUrl("/unit4.php");
rpc.setServiceName("Unit4.ddzones1");
rpc.setCrossDomain(false);
mycall = rpc.callAsync
(
function(result, ex, id)
{
mycall = null;
event=new Object();
event.result=result;
event.ex=ex;
event.id=id;
if (result>=0)
{
if (obj)
{
row=obj.getRowData(result);
if (row)
{
obj.originalData[result]=row.slice();
}
}
}
send.setEnabled(true);
abort.setEnabled(false);
}
, "updateRow", this.ColumnNames, row, orow,
modifiedRow
);
}
ddzones1_tableModel.addEventListener("dataChanged",
ddzones1_rpcdatachanged, ddzones1_tableModel);
d.add(inline_div);
inline_div.add(ddzones1);
</script>
</div>
<div id="DBPaginator1_outer" style="Z-INDEX: 1; LEFT: 88px; WIDTH:
300px; POSITION: absolute; TOP: 152px; HEIGHT: 30px">
<table id="DBPaginator1_table" height="30" width="300" cellpadding="0"
cellspacing="0" style=" font-family: Verdana; font-size: 10px;
text-align: left; background-color: #837C83;" >
<tr valign="middle">
<td align="left"><a
href="unit4.php?DBPaginator1=first">First</a></td>
<td align="left"><a href="unit4.php?DBPaginator1=prev">Prev</a></td>
<td align="right"><a
href="unit4.php?DBPaginator1=next">Next</a></td>
<td align="right"><a
href="unit4.php?DBPaginator1=last">Last</a></td>
</tr>
</table>
</div>
</td></tr></table>
</form></body>
</html>
<!-- Unit4 end -->
David Moorhouse
Moorhouse Works ltd
www.moorhouse.co.nz
-------------------------------------------------------------------------
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