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,13 +1281,17 @@ var
begin begin
ADoc := nil; ADoc := nil;
FileStream := TFileStream.Create(AFilename, fmOpenRead); FileStream := TFileStream.Create(AFilename, fmOpenRead);
if FileStream=nil then exit;
MemStream := TMemoryStream.Create; MemStream := TMemoryStream.Create;
try try
try try
MemStream.LoadFromStream(FileStream); MemStream.LoadFromStream(FileStream);
except except
on E: Exception do begin
writeln('ERROR reading file "',AFilename,'": ',E.Message);
exit; exit;
end; end;
end;
ReadXMLFile(ADoc, MemStream, AFilename); ReadXMLFile(ADoc, MemStream, AFilename);
finally finally
FileStream.Free; FileStream.Free;
@ -1359,6 +1363,9 @@ end.
{ {
$Log$ $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 Revision 1.7 2002/10/22 08:48:04 lazarus
MG: fixed segfault on loading xmlfile MG: fixed segfault on loading xmlfile

View File

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

View File

@ -125,6 +125,11 @@ TCustomFormEditor
procedure SetObj_Inspector(AnObjectInspector: TObjectInspector); virtual; procedure SetObj_Inspector(AnObjectInspector: TObjectInspector); virtual;
procedure JITFormListReaderError(Sender: TObject; ErrorType: TJITFormError; procedure JITFormListReaderError(Sender: TObject; ErrorType: TJITFormError;
var Action: TModalResult); virtual; var Action: TModalResult); virtual;
Function GetComponentByHandle(const Value : Longint): TIComponentInterface; override;
Function GetSelCount : Integer; override;
Function GetSelComponent(Index : Integer) : TIComponentInterface; override;
public public
JITFormList : TJITForms; JITFormList : TJITForms;
constructor Create; constructor Create;
@ -151,7 +156,7 @@ TCustomFormEditor
Procedure ClearSelected; Procedure ClearSelected;
function TranslateKeyToDesignerCommand(Key: word; Shift: TShiftState): integer; function TranslateKeyToDesignerCommand(Key: word; Shift: TShiftState): integer;
public
property SelectedComponents: TComponentSelectionList property SelectedComponents: TComponentSelectionList
read FSelectedComponents write SetSelectedComponents; read FSelectedComponents write SetSelectedComponents;
property Obj_Inspector : TObjectInspector property Obj_Inspector : TObjectInspector
@ -884,6 +889,24 @@ begin
Action:=MessageDlg(aCaption,aMsg,DlgType,Buttons,HelpCtx); Action:=MessageDlg(aCaption,aMsg,DlgType,Buttons,HelpCtx);
end; 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; function TCustomFormEditor.GetPropertyEditorHook: TPropertyEditorHook;
begin begin
Result:=Obj_Inspector.PropertyEditorHook; Result:=Obj_Inspector.PropertyEditorHook;

View File

@ -41,7 +41,7 @@ interface
{$endif} {$endif}
uses uses
SysUtils, Classes, Graphics, GraphType, vclGlobals; SysUtils, Classes, vclGlobals, Graphics, GraphType;
type type
TImageIndex = type integer; TImageIndex = type integer;
@ -164,6 +164,9 @@ end.
{ {
$Log$ $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 Revision 1.8 2002/11/09 15:02:06 lazarus
MG: fixed LM_LVChangedItem, OnShowHint, small bugs MG: fixed LM_LVChangedItem, OnShowHint, small bugs

View File

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

View File

@ -1,3 +1,5 @@
// included by imglist.pp
{****************************************************************************** {******************************************************************************
TCustomImageList TCustomImageList
****************************************************************************** ******************************************************************************
@ -847,10 +849,14 @@ begin
inherited Destroy; inherited Destroy;
end; end;
// included by imglist.pp
{ {
$Log$ $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 Revision 1.13 2002/11/09 15:02:07 lazarus
MG: fixed LM_LVChangedItem, OnShowHint, small bugs MG: fixed LM_LVChangedItem, OnShowHint, small bugs

View File

@ -126,12 +126,14 @@ procedure InternalInit;
var var
AClipboardFormat: TPredefinedClipboardFormat; AClipboardFormat: TPredefinedClipboardFormat;
c: char; c: char;
s: string;
begin begin
for AClipboardFormat:=Low(TPredefinedClipboardFormat) to for AClipboardFormat:=Low(TPredefinedClipboardFormat) to
High(TPredefinedClipboardFormat) do High(TPredefinedClipboardFormat) do
FPredefinedClipboardFormats[AClipboardFormat]:=0; FPredefinedClipboardFormats[AClipboardFormat]:=0;
for c:=Low(char) to High(char) do begin 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); UpperCaseChars[c]:=upcase(c);
end; end;
end; end;
@ -143,6 +145,9 @@ end.
{ {
$Log$ $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 Revision 1.24 2002/12/12 17:47:45 mattias
new constants for compatibility new constants for compatibility