www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.dwt - SWT.DROP_DOWN style has no effect on DateTime widget

reply "JohnnyK" <johnnykinsey comcast.net> writes:
Under Windows 7 64bit Enterprise the SWT.DROP_DOWN style has no 
effect on the DateTime widget.  The widget does not show the date 
in a combo box with a dropdown button.  It shows in the default 
with the up/down spin buttons that are found on the Spin widget.

Below is a slightly modified version of Snippet250 to test out 
this issue.

/*******************************************************************************
  * Copyright (c) 2000, 2004 IBM Corporation and others.
  * All rights reserved. This program and the accompanying 
materials
  * are made available under the terms of the Eclipse Public 
License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  * D Port:
  *     Thomas Demmer <t_demmer AT web DOT de>
  
*******************************************************************************/
module org.eclipse.swt.snippets.Snippet250;

/*
  * DateTime example snippet: create a DateTime calendar and a 
DateTime time.
  *
  * For a list of all SWT example snippets see
  * http://www.eclipse.org/swt/snippets/
  */
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.layout.RowLayout;
import org.eclipse.swt.widgets.DateTime;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;

import java.lang.all;

version(Tango){
     import tango.io.Stdout;
} else { // Phobos
     import std.stdio;
}

void main () {
     Display display = new Display ();
     Shell shell = new Shell (display);
     shell.setLayout (new RowLayout ());

     DateTime calendar = new DateTime (shell, SWT.CALENDAR);
     calendar.addSelectionListener (new class SelectionAdapter{
         override
         void widgetSelected (SelectionEvent e) {
             version(Tango){
                 Stdout("calendar date changed\n");
                 Stdout.flush();
             } else { // Phobos
                 writeln("calendar date changed");
             }
         }
     });

     DateTime date = new DateTime (shell, SWT.BORDER | SWT.DATE | 
SWT.DROP_DOWN);
     date.addSelectionListener (new class SelectionAdapter{
         override
         void widgetSelected (SelectionEvent e) {
             version(Tango){
                 Stdout("date changed\n");
                 Stdout.flush();
             } else { // Phobos
                 writeln("date changed");
             }
         }
     });	
     DateTime time = new DateTime (shell, SWT.TIME);
     time.addSelectionListener (new class SelectionAdapter{
         override
         void widgetSelected (SelectionEvent e) {
             version(Tango){
                 Stdout("time changed\n");
                 Stdout.flush();
             } else { // Phobos
                 writeln("time changed");
             }
         }
     });

     shell.pack ();
     shell.open ();
     while (!shell.isDisposed ()) {
         if (!display.readAndDispatch ()) display.sleep ();
     }
     display.dispose ();
}


I have tried it with and without the border even tried it with 
just SWT.DROP_DOWN style and that did not work either.  This is 
not a critical issue I just wanted to bring it to someones 
attention.  I am not sure what version of SWT DWT is based on 
these days so I don't know what version of DWT I have.  I just 
downloaded a fresh copy of DWT a couple of weeks ago.

I am using dmd v2.064 and rdmd build 20131011

I compiled the code above with the following line from my install 
of dwt directory.

rdmd build swtsnippets[Snippet250]
Feb 13 2014
parent reply Jacob Carlborg <doob me.com> writes:
On 2014-02-13 17:20, JohnnyK wrote:
 Under Windows 7 64bit Enterprise the SWT.DROP_DOWN style has no effect
 on the DateTime widget.  The widget does not show the date in a combo
 box with a dropdown button.  It shows in the default with the up/down
 spin buttons that are found on the Spin widget.

 Below is a slightly modified version of Snippet250 to test out this issue.
 I have tried it with and without the border even tried it with just
 SWT.DROP_DOWN style and that did not work either.  This is not a
 critical issue I just wanted to bring it to someones attention.  I am
 not sure what version of SWT DWT is based on these days so I don't know
 what version of DWT I have.  I just downloaded a fresh copy of DWT a
 couple of weeks ago.

 I am using dmd v2.064 and rdmd build 20131011

 I compiled the code above with the following line from my install of dwt
 directory.

 rdmd build swtsnippets[Snippet250]
Please report an issue with the test case included to: https://github.com/d-widget-toolkit/org.eclipse.swt.win32.win32.x86 DWT is based on SWT 3.4. The exact version can be seen here: https://github.com/d-widget-toolkit/org.eclipse.swt.win32.win32.x86/blob/master/src/org/eclipse/swt/internal/Library.d#L24 -- /Jacob Carlborg
Feb 13 2014
parent reply "JohnnyK" <johnnykinsey comcast.net> writes:
On Thursday, 13 February 2014 at 18:51:38 UTC, Jacob Carlborg 
wrote:
 On 2014-02-13 17:20, JohnnyK wrote:
 Under Windows 7 64bit Enterprise the SWT.DROP_DOWN style has 
 no effect
 on the DateTime widget.  The widget does not show the date in 
 a combo
 box with a dropdown button.  It shows in the default with the 
 up/down
 spin buttons that are found on the Spin widget.

 Below is a slightly modified version of Snippet250 to test out 
 this issue.
 I have tried it with and without the border even tried it with 
 just
 SWT.DROP_DOWN style and that did not work either.  This is not 
 a
 critical issue I just wanted to bring it to someones 
 attention.  I am
 not sure what version of SWT DWT is based on these days so I 
 don't know
 what version of DWT I have.  I just downloaded a fresh copy of 
 DWT a
 couple of weeks ago.

 I am using dmd v2.064 and rdmd build 20131011

 I compiled the code above with the following line from my 
 install of dwt
 directory.

 rdmd build swtsnippets[Snippet250]
