Appended is the last msg posted in my earlier thread.

I'd like to take a quick poll: is the behavior described a feature or
a bug?  Personally I'd like the API to create a list of databases that
matches the criteria I pass it without imposing it's own ideas of
what should be on that list.  Otoh, nobody else seems to have
complained about this behavior which has presumably been around
for a while?  Is it just that nobody has been using this feature, or
that the behavior implemented is fine and dandy to everyone but
me?


--
-Richard M. Hartman
[EMAIL PROTECTED]

186,000 mi/sec: not just a good idea, it's the LAW!

"Richard M. Hartman" <[EMAIL PROTECTED]> wrote in message
news:72094@palm-dev-forum...
>
> "Ken Krugler" <[EMAIL PROTECTED]> wrote in message
> news:71981@palm-dev-forum...
> >
> > >I've got 40 font databases.  All have type 'Font'.  36 have creator
> > >'Font'.  4 have creator 'ndmp'.  This call:
> > >
> > >SysCreateDataBaseList('Font', 0, &dbCount, &hDbList, false);
> > >
> > >returns w/ a dbCount of 2 (wrong).  This one:
> > >
> > >SysCreateDataBaseList(0, 'Font', &dbCount, &hDbList, false);
> > >
> > >returns with a dbCount of 36 (correct).
> > >
> > >When 2 are returned, there appear to be one for each
> > >creatorid (hmmmm... let me see ...)
> >
> > SysCreateDataBaseList() tries to create a list of what it considers
> > to be unique DBs, where it defines unique to mean having different
> > creators and types. So you can't really use it to build a list of
> > font DBs where they all have the same type & creator. This should be
> > explicitly mentioned in the documentation.
>
> Darned straight!  From the docs, I expected it to create a list
> of databases according to the options I handed it.  Nobody said
> nuthin' 'bout no prunin' !!!
>
>
>
> >
> > The code that prunes out non-unique entries doesn't get run, though,
> > if the type is a wildcard or the creator isn't a wildcard. That's why
> > you get what you think is a correct result of 36 for your second test
> > case above.
>
> This is even more bizarre.  Either it wants things unique by type &
creator
> or it doesn't.  It seems odd that it enforces that one way but not the
> other.
>
> Does Palm consider this to be a bug?  It seems to be one, either in
> the implementation itself, or at the very least in the documentation.
>
> >
> > What's interesting is that SysCreateDataBaseList() has a hack in it
> > where the list _also_ doesn't get pruned if the type is a PQA, since
> > web clipped DBs all have the same creator/type. What really should
> > have been done there is to create another API where you can specify
> > what kind of pruning should take place, versus burying a
> > Palm-specific type in the code.
>
> There should be _nothing_ buried in the code.  This the same high-handed
> garbage that was done in other APIs with the exceptions buried in code
when
> the documentation said the routine returned a result code.  You never got
> to see the result code & react rationally because the darned device got
> reset
> out from under you.
>
> Palm ( if you're listening ) : there is a difference between developers
> and end-users.  It is up to the developers to protect the end user from
> unintended consequences ... but when the OS attempts to protect the
> developer from them, then the developer is deprived of the tools they
> need to do the job properly.  Get all of this secret *!&@(# out of the
> OS APIs!
>
> ... in the mean time ... is there any API that will do the job that
> SysCreateDataBaseList() is _supposed_ to do, or do I have to
> create the list by hand ?  (... and if I do have to create the list by
> hand ... is there any reason ever to call SysCreateDataBaseList()
> again once I write my own -- un-tricked-out -- version?)
>
>
>
> >
> > I'm not sure why the pruning doesn't happen if the type is a wildcard
> > or the creator is specified - it seems like symmetry would be better.
> >
>
> It seems like behaving the way the docs say would be better yet ...
>
> --
> -Richard M. Hartman
> [EMAIL PROTECTED]
>
> 186,000 mi/sec: not just a good idea, it's the LAW!
>
>
>
>
>
>



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to