Closed
Bug 76369
Opened 23 years ago
Closed 23 years ago
datasource rdf:files loads tree in arbitrary order.
Categories
(Core Graveyard :: RDF, defect)
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.
Reporter | ||
Comment 1•23 years ago
|
||
Reporter | ||
Comment 2•23 years ago
|
||
Comment 3•23 years ago
|
||
-> dougt. Result of recent checkins.
Updated•23 years ago
|
Component: RDF → Browser-General
Assignee | ||
Comment 4•23 years ago
|
||
reporter, in your application, can you explictly sort instead?
Reporter | ||
Comment 5•23 years ago
|
||
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.
Reporter | ||
Comment 6•23 years ago
|
||
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
Reporter | ||
Comment 8•23 years ago
|
||
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.
Comment 9•23 years ago
|
||
> 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.
Updated•6 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•