fixed reading empty stream and TCustomRadioGroup.ItemsChanged

git-svn-id: trunk@4391 -
This commit is contained in:
mattias 2003-07-10 15:17:43 +00:00
parent 991c3e7ba5
commit 173fcfe148
3 changed files with 21 additions and 18 deletions

View File

@ -432,9 +432,9 @@ type
protected protected
procedure UpdateRadioButtonStates; procedure UpdateRadioButtonStates;
procedure ReadState(Reader: TReader); override; procedure ReadState(Reader: TReader); override;
procedure SetItem (value : TStrings); procedure SetItem(Value: TStrings);
procedure SetColumns (value : integer); procedure SetColumns(Value: integer);
procedure SetItemIndex (value : integer); procedure SetItemIndex(Value: integer);
function GetItemIndex: integer; function GetItemIndex: integer;
procedure WMSize(var Message: TLMSize); message LM_SIZE; procedure WMSize(var Message: TLMSize); message LM_SIZE;
protected protected
@ -753,6 +753,9 @@ end.
{ {
$Log$ $Log$
Revision 1.67 2003/07/10 15:17:43 mattias
fixed reading empty stream and TCustomRadioGroup.ItemsChanged
Revision 1.66 2002/08/19 15:15:23 mattias Revision 1.66 2002/08/19 15:15:23 mattias
implemented TPairSplitter implemented TPairSplitter

View File

@ -63,7 +63,7 @@ begin
ControlStyle := ControlStyle + [csCaptureMouse, csClickEvents, csSetCaption, ControlStyle := ControlStyle + [csCaptureMouse, csClickEvents, csSetCaption,
csDoubleClicks]; csDoubleClicks];
FItems := TStringList.Create; FItems := TStringList.Create;
TStringList(FItems).OnChanging := @ItemsChanged; //TStringList(FItems).OnChanging := @ItemsChanged;
TStringList(FItems).OnChange := @ItemsChanged; TStringList(FItems).OnChange := @ItemsChanged;
FItemIndex := -1; FItemIndex := -1;
FButtonList := TList.Create; FButtonList := TList.Create;
@ -174,13 +174,10 @@ end;
Params: sender : object calling this proc. (in fact the FItems instance) Params: sender : object calling this proc. (in fact the FItems instance)
Returns: Nothing Returns: Nothing
Set the FColumns property which determines the no columns in
which the radiobuttons should be arranged.
Range: 1 .. ???
------------------------------------------------------------------------------} ------------------------------------------------------------------------------}
procedure TCustomRadioGroup.ItemsChanged (Sender : TObject); procedure TCustomRadioGroup.ItemsChanged (Sender : TObject);
begin begin
if HandleAllocated and (csLoading in ComponentState) then if HandleAllocated and (not (csLoading in ComponentState)) then
RecreateWnd; RecreateWnd;
OwnerFormDesignerModified(Self); OwnerFormDesignerModified(Self);
end; end;
@ -380,6 +377,9 @@ end;
{ {
$Log$ $Log$
Revision 1.22 2003/07/10 15:17:43 mattias
fixed reading empty stream and TCustomRadioGroup.ItemsChanged
Revision 1.21 2003/06/19 09:26:58 mattias Revision 1.21 2003/06/19 09:26:58 mattias
fixed changing unitname during update fixed changing unitname during update

View File

@ -195,7 +195,7 @@ begin
// remember last non identifier char position // remember last non identifier char position
if (not (c in ['a'..'z','A'..'Z','0'..'9','_'])) then if (not (c in ['a'..'z','A'..'Z','0'..'9','_'])) then
StartPos:=LFMStream.Position; StartPos:=LFMStream.Position;
LFMStream.Read(c,1); if LFMStream.Read(c,1)<>1 then exit;
if LFMStream.Position>1000 then exit; if LFMStream.Position>1000 then exit;
until c in [#10,#13]; until c in [#10,#13];
if StartPos<0 then exit; if StartPos<0 then exit;