[extpascal] r809 committed - Updating examples for Ext JS 4.2

30 views
Skip to first unread message

extp...@googlecode.com

unread,
Mar 30, 2013, 6:01:35 PM3/30/13
to extp...@googlegroups.com
Revision: 809
Author: wanderl...@gmail.com
Date: Sat Mar 30 15:01:19 2013
Log: Updating examples for Ext JS 4.2
http://code.google.com/p/extpascal/source/detail?r=809

Modified:
/trunk/ExtJSWrapper/Ext.pas
/trunk/ExtJSWrapper/ExtFixes.txt
/trunk/ExtJSWrapper/ExtToPascal.dsk
/trunk/ExtPascalSamples/AdvancedTabs.pas
/trunk/ExtPascalSamples/BorderLayout.pas
/trunk/ExtPascalSamples/LayoutWindow.pas

=======================================
--- /trunk/ExtJSWrapper/Ext.pas Sat Mar 30 13:46:36 2013
+++ /trunk/ExtJSWrapper/Ext.pas Sat Mar 30 15:01:19 2013
File is too large to display a diff.
=======================================
--- /trunk/ExtJSWrapper/ExtFixes.txt Sat Mar 30 13:46:36 2013
+++ /trunk/ExtJSWrapper/ExtFixes.txt Sat Mar 30 15:01:19 2013
@@ -87,9 +87,9 @@
ExtProgressWaitConfig, fn, ExtFunction, false, true,
ExtProgressWaitConfig, scope, ExtObject, false, true,

-
+ExtTabPanel, beforetabchange, Event, tabPanel, ExtTabPanel, newCard,
ExtPanel, oldCard, ExtPanel
+ExtTabPanel, tabchange, Event, tabPanel, ExtTabPanel, newCard, ExtPanel,
oldCard, ExtPanel

-*ExtBoxComponent, region, (rgCenter, rgNorth, rgEast, rgSouth, rgWest)
*ExtComponent, xtype, (xtBox, xtButton, xtButtonGroup, xtColorPalette,
xtComponent, xtContainer, xtCycle, xtDataView, xtDatePicker, xtEditor,
xtEditorGrid, xtFlash, xtGrid, xtListView, xtPaging, xtPanel, xtProgress,
xtPropertyGrid, xtSlider, xtSpacer, xtSplitButton, xtStatusBar, xtTabPanel,
xtTreePanel, xtViewPort, xtWindow, xtToolbar, xtTBButton, xtTBFill,
xtTBItem, xtTBSeparator, xtTBSpacer, xtTBSplit, xtTBText, xtMenu,
xtColorMenu, xtDateMenu, xtMenuBaseItem, xtMenuCheckItem, xtMenuItem,
xtMenuSeparator, xtMenuTextItem, xtForm, xtCheckBox, xtCheckBoxGroup,
xtCombo, xtDateField, xtDisplayField, xtField, xtFieldSet, xtHidden,
xtHTMLEditor, xtLabel, xtNumberField, xtRadio, xtRadioGroup, xtTextArea,
xtTextField, xtTimeField, xtTrigger, xtChart, xtBarChart, xtCartesianChart,
xtColumnChart, xtLineChart, xtPieChart)
*ExtContainer, defaultType, (ExtComponentXType)
*ExtDomElement, defaultUnit, (CSSUnit)
=======================================
--- /trunk/ExtJSWrapper/ExtToPascal.dsk Sat Mar 30 13:46:36 2013
+++ /trunk/ExtJSWrapper/ExtToPascal.dsk Sat Mar 30 15:01:19 2013
@@ -17,10 +17,10 @@

[Modules]
Module0=A:\ExtPascal\ExtJSWrapper\ExtToPascal.dproj
-Module1=A:\ExtPascal\ExtJSWrapper\ExtFixes.txt
-Module2=A:\ExtPascal\ExtJSWrapper\Ext.pas
+Module1=A:\ExtPascal\ExtPascal.pas
+Module2=A:\ExtPascal\ExtJSWrapper\ExtFixes.txt
Module3=A:\ExtPascal\ExtJSWrapper\ExtFixes3.txt
-Module4=A:\ExtPascal\ExtPascal.pas
+Module4=A:\ExtPascal\ExtJSWrapper\Ext.pas
Module5=A:\ExtPascal\ExtPascalUtils.pas
Count=6
EditWindowCount=1
@@ -28,18 +28,18 @@
[A:\ExtPascal\ExtJSWrapper\ExtToPascal.dproj]
ModuleType=TBaseProject

-[A:\ExtPascal\ExtJSWrapper\ExtFixes.txt]
+[A:\ExtPascal\ExtPascal.pas]
ModuleType=TSourceModule
-
-[A:\ExtPascal\ExtJSWrapper\Ext.pas]
-ModuleType=TSourceModule
FormState=0
FormOnTop=0

