fixes for fpc 1.1

git-svn-id: trunk@3701 -
This commit is contained in:
mattias 2002-12-16 12:12:50 +00:00
parent 3e099a779b
commit d2d0bbe1e4
7 changed files with 67 additions and 10 deletions

View File

@ -1281,12 +1281,16 @@ var
begin
ADoc := nil;
FileStream := TFileStream.Create(AFilename, fmOpenRead);
if FileStream=nil then exit;
MemStream := TMemoryStream.Create;
try
try
MemStream.LoadFromStream(FileStream);
except
exit;
on E: Exception do begin
writeln('ERROR reading file "',AFilename,'": ',E.Message);
exit;
end;
end;
ReadXMLFile(ADoc, MemStream, AFilename);
finally
@ -1359,6 +1363,9 @@ end.
{
$Log$
Revision 1.8 2002/12/16 12:12:50 mattias
fixes for fpc 1.1
Revision 1.7 2002/10/22 08:48:04 lazarus
MG: fixed segfault on loading xmlfile

View File

@ -213,7 +213,7 @@ type
function ConsistencyCheck: integer;
procedure SetValuesEditable(AValue: boolean);
public
procedure Assign(ACodeToolBoss: TCodeToolManager;
procedure SetOptions(ACodeToolBoss: TCodeToolManager;
Options: TCodeToolsOptions);
constructor Create(TheOwner: TComponent); override;
destructor Destroy; override;
@ -354,7 +354,7 @@ function ShowCodeToolsDefinesEditor(ACodeToolBoss: TCodeToolManager;
var CodeToolsDefinesEditor: TCodeToolsDefinesEditor;
begin
CodeToolsDefinesEditor:=TCodeToolsDefinesEditor.Create(Application);
CodeToolsDefinesEditor.Assign(ACodeToolBoss,Options);
CodeToolsDefinesEditor.SetOptions(ACodeToolBoss,Options);
CodeToolsDefinesEditor.Macros:=Macros;
Result:=CodeToolsDefinesEditor.ShowModal;
if Result=mrOk then begin
@ -1919,7 +1919,7 @@ begin
InsertFilePathBitBtn.Enabled:=AValue;
end;
procedure TCodeToolsDefinesEditor.Assign(ACodeToolBoss: TCodeToolManager;
procedure TCodeToolsDefinesEditor.SetOptions(ACodeToolBoss: TCodeToolManager;
Options: TCodeToolsOptions);
begin
FLastSelectedNode:=nil;

View File

@ -114,9 +114,9 @@ TCustomFormEditor
TCustomFormEditor = class(TAbstractFormEditor)
private
FModified : Boolean;
FComponentInterfaceList : TList; //used to track and find controls
FSelectedComponents : TComponentSelectionList;
FObj_Inspector : TObjectInspector;
FComponentInterfaceList: TList; //used to track and find controls
FSelectedComponents: TComponentSelectionList;
FObj_Inspector: TObjectInspector;
function GetPropertyEditorHook: TPropertyEditorHook;
protected
Procedure RemoveFromComponentInterfaceList(Value :TIComponentInterface);
@ -125,6 +125,11 @@ TCustomFormEditor
procedure SetObj_Inspector(AnObjectInspector: TObjectInspector); virtual;
procedure JITFormListReaderError(Sender: TObject; ErrorType: TJITFormError;
var Action: TModalResult); virtual;
Function GetComponentByHandle(const Value : Longint): TIComponentInterface; override;
Function GetSelCount : Integer; override;
Function GetSelComponent(Index : Integer) : TIComponentInterface; override;
public
JITFormList : TJITForms;
constructor Create;
@ -151,7 +156,7 @@ TCustomFormEditor
Procedure ClearSelected;
function TranslateKeyToDesignerCommand(Key: word; Shift: TShiftState): integer;
public
property SelectedComponents: TComponentSelectionList
read FSelectedComponents write SetSelectedComponents;
property Obj_Inspector : TObjectInspector
@ -884,6 +889,24 @@ begin
Action:=MessageDlg(aCaption,aMsg,DlgType,Buttons,HelpCtx);
end;
function TCustomFormEditor.GetComponentByHandle(const Value: Longint
): TIComponentInterface;
begin
// ToDo:
Result:=nil;
end;
function TCustomFormEditor.GetSelCount: Integer;
begin
Result:=FComponentInterfaceList.Count;
end;
function TCustomFormEditor.GetSelComponent(Index: Integer
): TIComponentInterface;
begin
Result:=TIComponentInterface(FComponentInterfaceList[Index]);
end;
function TCustomFormEditor.GetPropertyEditorHook: TPropertyEditorHook;
begin
Result:=Obj_Inspector.PropertyEditorHook;

View File

@ -41,7 +41,7 @@ interface
{$endif}
uses
SysUtils, Classes, Graphics, GraphType, vclGlobals;
SysUtils, Classes, vclGlobals, Graphics, GraphType;
type
TImageIndex = type integer;
@ -164,6 +164,9 @@ end.
{
$Log$
Revision 1.9 2002/12/16 12:12:50 mattias
fixes for fpc 1.1
Revision 1.8 2002/11/09 15:02:06 lazarus
MG: fixed LM_LVChangedItem, OnShowHint, small bugs

View File

@ -173,6 +173,16 @@ begin
end;
procedure TBitmap.LoadFromClipboardFormat(FormatID: TClipboardFormat);
begin
// ToDo
end;
procedure TBitmap.SaveToClipboardFormat(FormatID: TClipboardFormat);
begin
// ToDo
end;
Procedure TBitmap.LoadFromXPMFile(const Filename : String);
var
pstr : PChar;
@ -518,6 +528,9 @@ end;
{ =============================================================================
$Log$
Revision 1.25 2002/12/16 12:12:50 mattias
fixes for fpc 1.1
Revision 1.24 2002/12/12 17:47:46 mattias
new constants for compatibility

View File

@ -1,3 +1,5 @@
// included by imglist.pp
{******************************************************************************
TCustomImageList
******************************************************************************
@ -847,10 +849,14 @@ begin
inherited Destroy;
end;
// included by imglist.pp
{
$Log$
Revision 1.14 2002/12/16 12:12:50 mattias
fixes for fpc 1.1
Revision 1.13 2002/11/09 15:02:07 lazarus
MG: fixed LM_LVChangedItem, OnShowHint, small bugs

View File

@ -126,12 +126,14 @@ procedure InternalInit;
var
AClipboardFormat: TPredefinedClipboardFormat;
c: char;
s: string;
begin
for AClipboardFormat:=Low(TPredefinedClipboardFormat) to
High(TPredefinedClipboardFormat) do
FPredefinedClipboardFormats[AClipboardFormat]:=0;
for c:=Low(char) to High(char) do begin
LowerCaseChars[c]:=lowercase(c)[1];
s:=lowercase(c);
LowerCaseChars[c]:=s[1];
UpperCaseChars[c]:=upcase(c);
end;
end;
@ -143,6 +145,9 @@ end.
{
$Log$
Revision 1.25 2002/12/16 12:12:50 mattias
fixes for fpc 1.1
Revision 1.24 2002/12/12 17:47:45 mattias
new constants for compatibility