View Issue Details

IDProjectCategoryView StatusLast Update
0002083JEDI VCL00 JVCL Componentspublic2004-08-25 16:13
ReporterglchapmanAssigned Toremkobonte 
PrioritynormalSeverityfeatureReproducibilityalways
Status resolvedResolutionfixed 
Product Version 
Target VersionFixed in Version 
Summary0002083: Some Pidl support for TJvBrowseForFolderDialog
DescriptionCurrently TJvBrowseForFolderDialog exposes a LastPidl property which is basically useless, since it is declared as a TItemIDList. Attached is a patch which removes the LastPidl property, replacing it with a read-only Pidl property which stores the result of the call to ShBrowseForFolder. The Pidl property is also used to expose the pidl of the selected item during handling of the OnAcceptChange and OnChange events.

The patch also uses the PidlFree routine from JclShell to free Pidls (rather than CoTaskMemFree). PidlFree wraps SHGetMalloc.Free, which appears to be the MS documented way of freeing Pidls.

The attached zip includes the patched JvBrowseFolder.pas and a diff against the current file is CVS.
Additional Information1) I removed the LastPidl property since, if anyone is using it, it is almost certainly not doing what they expect.
2) I also added exception handling blocks to the methods implementing IFolderFilter (since these COM calls which invoke arbitrary callback routines). Right now these just swallow any exceptions and return E_UNEXPECTED.
3) It's possible the Pidl property should also be valid during processing of the two IFolderFilter callbacks (OnGetEnumFlags and OnShouldShow), but I didn't implement that.
4) It may be "Pidl" is a bad name for this property; perhaps "ItemIDList" or "ItemID" would be better?
TagsNo tags attached.

Activities

2004-08-21 15:44

 

JvBrowseFolder.zip (15,208 bytes)

remkobonte

2004-08-25 16:13

developer   ~0005094

Thanks, added to CVS.

@3: Agree, I might implement it sometime; not that important.
@4: Did not change it; I also think Pidl is not a real good name, but it is used in JclShell and MSDN likes the word too, thus I guess it is okay.

Issue History

Date Modified Username Field Change
2004-08-21 15:44 glchapman New Issue
2004-08-21 15:44 glchapman File Added: JvBrowseFolder.zip
2004-08-24 10:25 remkobonte Status new => assigned
2004-08-24 10:25 remkobonte Assigned To => remkobonte
2004-08-25 16:13 remkobonte Status assigned => resolved
2004-08-25 16:13 remkobonte Resolution open => fixed
2004-08-25 16:13 remkobonte Note Added: 0005094