It would truly be a disgrace if the _entire_ file list for a given directory
must be read and stored in order to implement a scrolling list!
The whole purpose of removable storage is to let applications gain access to
large quantities of data (and individually large data items). Yet this API,
if it works as we think, requires an application to store a potentially very
large list of file names in order to do this.
The only reason I can think of to explain why Palm chose this design is that
they didn't expect that apps would want to let users browse the card file
system in order to find data objects.
Note to any Palm engineers reading this: Any chance that this will change?
Sorry if this sounds like a "shoot the messenger" response. ;-)
Thanks for the reply,
Mark Peters
in article 36025@palm-dev-forum, Scott Johnson (Bellevue) at
[EMAIL PROTECTED] wrote on 1/16/01 3:53 PM:
>
>> From: Mark A. Peters [mailto:[EMAIL PROTECTED]]
>> I've noticed that the value of the dirEntryIteratorP argument is set
>> to 1 after enumerating the first entry, and changes monotonically
>> by 1 thereafter.
>
> But as you know, this specific behavior isn't documented. Generally with
> any iteration API's (on any platform or library) you should assume the
> iterator variable is a black box unless the docs say otherwise. See struct
> DmSearchStateType in DataMgr.h for an extreme example of opaqueness.
>
>> this does NOT work on a Sony Clie running OS 3.5
>> I'm wondering if this technique is kosher or not.
>
> Well if the Sony implementation still conforms to the documentation (which
> it does) but your code doesn't work, then it's definitely not kosher.
>
>> implemented a scrolling display of the contents of a removable storage
>> card directory, and it seems to work under an emulated OS 4.0 ROM.
>
> Sounds like you need to cache all the file names up front during the
> iteration even though this takes extra time and space. And this probably
> proves that it's smart to test on HostFS as well as a "real" FS.
>
> -slj-
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/