Please report an issue with the test case included to: https://github.com/d-widget-toolkit/org.eclipse.swt.win32.win32.x86 DWT is based on SWT 3.4. The exact version can be seen here: https://github.com/d-widget-toolkit/org.eclipse.swt.win32.win32.x86/blob/master/src/org/eclipse/swt/internal/Library.d#L24
Sorry I have no idea how to use GitHub. At the link you provided above what do I do to report this issue.
Feb 13 2014
parent reply Jacob Carlborg <doob me.com> writes:
On 2014-02-13 23:56, JohnnyK wrote:

 Sorry I have no idea how to use GitHub.  At the link you provided above
 what do I do to report this issue.
Here's the exact URL [1]. Type a tile, a message and click "Submit new issue". You can use Github flavored markdown [2] [1] https://github.com/d-widget-toolkit/org.eclipse.swt.win32.win32.x86/issues/new [2] https://help.github.com/articles/github-flavored-markdown -- /Jacob Carlborg
Feb 14 2014
parent reply "JohnnyK" <johnnykinsey comcast.net> writes:
On Friday, 14 February 2014 at 20:42:28 UTC, Jacob Carlborg wrote:
 On 2014-02-13 23:56, JohnnyK wrote:

 Sorry I have no idea how to use GitHub.  At the link you 
 provided above
 what do I do to report this issue.
Here's the exact URL [1]. Type a tile, a message and click "Submit new issue". You can use Github flavored markdown [2] [1] https://github.com/d-widget-toolkit/org.eclipse.swt.win32.win32.x86/issues/new [2] https://help.github.com/articles/github-flavored-markdown
think posting a issue was going to require such a hassle so forget it. I don't want to create an account on that site. I I can live without this. This problem is cosmetic and just not worth the hassle of all this back and forth.
Feb 20 2014
parent reply Jacob Carlborg <doob me.com> writes:
On 2014-02-20 21:53, JohnnyK wrote:


 think posting a issue was going to require such a hassle so
 forget it.  I don't want to create an account on that site.  I

 I can live without this.  This problem is cosmetic and just not
 worth the hassle of all this back and forth.
I would expected everyone had a Github account. It's just easier to keep track of it if the issue is added to Github. It's easy it disappears here in the newsgroup. I created an issue so it's not forgotten: https://github.com/d-widget-toolkit/org.eclipse.swt.win32.win32.x86/issues/16 -- /Jacob Carlborg
Feb 21 2014
parent reply "JohnnyK" <johnnykinsey comcast.net> writes:
On Friday, 21 February 2014 at 17:05:48 UTC, Jacob Carlborg wrote:
 On 2014-02-20 21:53, JohnnyK wrote:


 not
 think posting a issue was going to require such a hassle so
 forget it.  I don't want to create an account on that site.  I

 Anyway
 I can live without this.  This problem is cosmetic and just not
 worth the hassle of all this back and forth.
I would expected everyone had a Github account. It's just easier to keep track of it if the issue is added to Github. It's easy it disappears here in the newsgroup. I created an issue so it's not forgotten: https://github.com/d-widget-toolkit/org.eclipse.swt.win32.win32.x86/issues/16
Yeah I can't use the github tools at work because they don't work through NTLM proxy servers so I never bothered to get an account. Honestly I find that github and git in general is just to difficult to deal with. I just don't know anything about git and there is no simple how to's for it. For a user this is just too much. It's easier to just download a zip and post a comment on a forum. Also I am just a consumer of D I don't know enough to contribute yet. When I posted this I just thought I was doing something wrong.
Feb 22 2014
parent Jacob Carlborg <doob me.com> writes:
On 2014-02-22 18:47, JohnnyK wrote:

 Yeah I can't use the github tools at work because they don't work
 through NTLM proxy servers so I never bothered to get an account.
    Honestly I find that github and git in general is just to
 difficult to deal with.  I just don't know anything about git and
 there is no simple how to's for it.  For a user this is just too
 much.  It's easier to just download a zip and post a comment on a
 forum.  Also I am just a consumer of D I don't know enough to
 contribute yet.  When I posted this I just thought I was doing
 something wrong.
No, you're not doing something wrong :). I just don't won't the issue to get lost here. -- /Jacob Carlborg
Feb 22 2014