Closed Bug 76369 Opened 23 years ago Closed 23 years ago

datasource rdf:files loads tree in arbitrary order.

Categories

(Core Graveyard :: RDF, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED INVALID

People

(Reporter: pwilson, Assigned: dougt)

Details

(Keywords: regression)

Attachments

(2 files)

Using the rdf:file datasource to load an XUL tree widget give randomly ordered 
contents. PNG and XUL source attached.
-> dougt. Result of recent checkins.
Assignee: waterson → dougt
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: regression
Component: RDF → Browser-General
reporter, in your application, can you explictly sort instead?  
Re: can you sort yourself.

Hardly, the <template> mechanism is used to load the tree - so I have no control 
over this process. 
The alternative is not to use the RDF:file datasource (or RDF), and load the 
tree by using the nsIFile interface to access the local file system. This is 
obviously less elegant (and a lots more code) than the template mechanism.

I know your problem is due to the lack of implicit order in tripple stores.
This is likely to be a general problem. So a general solution would be good.

The datsource interface needs some way of imposing order on the returned 
results - akin to a view in sql. This would then apply to loading a grid, or 
other repeating structure, and not just a tree.  
Sorry my fault.
The code in filePicker.xul shows how to do this correctly.
I coppied my code from an XUL tutorial at xulplanet.com.
Have sent message to them also.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → INVALID
-> RDF

VERIFIED:
trying to shrink <tever>'s resolved list.

Peter, if you have a reason why you invalidated this, please put it here for 
the record. TIA.
Status: RESOLVED → VERIFIED
Component: Browser-General → RDF
I closed this problem as I was not using (aware of) the sort attributes:

<treecol  id="FilenameColumn" resource="http://home.netscape.com/NC-rdf#Name" 
sortActive="true" sortDirection="ascending"/>

This sorts the files/directories into name order. It is not quite correct as you 
would need to sort by the concatentation of isDirectory(DESCENDING) + Name to 
get the usual sequence with directories first. 
>  This sorts the files/directories into name order. It is not quite
> correct as you  would need to sort by the concatentation of 
> isDirectory(DESCENDING) + Name to get the usual sequence with
> directories first. 


Borrowing from a quote of mine in bug # 107133:

In general, I disapprove of code that FORCES users to see all directories before
all files.  Remember: while some platforms do display items that way, other
platforms don't... so, its best to make it optional; give the user the default
for their platform, and allow them to change it if they prefer.
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: