|
From: <na...@us...> - 2010-08-12 19:20:25
|
Revision: 900
http://instantobjects.svn.sourceforge.net/instantobjects/revision/?rev=900&view=rev
Author: nandod
Date: 2010-08-12 19:20:19 +0000 (Thu, 12 Aug 2010)
Log Message:
-----------
* Default size for StringFields created for unlimited-length string attributes has been made customizable through a global variable (was a local const). Max usable value should be 8192.
Modified Paths:
--------------
trunk/Source/Core/InstantPresentation.pas
Modified: trunk/Source/Core/InstantPresentation.pas
===================================================================
--- trunk/Source/Core/InstantPresentation.pas 2010-08-12 08:37:28 UTC (rev 899)
+++ trunk/Source/Core/InstantPresentation.pas 2010-08-12 19:20:19 UTC (rev 900)
@@ -751,6 +751,12 @@
procedure InstantRegisterAccessorClass(AClass: TInstantAccessorClass);
procedure InstantUnregisterAccessorClass(AClass: TInstantAccessorClass);
+var
+ // StringFields for unlimited-length string attributes are created of the
+ // size indicated by this variable. Fields for attributes that do have a
+ // maximum length of that length instead.
+ InstantDefaultStringFieldSize: Integer = 255;
+
implementation
uses
@@ -770,7 +776,6 @@
const
SelfFieldName = 'Self';
- DefaultStringFieldSize = 255;
DefaultStringDisplayWidth = 12;
var
@@ -3183,7 +3188,7 @@
if Assigned(Metadata) and (Metadata.Size <> 0) then
FieldDef.Size := Metadata.Size
else
- FieldDef.Size := DefaultStringFieldSize;
+ FieldDef.Size := InstantDefaultStringFieldSize;
end;
if Assigned(FOnInitFieldDef) then
FOnInitFieldDef(Self, FieldDef);
|