+[A:\ExtPascal\ExtJSWrapper\ExtFixes.txt]
+ModuleType=TSourceModule
+
[A:\ExtPascal\ExtJSWrapper\ExtFixes3.txt]
ModuleType=TSourceModule

-[A:\ExtPascal\ExtPascal.pas]
+[A:\ExtPascal\ExtJSWrapper\Ext.pas]
ModuleType=TSourceModule
FormState=0
FormOnTop=0
@@ -76,9 +76,9 @@
TopPanelSize=0
LeftPanelSize=0
RightPanelSize=0
-BottomPanelSize=1578
+BottomPanelSize=1600
BottomPanelClients=DockSite1,MessageView
-BottomPanelData=0000080001000100000009000000446F636B5369746531724500000000000000E5090000000000000100000000724500000F0000004D65737361676556696577466F726DFFFFFFFF
+BottomPanelData=0000080001020100000009000000446F636B536974653172450000000000000240060000000000000100000000724500000F0000004D65737361676556696577466F726DFFFFFFFF
BottomMiddlePanelSize=0
BottomMiddlePanelClients=DockSite0,GraphDrawingModel

BottomMiddelPanelData=0000080001020200000009000000446F636B536974653010000000477261706844726177696E67566965779A1D00000000000002F206000000000000FFFFFFFF
@@ -87,7 +87,7 @@
[View0]
CustomEditViewType=TEditView
Module=A:\ExtPascal\ExtJSWrapper\ExtToPascal.dpr
-CursorX=1
+CursorX=3
CursorY=15
TopLine=1
LeftCol=1
@@ -98,9 +98,9 @@
[View1]
CustomEditViewType=TEditView
Module=A:\ExtPascal\ExtJSWrapper\ExtFixes.txt
-CursorX=25
-CursorY=77
-TopLine=62
+CursorX=1
+CursorY=89
+TopLine=84
LeftCol=1
Elisions=
Bookmarks=
@@ -109,9 +109,9 @@
[View2]
CustomEditViewType=TEditView
Module=A:\ExtPascal\ExtJSWrapper\ExtFixes3.txt
-CursorX=1
-CursorY=73
-TopLine=51
+CursorX=27
+CursorY=93
+TopLine=76
LeftCol=1
Elisions=
Bookmarks=
@@ -169,11 +169,11 @@
Left=0
Top=0
Width=3825
-Height=1044
+Height=1067
MaxLeft=-1
MaxTop=-1
ClientWidth=3825
-ClientHeight=1044
+ClientHeight=1067
TBDockHeight=211
LRDockWidth=13600
Dockable=1
@@ -181,7 +181,7 @@

[Breakpoints]
Count=1
-Breakpoint0='E:\extpascal\ExtJSWrapper\ExtToPascal.dpr',747,'',0,1,'',1,0,0,'',1,'','','',0,''
+Breakpoint0='E:\extpascal\ExtJSWrapper\ExtToPascal.dpr',750,'',0,1,'',1,0,0,'',1,'','','',0,''

