[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-swt-dev] Mac OS X port: native Tree/TreeItem

Am Montag, 16.12.02 um 15:17 Uhr schrieb Veronika Irvine:


Sorry if there was miscommunication. The first I heard about your work on
the tree was in your posting of November 20 to which I replied that we were
doing similar work in the stream carbon_work (see below) .

We really wanted to get as many native widgets implemented for the Mac as
possible for M4. We were already using the DataBrowser widget in our
implementation of List and once you have delved into DataBrowser you might
as well go all the way. We are still not quite happy with our
implementation of the native table and tree and so are currently using an
emulated version in the Mac downloads. If you would like to contribute to
the missing areas, please post patch files against the contents in HEAD.

It is quite a challenge to work across multiple sites and coordinate with
independent contributors. Any suggestions on how to improve this are
welcome. I would recommend providing frequent updates on your progress and
providing code submissions at regular intervals.

Is it ok to send the patches to the list?

Now, that the dust has settled here is my first patch for the Tree from the carbon2 directory:

The patch returns the selection in the order the test expects.

in Tree.getSelection(): for (int i=0; i<count; i++) { OS.memcpy (id, start [0] + (i * 4), 4); - result [i] = items [id [0] - 1]; + result [count-1-i] = items [id [0] - 1]; }

Index: Tree.java
RCS file: /home/eclipse/org.eclipse.swt/Eclipse SWT/carbon2/org/eclipse/swt/widgets/Tree.java,v
retrieving revision 1.2
diff -u -r1.2 Tree.java
--- Tree.java	12 Dec 2002 22:04:58 -0000	1.2
+++ Tree.java	16 Dec 2002 22:13:39 -0000
@@ -406,7 +406,7 @@
 	int [] id = new int [1];
 	for (int i=0; i<count; i++) {
 		OS.memcpy (id, start [0] + (i * 4), 4);
-		result [i] = items [id [0] - 1];
+		result [count-1-i] = items [id [0] - 1];
 	OS.HUnlock (ptr);
 	OS.DisposeHandle (ptr);