EDI SDK Release Notes
Version 7d Beta
- Updated demo: EDI Standard Exchange Format Manager.
- New demo: EDI to HTML (Creating descendent EDI classes and custom behaviors example.)
- New experimental project: EDI COM Interfaces.
Important Updates to JclEDI.pas
- Added more item management methods to TEDIObjectList and some existing
methods were rewritten due to the new methods.
- Removed "OPTIMIZED_DISASSEMBLE" directive and obsolete dynamic array
code.
Important Updates to JclEDIANSIX12.pas and JclUNEDIFACT.pas
- Removed "OPTIMIZED_DISASSEMBLE" directive and obsolete dynamic array
code.
- Fixed spelling mistake. "ediDissassembled" should have been
"ediDisassembled".
- Fixed parsing to better detect when CR-LF pairs are being used as
segment terminators. Also fixed bug where segment delimiter length
greater than 2 would cause parsing errors. Note that mixing EDI
Interchanges with and without CR-LF segment terminators is not supported
at this time.
Important Updates to JclEDISEF.pas
- Value_UndefinedMaximum = 99999 changed to MaxInt because previous value
was inadequate.
- TEDISEFSubElement forward declaration added.
- CloneAsSubElement function added to TEDISEFElement.
- Internal field FExtendedData added to TEDISEFCompositeElement and
TEDISEFSegment for storing syntax rules, dependency notes, and masks for now.
- Clone function, Position increment, and Mask number parsing implemented
in TEDISEFSegment. Mask number is parsed however it is not used at this
time and is only accessible as a private field.
- ParentTable property added to TEDISEFSegment and TEDISEFLoop.
- ParentSet property added to TEDISEFLoop.
- AssignSegmentPositions procedure added in TEDISEFSet.
- Fixed explicit ordinal handling.
- Position increment implemented.
- If a set contains three tables then the "Heading", "Detail", and
"Summary" descriptions will be set as their Id's.
- Try…Except blocks added to TEDISEFTextSet.Disassemble to eat string to
integer conversion exceptions.
- Tested using diff program with SEF files to determine that file parsing
and construction are working properly. Note the following tags are still
not implemented: ".PRIVATE", ".PUBLIC", ".VALLISTS", ".OBJVARS", ".SEMREFS"
- Note: Currently explicit ordinal and position increment values are not
updated when performing adds, inserts, or deletes. Save and reload the
file in order to refresh the values.
- Added add, append, extract, insert, delete functions and procedures and
methods to TEDISEF... classes. The new item management functions and
procedures will ensure indexes are updated and object ownership is
transferred when necessary. Some refactoring done to reflect these changes.
- Fixed the parsing of segment id with a specified attribute because the
attribute was being copied into the segment id.
- Enabled items added to lists to be able to update their list item names
so list find by name will work when TEDISEFDataObject.Id is updated.
- TEDISEFDataObject.Clone warnings in D5 problem has been fixed by
providing implemented Clone method in base class however it will return nil.
- TEDISEFDataObjectList.AddByNameOrId was removed and a new Add method
is used instead. An Insert method was also added.
- TEDISEFTable.SEFSet property added.
- TEDISEFText.Description property added to this base class.
- Changed some looping structures from "for" to "while" loops so dynamic
array emulation is not being used. (minor speed improvements)
- Although new methods for adding, inserting, deleting were added, work
is still being done to sync dictionary based objects in TEDISEFFile with
TEDISEFSet owned objects. If changes in TEDISEFSet are assembled not all
changes will be written to the output string and dictionary objects are
not automatically updated at this time.
Version 7 to 7c Beta
- Added new compiler directive OPTIMIZED_INTERNAL_STRUCTURE which replaces
OPTIMIZED_DISASSEMBLE in JclEDI, JclEDI_ANSIX12, and JclEDI_UNEDIFACT.
When OPTIMIZED_INTERNAL_STRUCTURE is defined (default), the EDI classes
will use the TEDIDataObjectList classes instead of the dynamic arrays for
their internal structures. This eliminates all memory fragmentation caused
by constantly changing the size of the dynamic array. Eventually the
dynamic array implementation will be phased out entirely and is only
provided at this point for backward compatibility, however most existing
code based on the array type syntax will remain compatible.
- Added [foIgnoreGarbageAtEndOfFile] option to TEDIFileOptions for
JclEDI_ANSIX12 and JclEDI_UNEDIFACT units. When this flag is set garbage
at the end of the file will not raise an error and is ignored.
- EDIDataObjectArray types are now declared after their respective object
types for BCB5/6 compatibility.
- Various improvements and fixes to EDI SDK (beta) units JclEDISEF,
JclEDITranslators, JclEDI_ANSIX12_Ext, and JclEDI_UNEDIFACT_Ext.
- Added support for TA1 Interchange Acknowledgment segments in JclEDI_ANSIX12.
- See "Install.doc", "ReadmeDemos.rtf", and "ReadmeUnits.rtf" for
additional information.
Important Updates to JclEDI.pas
- Added new compiler directive "OPTIMIZED_INTERNAL_STRUCTURE".
See "What's New" in this document for a more complete description.
- New TEDIObjectList class with array type syntax compatibility. Keeping
backward compatibility with array type syntax was very important however as
noted in "ReadmeVer5.doc", you will have to change any "for loop"
implementations that use the Low() and High() functions with TEDIDataObjects.
Code example |
"for I := Low(EDIDataObjectGroup.EDIDataObjects) to
High(EDIDataObjectsGroup.EDIDataObjects) do"
change to
"for I := 0 to EDIDataObjectGroup.EDIDataObjectCount - 1 do"
Compatible Code Example:
uses
JclEDI, JclEDI_ANSIX12;
procedure DoSomething(Segment: TEDISegment);
var
Element: TEDIElement;
ListItem: TEDIObjectListItem;
I: Integer;
begin
//Compatible Syntax
for I := 0 to Segment.ElementCount - 1 do
begin
//Do something
Segment[I].Data := 'assigned some data';
end;
//Native Syntax
ListItem := Segment.Elements.First;
while ListItem <> nil do
begin
if Assigned(ListItem.EDIObject) then
begin
Element := TEDIElement(ListItem.EDIObject);
Element.Data := 'assigned some data';
//Do something
end;
ListItem := ListItem.NextItem;
end;
end;
|
- The TEDIDataObjectList now descends from TEDIObjectList.
- The TEDILoopStack class and related types have been moved to this unit
and rewritten. This was done so the ValidateLoopStack logic (which was
originally part of TEDITransactionSetDocument class) could be easily
reused. The TEDITransactionSetDocument class has been updated to reflect
the changes to TEDILoopStack.
- Fixed JclEDI.StringReplace. The function would prematurely break when
replacing old pattern with empty string and replace flag rfReplaceAll
was not set.
- Name property added to TEDIObjectListItem.
- FindItemByName implemented in TEDIObjectList.
- Added overloaded Delete to TEDIObjectList dynamic array emulation routines.
This new overloaded version will allow the list items indexes to be updated
automatically if [loAutoUpdateIndexes] flag is set.
- Improvements to TEDIDataObjectGroup.DeleteEDIDataObject and
TEDIDataObjectGroup.DeleteEDIDataObjects.
Important Updates to JclEDI_ANSIX12.pas
- Added new compiler directive OPTIMIZED_INTERNAL_STRUCTURE.
See "What's New" in this document for a more complete description.
- The TEDITransactionSetDocument class was updated based on changes to the
TEDILoopStack class. The ValidateLoopStack function was also moved to
TEDILoopStack so the logic can be reused easily.
- The TEDITransactionSetLoop class now descends from TEDIDataObjectGroup
instead of TEDIDataObject and has been changed accordingly.
- Fixed bug: TEDITransactionSetDocument class was assigning the wrong
specification segment data for ST, SE segments.
- Added [foIgnoreGarbageAtEndOfFile] option to TEDIFileOptions.
- Added (short property name) "Id" to some of the specification classes.
- TEDIElementSpec field "FId" was changed to "FElementId" to be consistent
with other similar coded properties.
- Added ElementCount property to TEDISegment. ElementCount includes
Elements or Composite Elements.
- Added support for TA1 Interchange Acknowledgment segments.
Important Updates to JclEDI_UNEDIFACT.pas
- Added new compiler directive OPTIMIZED_INTERNAL_STRUCTURE.
See "What's New" in this document for a more complete description.
- Added [foIgnoreGarbageAtEndOfFile] option to TEDIFileOptions.
- Added transactions set loop object so object can be formatted by a
document class.
- Fixed bug in InternalAlternateDelimitersDetection.
- Fixed bug where sub-element parent was not being assigned and
GetIndexPostionFromParent was not working.
Important Updates to JclEDISEF.pas (beta)
- Completed basic parsing for the following sections: ".VER",
".INI", ".STD", ".SETS", ".SEGS",
".COMS", ".ELMS", ".CODES", ".TEXT,SETS".
- Fixed ELMS clone function that was not returning the correct data
because of a problem using the "with" statement.
- Name property removed from TEDISEFDataObjectListItem and migrated to
TEDIObjectListItem.
- Reintroduced TEDISEFDataObjectList.FindItemByName which is now
implemented in TEDIObjectList.
- AssignSegmentOrdinals procedure added to TEDISEFSet to assign ordinal
values to the segments.
- Implicit ordinal values are now assigned to certain TEDISEFDataObjects.
- Fixed TEDISEFRepeatingPattern class.
- Fixed repeat count parsing for TEDISEFElement when part of a composite
element.
- Added two new overloaded procedures: ExtractFromDataObjectGroup.
- Fixed TEDIElement.Create when parent is TEDICompositeElement. Parent
was not being properly assigned.
- Fixed TEDIElement.GetIndexPositionFromParent when parent is
TEDICompositeElement.
- Fixed parsing loops where repeat count was not specified.
- Fixed COMS attributes to be more general.
- Fixed parsing of segment user attribute in set.
- Fixed preservation of CRLF in TEXT,SETS.
- Fixed parsing of data currently being ignored.
- Many other major bug fixes and enhancements.