[EmbarcaderoWin32Debugger_AddressBreakpoints]
Count=0
@@ -237,12 +237,12 @@
Left=0
Top=23
Width=10000
-Height=1322
+Height=1344
MaxLeft=-1
MaxTop=-1
ClientWidth=10000
-ClientHeight=1322
-TBDockHeight=1322
+ClientHeight=1344
+TBDockHeight=1344
LRDockWidth=2769
Dockable=1
StayOnTop=0
@@ -297,11 +297,11 @@
Left=0
Top=0
Width=3825
-Height=1044
+Height=1067
MaxLeft=-1
MaxTop=-1
ClientWidth=3825
-ClientHeight=1044
+ClientHeight=1067
TBDockHeight=411
LRDockWidth=4950
Dockable=1
@@ -316,11 +316,11 @@
Left=0
Top=0
Width=3825
-Height=1044
+Height=1067
MaxLeft=-1
MaxTop=-1
ClientWidth=3825
-ClientHeight=1044
+ClientHeight=1067
TBDockHeight=211
LRDockWidth=7406
Dockable=1
@@ -339,11 +339,11 @@
Left=0
Top=0
Width=3825
-Height=1044
+Height=1067
MaxLeft=-1
MaxTop=-1
ClientWidth=3825
-ClientHeight=1044
+ClientHeight=1067
TBDockHeight=1533
LRDockWidth=3481
Dockable=1
@@ -358,11 +358,11 @@
Left=0
Top=0
Width=3825
-Height=1044
+Height=1067
MaxLeft=-1
MaxTop=-1
ClientWidth=3825
-ClientHeight=1044
+ClientHeight=1067
TBDockHeight=2056
LRDockWidth=3481
Dockable=1
@@ -595,11 +595,11 @@
Left=0
Top=0
Width=3825
-Height=1044
+Height=1067
MaxLeft=-1
MaxTop=-1
ClientWidth=3825
-ClientHeight=1044
+ClientHeight=1067
TBDockHeight=1544
LRDockWidth=8744
Dockable=1
@@ -688,12 +688,12 @@
Left=0
Top=23
Width=3825
-Height=1322
+Height=1344
MaxLeft=-1
MaxTop=-1
ClientWidth=3825
-ClientHeight=1322
-TBDockHeight=1322
+ClientHeight=1344
+TBDockHeight=1344
LRDockWidth=3825
Dockable=1
StayOnTop=0
=======================================
--- /trunk/ExtPascalSamples/AdvancedTabs.pas Fri Mar 22 14:59:53 2013
+++ /trunk/ExtPascalSamples/AdvancedTabs.pas Sat Mar 30 15:01:19 2013
@@ -54,15 +54,13 @@
Handler := Ajax(AddTab);
OnClick := HandleExtButtonClick; // Delphi style event handler
end;
- RenderTo := 'body';
- ActiveTabNumber := 0;
- ResizeTabs := true; // turn on tab resizing
- MinTabWidth := 115;
- TabWidth := 135;
- Width := 600;
- Height := 150;
- Defaults := JSObject('autoScroll:true');
- EnableTabScroll := true;
+ RenderTo := 'body';
+ ActiveTab := 0;
+ Resizable := true; // turn on tab resizing
+ MinTabWidth := 115;
+ Width := 600;
+ Height := 150;
+ AutoScroll := true;
if Tabs = 0 then
Tabs := 7
else
@@ -71,7 +69,7 @@
SelfSession.AddShowSourceButton(Buttons, 'AdvancedTabs');
end;

-procedure TAdvancedTabs.HandleExtButtonClick(This: TExtButton; E:
TExtEventObjectSingleton); begin
+procedure TAdvancedTabs.HandleExtButtonClick(This: TExtButton; E:
TExtDirectEvent); begin
ExtMessageBox.Alert('alert', 'event handled successfully');
end;

=======================================
--- /trunk/ExtPascalSamples/BorderLayout.pas Fri Mar 22 14:59:53 2013
+++ /trunk/ExtPascalSamples/BorderLayout.pas Sat Mar 30 15:01:19 2013
@@ -18,12 +18,12 @@
implementation

uses
- ExtPascalUtils, Session, Ext;
+ ExtPascalUtils, Session;

constructor TBorderLayout.Create;
var
- Tree : TExtTreeTreePanel;
- Node : TExtTreeTreeNode;
+ Tree : TExtTreePanel;
+ Node : TExtDataNodeInterface;
begin
inherited;
with SelfSession do begin
@@ -33,60 +33,61 @@
'.settings{background:url(' + ExtPath
+ '/examples/shared/icons/fam/folder_wrench.png)}' +
'.nav{background:url(' + ExtPath
+ '/examples/shared/icons/fam/folder_go.png)}');
end;
- Tree := TExtTreeTreePanel.Create;
- Tree.Border := false;
+ Tree := TExtTreePanel.Create;
+ Tree.Border := 0;
//set root node
- Tree.Root := TExtTreeTreeNode.Create;
- with Tree.Root do begin
+ Node := TExtDataNodeInterface.Create;
+ with Node do begin
Text := 'Root';
- AllowChildren := True;
+ Root := True;
Expandable := True;
Expanded := True;
Leaf := False;
- on('click', JSFunction(SelectNodeEventBrowserSide));
+ AddListener('click', JSFunction(SelectNodeEventBrowserSide));
end;
+ Tree.Root := Node;
//set child node
- Node := TExtTreeTreeNode.Create;
+ Node := TExtDataNodeInterface.Create;
with Node do begin
Text := 'child0';
- on('click', Ajax(SelectNodeEventServerSide, ['Name', '%0.text']));
+ AddListener('click', Ajax(SelectNodeEventServerSide,
['Name', '%0.text']));
end;
- Tree.Root_.AppendChild(Node);
+ Tree.Root.AppendChild(Node);

