Apr 08, 2010, 5:00 PM
Reference not defined problem since conversion from 0.8.2 to 1.0 RC Preview
Hello!
I first thank the folks at Coolite for releasing preview version of 1.0!
I am excited to try the new features and going through the changelog to convert my code from 0.8.2 to 1.0 alpha. There are quite a bit of changes!
Anyways, I did my best to convert most of the code to newer version and have been getting some errors referencing items that I did not have problem in 0.8.2. The code looks sorta like this:
This code has been working without any errors on 0.8.2. Did I miss something on the conversion?
Any help would be appreciated!
Edit: Grrr the forum is messing up my message!
I first thank the folks at Coolite for releasing preview version of 1.0!
I am excited to try the new features and going through the changelog to convert my code from 0.8.2 to 1.0 alpha. There are quite a bit of changes!
Anyways, I did my best to convert most of the code to newer version and have been getting some errors referencing items that I did not have problem in 0.8.2. The code looks sorta like this:
<ext:store runat="server" id="store1" serializationmode="Complex" grouponsort="True"
OnBeforeStoreChanged="SaveData" onrefreshdata="LoadData">
<Proxy>
<ext:PageProxy />
</Proxy>
<Reader>
<ext:JsonReader runat="server" IDProperty="MainDataReader">
<Fields>
<ext:RecordField Name="MyID"/>
<ext:RecordField Name="Title"/>
<ext:RecordField Name="Project"/>
</Fields>
</ext:JsonReader>
</Reader>
<Listeners>
<Load Handler="#{stoProject}.load();
#{pnlMainData}.getForm().loadRecord(this.getAt(0));
"/>
</Listeners>
</ext:store>
<ext:store runat="server" id="stoProject" serializationmode="Complex" grouponsort=" onrefreshdata="LoadProjectData">
<Proxy>
<ext:PageProxy />
</Proxy>
<Reader>
<ext:JsonReader runat="server" IDProperty="ProjectDataReader">
<Fields>
<ext:RecordField Name="ProjectID"/>
<ext:RecordField Name="ProjectTitle"/>
</Fields>
</ext:JsonReader>
</Reader>
</ext:store>
<ext:Panel runat="server" Id="pnlGlobal">
<Content>
<ext:BorderLayout Id="borderlayout1" runat="server">
<Center>
<ext:FormPanel runat="server" Id="pnlMainData" StoreID="store1" FormID="MainForm">
<Content>
<ext:FormLayout runat="server">
<Anchors>
<ext:Anchor Horizontal="98%"><ext:TextField runat="server" FieldLabel="ID" ID="txtID" DataIndex="myID" disabled="True"/></ext:Anchor>
<ext:Anchor Horizontal="98%"><ext:TextField runat="server" FieldLabel="Title" DataIndex="Title" ID="txtTitle"/></ext:Anchor>
<ext:Anchor Horizontal="98%">
<ext:ComboBox runat="server" ID="cboProject" FieldLabel="Project" StoreID="stoProject"
DisplayField="ProjectTitle" ValueField="ProjectID" EmptyText="Select A Project..." Selectonfocus="true"
AutoDataBind="True" Editable="False" DataIndex="Project" ForceSelection="true" Mode="remote" TriggerAction="all">
</ext:Anchor>
</Anchors>
</ext:FormLayout>
</Content>
<Buttons>
<ext:Button runat="server" Text="Test" id="btnTest">
<Listeners>
<Click Handler="alert('Project is' + #{cboProject}.getValue());"/>
</Listeners>
</ext:Button>
</Buttons>
</ext:FormPanel>
</Center>
</ext:BorderLayout>
</Content>
</ext:Panel>
I am getting error when I reference pnlMainData and cboProject in the following (separate) lines: #{pnlMainData}.getForm().loadRecord(this.getAt(0));
<Click Handler="alert('Project is' + #{cboProject}.getValue());"/>
The error message says pnlMainData and cboProject is not defined.This code has been working without any errors on 0.8.2. Did I miss something on the conversion?
Any help would be appreciated!
Edit: Grrr the forum is messing up my message!