Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-swt-dev] mac os x port: native Tree patches


Ok Martin, I've finally had a chance to look at your patches.  You'll need to create a bugzilla
problem report for each item and put the patches in there.  You can paste my comments in this
email in the reports but don't bother discussing it here.  The discussion belongs in the bug
report, especially if we decide not to fix the problem for some reason.

Looking at the "grayed" check box code I noticed that you are using kThemeButtonMixed.
There are several problems with this.  First of all, being "grayed" is independent of being
checked or unchecked.  You can be both "grayed and checked" and "grayed and unchecked".
It seems to me that kThemeButtonMixed is intended to show a tri-state (which is what you have
implemented) and this is wrong.  Clicking on a check box toggles only the check state, not
the grayed state.  I have a hack that does the right SWT thing but I think it may be the wrong
UI metaphore.  For example, clicking on an kThemeButtonMixed button that is unchecked
goes to kThemeButtonOff.  Clicking on a kThemeButtonMixed button that is checked goes
to kThemeButtonOn.  This seems to be the wrong Mac metaphore.

Looking at the "strange behavior when the twiste or checkbox was doubleClicked" code,
there's a chance that we might want to work around this problem but we can discuss this
and everything else in the bugzilla reports.

Steve



Martin Sturzenhecker <msturzen@xxxxxxx>
Sent by: platform-swt-dev-admin@xxxxxxxxxxx

12/28/02 08:17 PM
Please respond to platform-swt-dev

       
        To:        Eclipse SWT Dev <platform-swt-dev@xxxxxxxxxxx>
        cc:        
        Subject:        [platform-swt-dev] mac os x port: native Tree patches




Hi,
I implemented the grayed property in Tree/TreeItem from carbon2.

What I did:
1. Added the boolean field "grayed" to "TreeItem" and implemented the
methods "get/setGrayed"
2. Extended functionality of "Tree´s" "itemDataProc" so that it sets
the grayed property correctly and sends corresponding events.
3. Adjusted "Tree´s" "itemNotification" due to strange behaviour when
the twistie or the checkbox was doubleClicked.
       -> The behavior now is not to send a "SWT.DefaultSelection" event
after twistie or checkbox have been hit twice.
4. Added three constants to "OS".
5. Tested against Junit Tests.                -> Didn´t get worse because of new
functionality.
6. Tested in slefhosted eclipse.                -> see above.

Here are the files:








Hope this helps
martin


Back to the top