- Layout := lyBorder;
+ Layout := laBorder;
with TExtPanel.AddTo(Items) do begin
- Region := rgNorth;
+ Region := reNorth;
Height := 64;
Frame := true;
Html := '<p>north - generally for menus, toolbars and/or
advertisements</p>';
- SelfSession.AddShowSourceButton(TbarArray, 'BorderLayout');
+ SelfSession.AddShowSourceButton(Tbar, 'BorderLayout');
end;
with TExtPanel.AddTo(Items) do begin
- Region := rgSouth;
+ Region := reSouth;
Html := '<p>south - generally for informational stuff, also could
be for status bar</p>';
Split := true;
Height := 100;
Title := 'South';
- Margins := SetMargins(0);
+ Margin := 0;
MinSize := 100;
MaxSize := 200;
Collapsible := true;
end;
with TExtPanel.AddTo(Items) do begin
- Region := rgEast;
+ Region := reEast;
Split := true;
Height := 100;
Title := 'East Side';
- Margins := SetMargins(0, 5);
+ MarginString := SetMargins(0, 5);
Width := 225;
- Layout := lyFit;
+ Layout := laFit;
MinSize := 175;
MaxSize := 400;
Collapsible := true;
with TExtTabPanel.AddTo(Items) do begin
- Border := false;
- TabPosition := 'bottom';
- ActiveTabNumber := 1;
+ Border := 0;
+ TabPosition := taBottom;
+ ActiveTab := 1;
with TExtPanel.AddTo(Items) do begin
Html := '<p>A TabPanel component can be a region.</p>';
Title := 'A Tab';
@@ -101,35 +102,35 @@
end;
end;
with TExtPanel.AddTo(Items) do begin
- Region := rgWest;
+ Region := reWest;
Id := 'west-panel';
Split := true;
Width := 200;
Title := 'West';
- Margins := SetMargins(0, 0, 0, 5);
- Layout := lyAccordion;
+ MarginString := SetMargins(0, 0, 0, 5);
+ Layout := laAccordion;
MinSize := 175;
MaxSize := 400;
Collapsible := true;
- LayoutConfig := JSObject('animate:true');
+ AnimCollapse := true;
with TExtPanel.AddTo(Items) do begin
Title := 'Navigation';
Html := '<p>Hi. I''m the west panel.</p>';
- Border := false;
+ Border := 0;
IconCls := 'nav';
Tree.AddTo(Items);
end;
with TExtPanel.AddTo(Items) do begin
Title := 'Settings';
Html := '<p>Some settings in here.</p>';
- Border := false;
+ Border := 0;
IconCls := 'settings';
end;
end;
with TExtTabPanel.AddTo(Items) do begin
- Region := rgCenter;
+ Region := reCenter;
DeferredRender := false;
- ActiveTabNumber := 0;
+ ActiveTab := 0;
with TExtPanel.AddTo(Items) do begin
Title := 'Close Me';
Html := '<p><b>Done reading me? Close me by clicking the X in
the top right corner.</b></p>';
=======================================
--- /trunk/ExtPascalSamples/LayoutWindow.pas Sat Mar 30 13:46:36 2013
+++ /trunk/ExtPascalSamples/LayoutWindow.pas Sat Mar 30 15:01:19 2013
@@ -8,7 +8,7 @@
type
TLayoutWindow = class(TExtWindow)
constructor Create;
- procedure ExtTabPanelOnTabchange(AThis : TExtTabPanel; ATab :
TExtPanel);
+ procedure ExtTabPanelOnTabchange(AThis : TExtTabPanel; NewTab,
OldTab : TExtPanel);
end;

implementation
@@ -25,8 +25,8 @@
SelfSession.SetCodePress;
Tabs := TExtTabPanel.AddTo(Items);
with Tabs do begin
- Region := rgCenter;
- Margins := SetMargins(3, 3, 3);
+ Region := reCenter;
+ Margin := 3;
Defaults := JSObject('autoScroll:true');
ActiveTab := 0;
OnTabChange := ExtTabPanelOnTabchange;
@@ -47,25 +47,25 @@
Nav := TExtPanel.Create;
with Nav do begin
Title := 'Navigation';
- Region := rgWest;
+ Region := reWest;
Split := true;
Width := 200;
Collapsible := true;
- Margins := SetMargins(3, 0, 3, 3);
+ MarginString:= SetMargins(3, 0, 3, 3);
end;
Title := 'Layout Window';
Closable := true;
Width := 600;
Height := 350;
Plain := true;
- Layout := lyBorder;
+ Layout := laBorder;
Modal := true;
Nav.AddTo(Items);
SelfSession.AddShowSourceButton(Buttons, 'LayoutWindow');
end;

-procedure TLayoutWindow.ExtTabPanelOnTabchange(AThis : TExtTabPanel;
ATab : TExtPanel); begin
- ExtMessageBox.Alert('Active Tab is', ATab.Title);
+procedure TLayoutWindow.ExtTabPanelOnTabchange(AThis : TExtTabPanel;
NewTab, OldTab : TExtPanel); begin
+ ExtMessageBox.Alert('Active Tab is', NewTab.Title);
end;

end.
Reply all
Reply to author
Forward
0 new messages