<tree> needs a public method for moving columns

RESOLVED INACTIVE

Status

()

Core
XUL
RESOLVED INACTIVE
15 years ago
3 days ago

People

(Reporter: jag (Peter Annema), Unassigned)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Reporter)

Description

15 years ago
This will allow clients to programmatically reorder columns in their trees.
(Reporter)

Comment 1

15 years ago
Created attachment 122273 [details] [diff] [review]
Simplest way of doing this

I think |moveColumn| is a bit better name for this than |reorderColumn|. But in
talking to sspitzer perhaps we could have something like

<method name="moveColumn">
  <parameter name="colMove"/>
  <parameter name="colBefore"/>
  <body><![CDATA[
    if (colBefore)
      this._reorderColumn(colMove, colBefore, true);
    else
      this._reorderColumn(colMove, this.lastOrdinalChild, false);
  ]]></body>
</method>
  
}
(Reporter)

Comment 2

15 years ago
Created attachment 122274 [details] [diff] [review]
Alternate approach

Jan: let me know which approach you like best.
(Reporter)

Updated

15 years ago
No longer blocks: 195285
(Reporter)

Comment 3

15 years ago
So I've talked with hewitt about this and we both agreed that something like

// move colMove directly before or after colInsert
moveColumn(colMove, colBefore, aBefore);

would probably be simplest in use. My suggestion in comment 1 (always move
before unless the second arg is null) would put the burden on the client of
finding the next column if they want to move after, the details and knowledge of
which I think we can more cleanly hide inside tree.xml.

This suggestion isn't quite patch 122273, I don't think that code currently
deals correctly with aBefore being false for anything but the last column.

Comment 4

15 years ago
>// move colMove directly before or after colInsert
>moveColumn(colMove, colBefore, aBefore);

looks good
(Reporter)

Comment 5

15 years ago
The bug that needed this worked around this for now.
Keywords: nsbeta1+

Updated

15 years ago
Blocks: 232349

Updated

10 years ago
Component: XP Toolkit/Widgets: Trees → XUL
QA Contact: shrir → xptoolkit.widgets

Updated

10 years ago
Assignee: jag → nobody

Comment 6

3 days ago
Per policy at https://wiki.mozilla.org/Bug_Triage/Projects/Bug_Handling/Bug_Husbandry#Inactive_Bugs. If this bug is not an enhancement request or a bug not present in a supported release of Firefox, then it may be reopened.
Status: NEW → RESOLVED
Last Resolved: 3 days ago
Resolution: --- → INACTIVE
You need to log in before you can comment on or make changes to this bug.