When you set FILTERED to TRUE and apply a filter in FILEFILTER, you cannot evaluate .SelectedItem.IsFile This seems to happen only when FILTERED is TRUE and FILEFILTER is not empty. OS is Win98 (First Edition) and Delphi6 Ent.
Logged In: YES user_id=802055
This is a bug in StShlCtl.pas. the procedure TStShellItem.Assign does not copy over the FIsFile value.
Add the following: FIsFile := AValue.FIsFile;
This should go on line 2761, just before the assignment of FIsFileFolder
Logged In: YES user_id=806348
Same problem with me !
I found the bug in the following procedure:
------------------------------- procedure TStShellItem.Assign(AValue : TStShellItem); begin FFileAttributes := AValue.FFileAttributes; FFileAttributesStr := AValue.FFileAttributesStr; FDate := AValue.FDate; FSize := AValue.FSize; FDisplayName := AValue.FDisplayName; FIconIndex := AValue.FIconIndex; FIsDesktop := AValue.FIsDesktop; FIsFileFolder := AValue.FIsFileFolder; FIsFileSystem := AValue.FIsFileSystem; FOpenIconIndex := AValue.FOpenIconIndex; FOverlayIconIndex := AValue.FOverlayIconIndex; FPath := AValue.FPath; FTypeName := AValue.FTypeName; DOSDate := AValue.DOSDate; HaveDetails := AValue.HaveDetails; FPidl := ILClone(AValue.FPidl); FSimplePidl := ILClone(AValue.SimplePidl); ParentList := AValue.ParentList; FColText.Assign(AValue.FColText); GetParentFolder(FPidl, FParentFolder); FController := AValue.FController; { Don't bother with the icon properties as a new icon } { will be created when requested. } end; ---------------------------------
The line:
"FIsFile := AValue.FIsFile;"
is missing !
Log in to post a comment.
Logged In: YES
user_id=802055
This is a bug in StShlCtl.pas. the procedure
TStShellItem.Assign does not copy over the FIsFile value.
Add the following:
FIsFile := AValue.FIsFile;
This should go on line 2761, just before the assignment of
FIsFileFolder
Logged In: YES
user_id=806348
Same problem with me !
I found the bug in the following procedure:
-------------------------------
procedure TStShellItem.Assign(AValue : TStShellItem);
begin
FFileAttributes := AValue.FFileAttributes;
FFileAttributesStr := AValue.FFileAttributesStr;
FDate := AValue.FDate;
FSize := AValue.FSize;
FDisplayName := AValue.FDisplayName;
FIconIndex := AValue.FIconIndex;
FIsDesktop := AValue.FIsDesktop;
FIsFileFolder := AValue.FIsFileFolder;
FIsFileSystem := AValue.FIsFileSystem;
FOpenIconIndex := AValue.FOpenIconIndex;
FOverlayIconIndex := AValue.FOverlayIconIndex;
FPath := AValue.FPath;
FTypeName := AValue.FTypeName;
DOSDate := AValue.DOSDate;
HaveDetails := AValue.HaveDetails;
FPidl := ILClone(AValue.FPidl);
FSimplePidl := ILClone(AValue.SimplePidl);
ParentList := AValue.ParentList;
FColText.Assign(AValue.FColText);
GetParentFolder(FPidl, FParentFolder);
FController := AValue.FController;
{ Don't bother with the icon properties as a new icon }
{ will be created when requested. }
end;
---------------------------------
The line:
"FIsFile := AValue.FIsFile;"
is missing !