|
From: <wp...@us...> - 2009-07-07 17:15:52
|
Revision: 803
http://instantobjects.svn.sourceforge.net/instantobjects/revision/?rev=803&view=rev
Author: wp2udk
Date: 2009-07-07 17:15:39 +0000 (Tue, 07 Jul 2009)
Log Message:
-----------
Fix for compatibility with < Delphi 2009.
Modified Paths:
--------------
trunk/Source/Design/InstantModelExpert.pas
Modified: trunk/Source/Design/InstantModelExpert.pas
===================================================================
--- trunk/Source/Design/InstantModelExpert.pas 2009-07-07 10:59:47 UTC (rev 802)
+++ trunk/Source/Design/InstantModelExpert.pas 2009-07-07 17:15:39 UTC (rev 803)
@@ -998,9 +998,16 @@
begin
Module := Modules[I] as IOTAModule;
Editor := FIDEInterface.SourceEditor(Module);
+
+{$IFDEF D12+}
Source := UTF8ToUnicodeString(FIDEInterface.ReadEditorSource(Editor));
Stream := TStringStream.Create(Source, TEncoding.Unicode);
- try
+{$ELSE}
+ Source := FIDEInterface.ReadEditorSource(Editor);
+ Stream := TStringStream.Create(Source);
+{$ENDIF}
+
+ try
Model.LoadModule(Stream, Editor.FileName);
finally
Stream.Free;
|