![]() |
IsEmpty = True bei List.Count = 1
Liste der Anhänge anzeigen (Anzahl: 1)
Hallöle...8-)
...verstehe ich nicht (siehe Bild). :roll: Die WebFleetList ist eine abgeleitete TObjectList<TWebFleet>. In der Liste ist ein Objekt drin. Verschiedene Buttons (Delete z.b.) sind abhänging vom Inhalt der Liste. Ich wunderte mich, warum der Button disabled war, obwohl die Liste NICHT leer ist. :gruebel: Ich benutze gern
Delphi-Quellcode:
statt
not List.IsEmpty
Delphi-Quellcode:
... das geht aber gerade in die Hose.
List.Count > 0
Hat Jemand eine Erklärung? Danke...:wink: |
AW: IsEmpty = True bei List.Count = 1
Wo kommt DIESES FIsEmpty denn her?
Zitat:
|
AW: IsEmpty = True bei List.Count = 1
Zitat:
Ich habe KEIN eigenes IsEmpty implementiert. Meine Objektliste Liste erbt von TList. Nachtrag: Ich habe gelogen. Ich hätte schwören können, daß das IsEmpty aus TList kommt. :oops: Tatsache seit 5 Jahren:
Delphi-Quellcode:
...wer mach denn so einen Schei...:oops:
TxxxxObjectList<T: class> = class(TObjectList<T>)
strict private {$REGION 'Fields'} FChanged: Boolean; FIsLoading: Boolean; FIsEmpty: Boolean; FOnChange: TOnChangeEvent; procedure SetChanged(const Value: Boolean); procedure SetIsLoading(const Value: Boolean); {$ENDREGION} public constructor Create; overload; virtual; constructor Create(const AComparer: IComparer<T>); overload; virtual; property OnChange: TOnChangeEvent read FOnChange write FOnChange; property Changed: Boolean read FChanged write SetChanged; property IsLoading: Boolean read FIsLoading write SetIsLoading; property IsEmpty: Boolean read FIsEmpty write FIsEmpty; // -> würg procedure Clear; overload; function Add(const Value: T): Integer; overload; procedure Delete(Index: Integer); overload; function Remove(const Value: T): Integer; overload; end; |
AW: IsEmpty = True bei List.Count = 1
Der MMX? :duck:
(wenn man die entsprechenden Optionen auswählt) |
Alle Zeitangaben in WEZ +1. Es ist jetzt 05:39 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz