www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.dwt - showWidget

reply Bill Baxter <dnewsgroup billbaxter.com> writes:
Trying to port to linux now.
There's a difference between dwt.widgets.Composite.Composite.showWidget 
on windows and linux DWT.

on Windows it's showWidget(bool), on Linux it's showWidget().

How do you hide (un-show) a widget with dwt-linux?

--bb
May 12 2008
parent reply Frank Benoit <keinfarbton googlemail.com> writes:
Bill Baxter schrieb:
 Trying to port to linux now.
 There's a difference between dwt.widgets.Composite.Composite.showWidget 
 on windows and linux DWT.
 
 on Windows it's showWidget(bool), on Linux it's showWidget().
 
 How do you hide (un-show) a widget with dwt-linux?
 
 --bb

In java the methods without protection attribute are package visible only. In D they are public and making them "package" would make them also non-virtual and this would change behaviour. I did not yet spend time to establish those access restrictions in DWT. As a concequence, in DWT you can access methods that are not part of the public API of SWT. "showWidget" is an example. Please use only methods that are explicit "public", or use the javadoc http://help.eclipse.org/help33/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/api/org/eclipse/swt/package-summary.html Instead of showWidget, i think setVisible(bool) is doing what you want.
May 13 2008
parent Bill Baxter <dnewsgroup billbaxter.com> writes:
Frank Benoit wrote:
 Bill Baxter schrieb:
 Trying to port to linux now.
 There's a difference between 
 dwt.widgets.Composite.Composite.showWidget on windows and linux DWT.

 on Windows it's showWidget(bool), on Linux it's showWidget().

 How do you hide (un-show) a widget with dwt-linux?

 --bb

In java the methods without protection attribute are package visible only. In D they are public and making them "package" would make them also non-virtual and this would change behaviour. I did not yet spend time to establish those access restrictions in DWT. As a concequence, in DWT you can access methods that are not part of the public API of SWT. "showWidget" is an example. Please use only methods that are explicit "public", or use the javadoc http://help.eclipse.org/help33/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/api/org/eclipse/swt/ ackage-summary.html Instead of showWidget, i think setVisible(bool) is doing what you want.

Ooh, setVisible! That's what I want. Thanks. --bb
May 13 2008