Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[nebula-dev] RE: Problem with CDateTime Spinner in CoCoa

 

Hi,

 

We were using eclipse carbon (Carbon -> eclipse.buildId=I20080617-2000) for our development in MAC environment.

 

Last week we updated to (Cocoa -> eclipse.buildId=I20090611-1540).

 

We have noticed that the up/down arrow for CDateTime spinner does not appear in the Cocoa environment but works in Carbon environment. You could use the following (very simple) code as a sample.

 

/////////////////////////////////////////////////////////////////////////////////////
import org.eclipse.nebula.widgets.cdatetime.CDT;
import org.eclipse.nebula.widgets.cdatetime.CDateTime;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import org.joda.time.Duration;
 
public class CDateTimeTest {
 
        public static void main(String[] args) {
               //Creating a Shell
               Display display = new Display();
               Shell shell = new Shell(display);
               shell.setBounds(21, 22, 100, 100);
               
               //Configuring the layout of the shell 
               GridLayout gl = new GridLayout();
               gl.numColumns = 1;
               shell.setLayout(gl);
        
               //CDATETIME
               CDateTime cdt = new CDateTime(shell, CDT.BORDER | CDT.SPINNER);
               cdt.setPattern("hh:mm:ss");
               cdt.setSelection(new Duration(0));
               
               //opening the shell
               shell.open();
               
               // wait till the shell gets disposed
               while (!shell.isDisposed()) {
                       if (!display.readAndDispatch()) {
                               display.sleep();
                       }
               }
               
               // closing the shell
               shell.dispose();
        }
}

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

 

I would really appreciate if some one can help me out here.

 

Thanks

 

 

Hasibur Rahman

Software Engineer

 

27 Monk Street

Ottawa, ON

K1S 3Y7

Canada

 

Telephone: 613 233 1621

Fax: 613 233 4100

 


Back to the top