Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [platform-swt-dev] patch for gtk2 binding

Jeff, I suggest you code this widget in the style of the other widgets and
ignore any swirl about "strings".
When a decision (if any) is made, we will do a global pass and change
everything to be the right way.
If no decision is made, your code will be correct.

This is a design philosophy of SWT.  It goes like this:

There is no such thing as the right way to do something.  There is only
"the same" and "different",
where "different is bad", and "the same" is good.

Here is the reasoning.  If everything is done the same way everywhere, then
it will either work
correctly everywhere or fail everwhere.  If it fails everywhere, it will be
noticed instantly and fixed
right away.  If it works everywhere, then it works everywhere!

 When you write code that is "different" and "way better", several bad
things happen.  First of
all, the "works everywhere/fails everywhere" property no longer holds
because the way better
code can have subtle bugs.  Even if your "different" code works, because it
uses a different
approach, other people trying to understand how something works need to
understand what
you did.   Also, the "different" code may not appear in unrelated searches
because it may not
use certain key methods.  So, doing an "NLS search to find where we use
strings" may not
find the "different" code.

Lastly, one person's "good" is another persons "bad".

Steve



                                                                                                                                           
                      "Boris Shingarov"                                                                                                    
                      <Boris_Shingarov@xxxxxx         To:      platform-swt-dev@xxxxxxxxxxx                                                
                      M>                              cc:                                                                                  
                      Sent by:                        Subject: RE: [platform-swt-dev] patch for gtk2 binding                               
                      platform-swt-dev-admin@                                                                                              
                      eclipse.org                                                                                                          
                                                                                                                                           
                                                                                                                                           
                      07/11/02 03:52 PM                                                                                                    
                      Please respond to                                                                                                    
                      platform-swt-dev                                                                                                     
                                                                                                                                           
                                                                                                                                           




Jeff,

You are very welcome to work on Text, as currently nobody is doing it.
There are some underwater rocks that we will have to discuss when you are
at writing certain pieces of the widget.  For example, the semantics of
modification and selection change events in SWT, are somewhat tricky.
Also, we will have to agree on exactly how we pass/answer Strings; this is
an area that is changing right now, and we need to have a complete
agreement so it's consistent from widget to widget.

Boris


                                                                           
   Jeffrey Morgan                                                          
   <Jeffrey.Morgan@BristolWest.         To:                                
   com>                         "'platform-swt-dev@xxxxxxxxxxx'"           
   Sent by:                     <platform-swt-dev@xxxxxxxxxxx>             
   platform-swt-dev-admin@eclip         cc:                                
   se.org                               Subject:        RE:                
                                [platform-swt-dev] patch for gtk2 binding  
                                                                           
   07/11/2002 07:45 AM                                                     
   Please respond to                                                       
   platform-swt-dev                                                        
                                                                           





I would be interested in replacing GtkText with GtkTextView in the
Text widget.  Of course this would not be a good choice if somebody
is already working on this or if this needs to be completed within the
next week.  I believe this would also fix bug #21452.

-Jeff
-----Original Message-----
From: Boris Shingarov [mailto:Boris_Shingarov@xxxxxxx]
Sent: Wednesday, July 10, 2002 1:40 PM
To: platform-swt-dev@xxxxxxxxxxx
Subject: RE: [platform-swt-dev] patch for gtk2 binding


Jeffrey:  If you find something that you are comfortable with fixing, by
all means go and do it.  Don't hesitate to ask us in the middle.  SWT has a
lot of quirks that exist because of historical reasons, and are not
documented anywhere.
Speaking of the ProgressBar patch:  the change is good.  Apart from getting
rid of deprecated API is good in itself, it also fixes a problem with
ProgressBar causing crashes on some broken themes.












Back to the top