From d3a8290b9e336a88375c2443c268f2dcda134653 Mon Sep 17 00:00:00 2001 From: "wanderlan.anjos@gmail.com" Date: Thu, 28 Mar 2013 13:48:07 +0000 Subject: [PATCH] Updating Samples for Ext JS 4.2 --- ExtJSWrapper/Ext.pas | 176 +++++++++++++++++++++++++++++++- ExtJSWrapper/ExtToPascal.dsk | 122 +++++++++------------- ExtPascalSamples/FileUpload.pas | 7 +- ExtPascalUtils.pas | 2 +- 4 files changed, 225 insertions(+), 82 deletions(-) diff --git a/ExtJSWrapper/Ext.pas b/ExtJSWrapper/Ext.pas index f7d9e2d..51e79d2 100644 --- a/ExtJSWrapper/Ext.pas +++ b/ExtJSWrapper/Ext.pas @@ -1,6 +1,6 @@ unit Ext; -// Generated by JSToPascal v.0.9.9, at 27/03/2013 13:43:47 +// Generated by JSToPascal v.0.9.9, at 28/03/2013 10:27:47 // from "\extpascal\ext-4.2.0\src interface @@ -1778,6 +1778,7 @@ TExtLayout = class(TExtAbstractComponent) public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + function OnContentChange(Child : TExtComponent) : TExtFunction; property Done : Boolean read FDone write SetFDone; property IsLayout : Boolean read FIsLayout write SetFIsLayout; end; @@ -2046,6 +2047,25 @@ TExtDomAbstractElement_style = class(TExtAbstractComponent) public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + function ApplyStyles(Styles : String) : TExtFunction; overload; + function GetBorderWidth(Side : String) : TExtFunction; + function GetHeight(ContentHeight : Boolean = false) : TExtFunction; + function GetMargin(Sides : String = '') : TExtFunction; + function GetPadding(Side : String) : TExtFunction; + function GetSize(ContentSize : Boolean = false) : TExtFunction; + function GetStyle(PropertyJS : String; InlineJS : Boolean = false) : TExtFunction; overload; + function GetViewSize : TExtFunction; + function GetWidth(ContentWidth : Boolean = false) : TExtFunction; + function IsStyle(Style : String; Value : String) : TExtFunction; + function IsTransparent(Prop : String) : TExtFunction; + function Mask(Msg : String = ''; MsgCls : String = '') : TExtFunction; + function RadioCls(ClassName : String) : TExtFunction; overload; + function Repaint : TExtFunction; + function SetHeight(Height : Integer) : TExtFunction; overload; + function SetSize(Width : Integer; Height : Integer) : TExtFunction; overload; + function SetStyle(PropertyJS : String; Value : String = '') : TExtFunction; overload; + function SetWidth(Width : Integer) : TExtFunction; overload; + function Unmask : TExtFunction; end; TExtDomAbstractElement_traversal = class(TExtAbstractComponent) @@ -5621,6 +5641,7 @@ TExtDataJsonPSingleton = class(TExtAbstractComponent) public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + function Abort(Request : String = '') : TExtFunction; overload; end; TExtChartHighlight = class(TExtAbstractComponent) @@ -14093,6 +14114,14 @@ TExtWindowMessageBox = class(TExtWindow) public function JSClassName : string; override; {$IFDEF FPC}constructor AddTo(List : TExtObjectList);{$ENDIF} + function Alert(Title : String; Msg : String; Fn : TExtFunction = nil; Scope : TExtObject = nil) : TExtFunction; + function Confirm(Title : String; Msg : String; Fn : TExtFunction = nil; Scope : TExtObject = nil) : TExtFunction; + function Progress(Title : String; Msg : String; ProgressText : String = '') : TExtFunction; + function Prompt(Title : String; Msg : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Multiline : Boolean = false; Value : String = '') : TExtFunction; overload; + function SetIcon(Icon : String; Width : Integer = 0; Height : Integer = 0) : TExtFunction; + function Show(Config : TExtObject; ConfigAnimateTarget : String; ConfigButtons : Integer = 0; ConfigClosable : Boolean = false; ConfigCls : String = ''; ConfigDefaultTextHeight : Integer = 0; ConfigFn : TExtFunction = nil; ConfigFnButtonId : String = ''; ConfigFnText : String = ''; ConfigFnOpt : TExtObject = nil; ConfigButtonText : TExtObject = nil; ConfigScope : TExtObject = nil; ConfigIcon : String = ''; ConfigIconCls : String = ''; ConfigDefaultFocus : String = ''; ConfigMaxWidth : Integer = 0; ConfigMinWidth : Integer = 0; ConfigModal : Boolean = false; ConfigMsg : String = ''; ConfigMultiline : Boolean = false; ConfigProgress : Boolean = false; ConfigProgressText : String = ''; ConfigPrompt : Boolean = false; ConfigProxyDrag : Boolean = false; ConfigTitle : String = ''; ConfigValue : String = ''; ConfigWait : Boolean = false; ConfigWaitConfig : TExtObject = nil; ConfigWidth : Integer = 0) : TExtFunction; overload; + function UpdateProgress(Value : Integer = 0; ProgressText : String = ''; Msg : String = '') : TExtFunction; + function Wait(Msg : String; Title : String = ''; Config : TExtObject = nil) : TExtFunction; end; // Procedural types for events TExtMenuColorPicker @@ -17699,6 +17728,11 @@ function TExtLayout.JSClassName : string; begin {$IFDEF FPC}constructor TExtLayout.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +function TExtLayout.OnContentChange(Child : TExtComponent) : TExtFunction; begin + JSCode(JSName + '.onContentChange(' + VarToJSON([Child, false]) + ');', 'TExtLayout'); + Result := Self; +end; + function TExtLayoutClassList.JSClassName : string; begin Result := 'Ext.layout.ClassList'; end; @@ -18464,6 +18498,101 @@ function TExtDomAbstractElement_style.JSClassName : string; begin {$IFDEF FPC}constructor TExtDomAbstractElement_style.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +function TExtDomAbstractElement_style.ApplyStyles(Styles : String) : TExtFunction; begin + JSCode(JSName + '.applyStyles(' + VarToJSON([Styles]) + ');', 'TExtDomAbstractElement_style'); + Result := Self; +end; + +function TExtDomAbstractElement_style.GetBorderWidth(Side : String) : TExtFunction; begin + JSCode(JSName + '.getBorderWidth(' + VarToJSON([Side]) + ');', 'TExtDomAbstractElement_style'); + Result := Self; +end; + +function TExtDomAbstractElement_style.GetHeight(ContentHeight : Boolean = false) : TExtFunction; begin + JSCode(JSName + '.getHeight(' + VarToJSON([ContentHeight]) + ');', 'TExtDomAbstractElement_style'); + Result := Self; +end; + +function TExtDomAbstractElement_style.GetMargin(Sides : String = '') : TExtFunction; begin + JSCode(JSName + '.getMargin(' + VarToJSON([Sides]) + ');', 'TExtDomAbstractElement_style'); + Result := Self; +end; + +function TExtDomAbstractElement_style.GetPadding(Side : String) : TExtFunction; begin + JSCode(JSName + '.getPadding(' + VarToJSON([Side]) + ');', 'TExtDomAbstractElement_style'); + Result := Self; +end; + +function TExtDomAbstractElement_style.GetSize(ContentSize : Boolean = false) : TExtFunction; begin + JSCode(JSName + '.getSize(' + VarToJSON([ContentSize]) + ');', 'TExtDomAbstractElement_style'); + Result := Self; +end; + +function TExtDomAbstractElement_style.GetStyle(PropertyJS : String; InlineJS : Boolean = false) : TExtFunction; begin + JSCode(JSName + '.getStyle(' + VarToJSON([PropertyJS, InlineJS]) + ');', 'TExtDomAbstractElement_style'); + Result := Self; +end; + +function TExtDomAbstractElement_style.GetViewSize : TExtFunction; begin + JSCode(JSName + '.getViewSize();', 'TExtDomAbstractElement_style'); + Result := Self; +end; + +function TExtDomAbstractElement_style.GetWidth(ContentWidth : Boolean = false) : TExtFunction; begin + JSCode(JSName + '.getWidth(' + VarToJSON([ContentWidth]) + ');', 'TExtDomAbstractElement_style'); + Result := Self; +end; + +function TExtDomAbstractElement_style.IsStyle(Style : String; Value : String) : TExtFunction; begin + JSCode(JSName + '.isStyle(' + VarToJSON([Style, Value]) + ');', 'TExtDomAbstractElement_style'); + Result := Self; +end; + +function TExtDomAbstractElement_style.IsTransparent(Prop : String) : TExtFunction; begin + JSCode(JSName + '.isTransparent(' + VarToJSON([Prop]) + ');', 'TExtDomAbstractElement_style'); + Result := Self; +end; + +function TExtDomAbstractElement_style.Mask(Msg : String = ''; MsgCls : String = '') : TExtFunction; begin + JSCode(JSName + '.mask(' + VarToJSON([Msg, MsgCls]) + ');', 'TExtDomAbstractElement_style'); + Result := Self; +end; + +function TExtDomAbstractElement_style.RadioCls(ClassName : String) : TExtFunction; begin + JSCode(JSName + '.radioCls(' + VarToJSON([ClassName]) + ');', 'TExtDomAbstractElement_style'); + Result := Self; +end; + +function TExtDomAbstractElement_style.Repaint : TExtFunction; begin + JSCode(JSName + '.repaint();', 'TExtDomAbstractElement_style'); + Result := Self; +end; + +function TExtDomAbstractElement_style.SetHeight(Height : Integer) : TExtFunction; begin + JSCode(JSName + '.setHeight(' + VarToJSON([Height]) + ');', 'TExtDomAbstractElement_style'); + Result := Self; +end; + +function TExtDomAbstractElement_style.SetSize(Width : Integer; Height : Integer) : TExtFunction; begin + JSCode(JSName + '.setSize(' + VarToJSON([Width, Height]) + ');', 'TExtDomAbstractElement_style'); + Result := Self; +end; + +function TExtDomAbstractElement_style.SetStyle(PropertyJS : String; Value : String = '') : TExtFunction; begin + JSCode(JSName + '.setStyle(' + VarToJSON([PropertyJS, Value]) + ');', 'TExtDomAbstractElement_style'); + Result := Self; +end; + +function TExtDomAbstractElement_style.SetWidth(Width : Integer) : TExtFunction; begin + JSCode(JSName + '.setWidth(' + VarToJSON([Width]) + ');', 'TExtDomAbstractElement_style'); + Result := Self; +end; + +function TExtDomAbstractElement_style.Unmask : TExtFunction; begin + JSCode(JSName + '.unmask();', 'TExtDomAbstractElement_style'); + Result := Self; +end; + function TExtDomAbstractElement_traversal.JSClassName : string; begin Result := 'Ext.dom.AbstractElementtraversal'; end; @@ -27666,6 +27795,11 @@ function TExtDataJsonPSingleton.JSClassName : string; begin {$IFDEF FPC}constructor TExtDataJsonPSingleton.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +function TExtDataJsonPSingleton.Abort(Request : String = '') : TExtFunction; begin + JSCode(JSName + '.abort(' + VarToJSON([Request]) + ');', 'TExtDataJsonPSingleton'); + Result := Self; +end; + procedure TExtChartHighlight.SetFHighlight(Value : Boolean); begin FHighlight := Value; JSCode('highlight:' + VarToJSON([Value])); @@ -45626,6 +45760,46 @@ function TExtWindowMessageBox.JSClassName : string; begin {$IFDEF FPC}constructor TExtWindowMessageBox.AddTo(List : TExtObjectList);begin inherited end;{$ENDIF} +function TExtWindowMessageBox.Alert(Title : String; Msg : String; Fn : TExtFunction = nil; Scope : TExtObject = nil) : TExtFunction; begin + JSCode(JSName + '.alert(' + VarToJSON([Title, Msg, Fn, true, Scope, false]) + ');', 'TExtWindowMessageBox'); + Result := Self; +end; + +function TExtWindowMessageBox.Confirm(Title : String; Msg : String; Fn : TExtFunction = nil; Scope : TExtObject = nil) : TExtFunction; begin + JSCode(JSName + '.confirm(' + VarToJSON([Title, Msg, Fn, true, Scope, false]) + ');', 'TExtWindowMessageBox'); + Result := Self; +end; + +function TExtWindowMessageBox.Progress(Title : String; Msg : String; ProgressText : String = '') : TExtFunction; begin + JSCode(JSName + '.progress(' + VarToJSON([Title, Msg, ProgressText]) + ');', 'TExtWindowMessageBox'); + Result := Self; +end; + +function TExtWindowMessageBox.Prompt(Title : String; Msg : String; Fn : TExtFunction = nil; Scope : TExtObject = nil; Multiline : Boolean = false; Value : String = '') : TExtFunction; begin + JSCode(JSName + '.prompt(' + VarToJSON([Title, Msg, Fn, true, Scope, false, Multiline, Value]) + ');', 'TExtWindowMessageBox'); + Result := Self; +end; + +function TExtWindowMessageBox.SetIcon(Icon : String; Width : Integer = 0; Height : Integer = 0) : TExtFunction; begin + JSCode(JSName + '.setIcon(' + VarToJSON([Icon, Width, Height]) + ');', 'TExtWindowMessageBox'); + Result := Self; +end; + +function TExtWindowMessageBox.Show(Config : TExtObject; ConfigAnimateTarget : String; ConfigButtons : Integer = 0; ConfigClosable : Boolean = false; ConfigCls : String = ''; ConfigDefaultTextHeight : Integer = 0; ConfigFn : TExtFunction = nil; ConfigFnButtonId : String = ''; ConfigFnText : String = ''; ConfigFnOpt : TExtObject = nil; ConfigButtonText : TExtObject = nil; ConfigScope : TExtObject = nil; ConfigIcon : String = ''; ConfigIconCls : String = ''; ConfigDefaultFocus : String = ''; ConfigMaxWidth : Integer = 0; ConfigMinWidth : Integer = 0; ConfigModal : Boolean = false; ConfigMsg : String = ''; ConfigMultiline : Boolean = false; ConfigProgress : Boolean = false; ConfigProgressText : String = ''; ConfigPrompt : Boolean = false; ConfigProxyDrag : Boolean = false; ConfigTitle : String = ''; ConfigValue : String = ''; ConfigWait : Boolean = false; ConfigWaitConfig : TExtObject = nil; ConfigWidth : Integer = 0) : TExtFunction; begin + JSCode(JSName + '.show(' + VarToJSON([Config, false, ConfigAnimateTarget, ConfigButtons, ConfigClosable, ConfigCls, ConfigDefaultTextHeight, ConfigFn, true, ConfigFnButtonId, ConfigFnText, ConfigFnOpt, false, ConfigButtonText, false, ConfigScope, false, ConfigIcon, ConfigIconCls, ConfigDefaultFocus, ConfigMaxWidth, ConfigMinWidth, ConfigModal, ConfigMsg, ConfigMultiline, ConfigProgress, ConfigProgressText, ConfigPrompt, ConfigProxyDrag, ConfigTitle, ConfigValue, ConfigWait, ConfigWaitConfig, false, ConfigWidth]) + ');', 'TExtWindowMessageBox'); + Result := Self; +end; + +function TExtWindowMessageBox.UpdateProgress(Value : Integer = 0; ProgressText : String = ''; Msg : String = '') : TExtFunction; begin + JSCode(JSName + '.updateProgress(' + VarToJSON([Value, ProgressText, Msg]) + ');', 'TExtWindowMessageBox'); + Result := Self; +end; + +function TExtWindowMessageBox.Wait(Msg : String; Title : String = ''; Config : TExtObject = nil) : TExtFunction; begin + JSCode(JSName + '.wait(' + VarToJSON([Msg, Title, Config, false]) + ');', 'TExtWindowMessageBox'); + Result := Self; +end; + procedure TExtMenuColorPicker.SetFHideOnClick(Value : Boolean); begin FHideOnClick := Value; JSCode('hideOnClick:' + VarToJSON([Value])); diff --git a/ExtJSWrapper/ExtToPascal.dsk b/ExtJSWrapper/ExtToPascal.dsk index d038c1c..7aa900a 100644 --- a/ExtJSWrapper/ExtToPascal.dsk +++ b/ExtJSWrapper/ExtToPascal.dsk @@ -1,74 +1,68 @@ [Closed Files] -File_0=TSourceModule,'c:\program files (x86)\embarcadero\rad studio\10.0\source\rtl\common\System.Classes.pas',0,1,6619,1,6644,0,0,, -File_1=TSourceModule,'c:\program files (x86)\embarcadero\rad studio\10.0\SOURCE\RTL\SYS\System.pas',0,1,22820,1,22860,0,0,, -File_2=TSourceModule,'E:\extpascal\ExtJSWrapper\ExtUtil.pas',0,1,1050,37,1073,0,0,, -File_3=TSourceModule,'E:\extpascal\ext-4.1.1a\src\grid\plugin\Editing.js',0,1,147,33,196,0,0,, -File_4=TSourceModule,'E:\extpascal\ExtJSWrapper\ExtDd.pas',0,1,285,32,308,0,0,, -File_5=TSourceModule,'E:\extpascal\FCGIApp.pas',0,1,210,28,231,0,0,, -File_6=TSourceModule,'E:\extpascal\ext-4.1.1a\src\Ajax.js',0,1,1,4,2,0,0,, -File_7=TSourceModule,'E:\extpascal\ext-4.1.1a\src\AbstractManager.js',0,1,70,24,19,0,0,, -File_8=TSourceModule,'E:\extpascal\ext-4.1.1a\src\core\src\class\Loader.js',0,1,1,22,1261,0,0,, -File_9=TSourceModule,'E:\extpascal\ext-4.1.1a\src\core\src\lang\Error.js',0,1,68,28,127,0,0,, -File_10=TSourceModule,'E:\extpascal\ext-4.1.1a\src\core\src\class\ClassManager.js',0,1,1482,32,1505,0,0,, -File_11=TSourceModule,'E:\extpascal\ext-4.1.1a\src\util\MixedCollection.js',0,1,1,4,2,0,0,, -File_12=TSourceModule,'E:\extpascal\ext-4.1.1a\src\view\AbstractView.js',0,1,1,4,2,0,0,, -File_13=TSourceModule,'E:\extpascal\ext-4.1.1a\src\window\MessageBox.js',0,1,867,8,890,0,0,, -File_14=TSourceModule,'E:\extpascal\ext-4.1.1a\src\ZIndexManager.js',0,1,499,8,522,0,0,, -File_15=TSourceModule,'E:\extpascal\ext-4.1.1a\src\util\HashMap.js',0,1,1,14,33,0,0,, -File_16=TSourceModule,'E:\extpascal\ext-4.1.1a\src\core\src\dom\AbstractElement.insertion.js',0,1,1,12,2,0,0,, -File_17=TSourceModule,'E:\extpascal\ext-4.1.1a\src\core\src\EventManager.js',0,1,1,1,1,0,0,, +File_0=TSourceModule,'E:\extpascal\ext-4.2.0\src\AbstractComponent.js',0,1,7,23,583,0,0,, +File_1=TSourceModule,'E:\Temp\Surface.js',0,1,19,36,308,0,0,, +File_2=TSourceModule,'c:\program files (x86)\embarcadero\rad studio\10.0\source\rtl\common\System.Classes.pas',0,1,6619,1,6644,0,0,, +File_3=TSourceModule,'c:\program files (x86)\embarcadero\rad studio\10.0\SOURCE\RTL\SYS\System.pas',0,1,22820,1,22860,0,0,, +File_4=TSourceModule,'E:\extpascal\ExtJSWrapper\ExtUtil.pas',0,1,1050,37,1073,0,0,, +File_5=TSourceModule,'E:\extpascal\ext-4.1.1a\src\grid\plugin\Editing.js',0,1,147,33,196,0,0,, +File_6=TSourceModule,'E:\extpascal\ExtJSWrapper\ExtDd.pas',0,1,285,32,308,0,0,, +File_7=TSourceModule,'E:\extpascal\FCGIApp.pas',0,1,210,28,231,0,0,, +File_8=TSourceModule,'E:\extpascal\ext-4.1.1a\src\Ajax.js',0,1,1,4,2,0,0,, +File_9=TSourceModule,'E:\extpascal\ext-4.1.1a\src\AbstractManager.js',0,1,70,24,19,0,0,, +File_10=TSourceModule,'E:\extpascal\ext-4.1.1a\src\core\src\class\Loader.js',0,1,1,22,1261,0,0,, +File_11=TSourceModule,'E:\extpascal\ext-4.1.1a\src\core\src\lang\Error.js',0,1,68,28,127,0,0,, +File_12=TSourceModule,'E:\extpascal\ext-4.1.1a\src\core\src\class\ClassManager.js',0,1,1482,32,1505,0,0,, +File_13=TSourceModule,'E:\extpascal\ext-4.1.1a\src\util\MixedCollection.js',0,1,1,4,2,0,0,, +File_14=TSourceModule,'E:\extpascal\ext-4.1.1a\src\view\AbstractView.js',0,1,1,4,2,0,0,, +File_15=TSourceModule,'E:\extpascal\ext-4.1.1a\src\window\MessageBox.js',0,1,867,8,890,0,0,, +File_16=TSourceModule,'E:\extpascal\ext-4.1.1a\src\ZIndexManager.js',0,1,499,8,522,0,0,, +File_17=TSourceModule,'E:\extpascal\ext-4.1.1a\src\util\HashMap.js',0,1,1,14,33,0,0,, +File_18=TSourceModule,'E:\extpascal\ext-4.1.1a\src\core\src\dom\AbstractElement.insertion.js',0,1,1,12,2,0,0,, +File_19=TSourceModule,'E:\extpascal\ext-4.1.1a\src\core\src\EventManager.js',0,1,1,1,1,0,0,, [Modules] -Module0=E:\extpascal\ExtJSWrapper\ExtToPascal.dproj -Module1=E:\extpascal\ExtJSWrapper\Ext.pas -Module2=E:\extpascal\ExtJSWrapper\ExtFixes.txt -Module3=E:\extpascal\ExtPascal.pas -Module4=E:\Temp\Surface.js -Module5=E:\extpascal\ExtPascalUtils.pas -Module6=E:\extpascal\ext-4.2.0\src\AbstractComponent.js -Module7=E:\extpascal\ext-4.2.0\src\dom\AbstractElement.js -Module8=E:\extpascal\ExtJSWrapper\ExtOld.pas -Count=9 +Module0=E:\extpascal\ExtJSWrapper\Ext.pas +Module1=E:\extpascal\ExtJSWrapper\ExtToPascal.dproj +Module2=E:\extpascal\ExtPascalUtils.pas +Module3=E:\extpascal\ExtJSWrapper\ExtFixes.txt +Module4=E:\extpascal\ext-4.2.0\src\dom\AbstractElement.js +Module5=E:\extpascal\ExtPascal.pas +Module6=E:\extpascal\ExtJSWrapper\ExtOld.pas +Count=7 EditWindowCount=1 -[E:\extpascal\ExtJSWrapper\ExtToPascal.dproj] -ModuleType=TBaseProject - [E:\extpascal\ExtJSWrapper\Ext.pas] ModuleType=TSourceModule FormState=0 FormOnTop=0 -[E:\extpascal\ExtJSWrapper\ExtFixes.txt] -ModuleType=TSourceModule - -[E:\extpascal\ExtPascal.pas] -ModuleType=TSourceModule -FormState=0 -FormOnTop=0 - -[E:\Temp\Surface.js] -ModuleType=TSourceModule +[E:\extpascal\ExtJSWrapper\ExtToPascal.dproj] +ModuleType=TBaseProject [E:\extpascal\ExtPascalUtils.pas] ModuleType=TSourceModule FormState=0 FormOnTop=0 -[E:\extpascal\ext-4.2.0\src\AbstractComponent.js] +[E:\extpascal\ExtJSWrapper\ExtFixes.txt] ModuleType=TSourceModule [E:\extpascal\ext-4.2.0\src\dom\AbstractElement.js] ModuleType=TSourceModule +[E:\extpascal\ExtPascal.pas] +ModuleType=TSourceModule +FormState=0 +FormOnTop=0 + [E:\extpascal\ExtJSWrapper\ExtOld.pas] ModuleType=TSourceModule FormState=0 FormOnTop=0 [EditWindow0] -ViewCount=9 -CurrentEditView=E:\extpascal\ExtJSWrapper\ExtToPascal.dpr +ViewCount=7 +CurrentEditView=E:\extpascal\ExtJSWrapper\Ext.pas View0=0 View1=1 View2=2 @@ -76,8 +70,6 @@ View3=3 View4=4 View5=5 View6=6 -View7=7 -View8=8 PercentageSizes=1 Create=1 Visible=1 @@ -108,9 +100,9 @@ BottomMiddelPanelData=0000080001020200000009000000446F636B5369746530100000004772 [View0] CustomEditViewType=TEditView Module=E:\extpascal\ExtJSWrapper\Ext.pas -CursorX=39 -CursorY=45980 -TopLine=45954 +CursorX=3 +CursorY=12711 +TopLine=12757 LeftCol=1 Elisions= Bookmarks= @@ -121,7 +113,7 @@ CustomEditViewType=TEditView Module=E:\extpascal\ExtJSWrapper\ExtToPascal.dpr CursorX=1 CursorY=15 -TopLine=1 +TopLine=13 LeftCol=1 Elisions= Bookmarks= @@ -151,17 +143,6 @@ EditViewName=E:\extpascal\ExtJSWrapper\ExtFixes.txt [View4] CustomEditViewType=TEditView -Module=E:\extpascal\ext-4.2.0\src\AbstractComponent.js -CursorX=23 -CursorY=583 -TopLine=7 -LeftCol=1 -Elisions= -Bookmarks= -EditViewName=E:\extpascal\ext-4.2.0\src\AbstractComponent.js - -[View5] -CustomEditViewType=TEditView Module=E:\extpascal\ext-4.2.0\src\dom\AbstractElement.js CursorX=20 CursorY=625 @@ -171,21 +152,10 @@ Elisions= Bookmarks= EditViewName=E:\extpascal\ext-4.2.0\src\dom\AbstractElement.js -[View6] -CustomEditViewType=TEditView -Module=E:\Temp\Surface.js -CursorX=36 -CursorY=308 -TopLine=19 -LeftCol=1 -Elisions= -Bookmarks= -EditViewName=E:\Temp\Surface.js - -[View7] +[View5] CustomEditViewType=TEditView Module=E:\extpascal\ExtPascalUtils.pas -CursorX=44 +CursorX=43 CursorY=293 TopLine=284 LeftCol=1 @@ -193,7 +163,7 @@ Elisions= Bookmarks= EditViewName=E:\extpascal\ExtPascalUtils.pas -[View8] +[View6] CustomEditViewType=TEditView Module=E:\extpascal\ExtJSWrapper\ExtOld.pas CursorX=52 @@ -777,5 +747,5 @@ Dockable=1 StayOnTop=0 TabPosition=1 ActiveTabID=ProjectManager -TabDockClients=ProjectManager,ToolForm,PropertyInspector,StructureView,DataExplorerContainer,ModelViewTool,TFileExplorerForm,TemplateView,ClassBrowserTool +TabDockClients=ProjectManager,ToolForm,PropertyInspector,StructureView,DataExplorerContainer,ModelViewTool,ClassBrowserTool,TemplateView,TFileExplorerForm diff --git a/ExtPascalSamples/FileUpload.pas b/ExtPascalSamples/FileUpload.pas index 679e424..5c06039 100644 --- a/ExtPascalSamples/FileUpload.pas +++ b/ExtPascalSamples/FileUpload.pas @@ -39,10 +39,9 @@ constructor TFileUpload.Create; with F.AddTo(Items) do begin FileUpload := true; Frame := true; -// AutoHeight := true; Width := 300; LabelWidth := 20; - with TExtFormTextField.AddTo(Items) do begin + with TExtFormFieldText.AddTo(Items) do begin FieldLabel := 'File'; InputType := itFile; end; @@ -56,11 +55,11 @@ constructor TFileUpload.Create; Success := ExtMessageBox.Alert('Success', 'File: %1.result.file uploaded on /uploads folder'); Failure := ExtMessageBox.Alert('Upload Error', '%1.result.message') end; - Handler := TExtFormBasicForm(GetForm).Submit(SubmitAction); + Handler := TExtFormBasic(GetForm).Submit(SubmitAction); end; with TExtButton.AddTo(Buttons) do begin Text := 'Reset'; - Handler := TExtFormBasicForm(GetForm).Reset; + Handler := TExtFormBasic(GetForm).Reset; end; SelfSession.AddShowSourceButton(Buttons, 'FileUpload'); end; diff --git a/ExtPascalUtils.pas b/ExtPascalUtils.pas index f3ec2e2..565451c 100644 --- a/ExtPascalUtils.pas +++ b/ExtPascalUtils.pas @@ -290,7 +290,7 @@ function Extract(const Delims : array of string; var S : string; var Matches : T K := J; J := PosEx(Delims[I], S, J); if ((J - K) > 15000) or ((I > 0) and (Delims[I] <> EndCom) and - (Delims[I] <> ' ') and ((J - K) > 1800)) then exit; + (Delims[I] <> ' ') and ((J - K) > 2800)) then exit; if J = 0 then begin for J := I to High(Delims) do Rest := Rest + Delims[J];