www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - A snippet from SWT

reply Ty Tower <tytower hotmail.com.au> writes:
I'm trying to convert a snippet from SWT to DWT . I'll try to attach it here
On my machine it does not compile . I'm using Linux . Could someone try it and
see if it will in fact compile first .
Mar 04 2008
next sibling parent reply Jesse Phillips <jessekphillips gmail.com> writes:
On Tue, 04 Mar 2008 16:17:55 -0500, Ty Tower wrote:

 I'm trying to convert a snippet from SWT to DWT . I'll try to attach it
 here On my machine it does not compile . I'm using Linux . Could someone
 try it and see if it will in fact compile first . module snippet38;
 
 /*
  * Table example snippet: create a table (columns, headers, lines) *
  * For a list of all SWT example snippets see *
  http://www.eclipse.org/swt/snippets/ */
 import dwt.DWT;
 import dwt.widgets.Display;
 import dwt.widgets.Shell;
 import dwt.widgets.Table;
 import dwt.widgets.TableItem;
 import dwt.widgets.TableColumn;
 
 public class Snippet38 {
 public static void main () {
 	Display display = new Display ();
 	Shell shell = new Shell (display);
 	Table table = new Table (shell, DWT.MULTI  | DWT.BORDER |
 	DWT.FULL_SELECTION ); table.setLinesVisible (true);
 	table.setHeaderVisible (true);
         char[][] titles = [" "[], "C", "!", "Description", "Resource",
         "In Folder", "Location" ];
 	for (int i=0; i<titles.length; i++) {
 		TableColumn column = new TableColumn (table, DWT.NONE); 
column.setText
 		(titles [i]);
 }
 	int count = 128;
 	for (int i=0; i<count; i++) {
 		TableItem item = new TableItem (table, DWT.NONE); 
item.setText (0,
 		"x");
 		item.setText (1, "y");
 		item.setText (2, "!");
 		item.setText (3, "this stuff behaves the way I expect"); 
item.setText
 		(4, "almost everywhere"); item.setText (5, "some.folder");
 		item.setText (6, "line  in nowhere" );
 }
 	for (int i=0; i<titles.length; i++) {
 		table.getColumn (i).pack ();
 }
 	table.setSize (table.computeSize (DWT.DEFAULT, 200)); shell.pack 
();
 	shell.open ();
 	while (!shell.isDisposed ()) {
 		if (!display.readAndDispatch ()) display.sleep ();
 }
 	display.dispose ();
 }
 }
snippet38 has already been converted.
Mar 04 2008
parent reply BCS <BCS pathlink.com> writes:
Jesse Phillips wrote:
 On Tue, 04 Mar 2008 16:17:55 -0500, Ty Tower wrote:
 
 
 snippet38 has already been converted.
so that would make it a good learning cases because you can look in the "back of the book"
Mar 04 2008
parent reply Jesse Phillips <jessekphillips gmail.com> writes:
On Tue, 04 Mar 2008 13:59:25 -0800, BCS wrote:

 Jesse Phillips wrote:
 On Tue, 04 Mar 2008 16:17:55 -0500, Ty Tower wrote:
 
 
 snippet38 has already been converted.
so that would make it a good learning cases because you can look in the "back of the book"
then he should look in the back of the book. I'm sorry, but I'm through helping him as there is no gratification from doing so.
Mar 04 2008
parent Jesse Phillips <jessekphillips gmail.com> writes:
On Wed, 05 Mar 2008 13:30:53 +1000, Ty Tower wrote:

 Why then do you keep posting?
 Leave it to someone else.
Why I post, because your an ungrateful asshole and don't deserve help from others, thus by making a statement that the snippet has been ported others are informed that there is already help for you that you will not accept.
Mar 04 2008
prev sibling parent reply "Jarrett Billingsley" <kb3ctd2 yahoo.com> writes:
"Ty Tower" <tytower hotmail.com.au> wrote in message 
news:fql4ab$fci$2 digitalmars.com...
 Ty Tower wrote:

 I'm trying to convert a snippet from SWT to DWT . I'll try to attach
 it here On my machine it does not compile . I'm using Linux . Could
 someone try it and see if it will in fact compile first .
I don't have a written book -I have "Learning to Tango " ebook and there are no snippets in the back. So again if someone might run through this ?
BCS said: so that would make it a good learning cases because you can look in the "back of the book" Note the quotes. This means it's "figurative" speech. For someone who criticizes others' grasp of the English language and typing skills, you don't seem to have a very good grasp yourself. By the "back of the book" he meant this: http://hg.dsource.org/projects/dwt-samples/file/200a229be5ca/, a repository of snippets and examples. The one you're looking for is in dwtsnippets/table/Snippet38.d. Of course, you're not actually going to read the useful part of this post, and instead will just bitch like a little girl about how mean everyone is to you. Whatever. If you want to be an ungrateful ass, go right ahead. People will stop helping you eventually.
Mar 04 2008
next sibling parent "Jarrett Billingsley" <kb3ctd2 yahoo.com> writes:
"Ty Tower" <tytower hotmail.com.au> wrote in message 
news:fql7oa$m8j$1 digitalmars.com...

 If you find any bitching done here it from the likes of you Dear.
 Easy..Dont reply to my posts , I won't miss you Dear
Yeah, keep telling people that. Eventually there'll be no one left who will reply to you.
Mar 04 2008
prev sibling parent reply Robert Fraser <fraserofthenight gmail.com> writes:
Ty Tower wrote:
 Jarrett Billingsley wrote:
  
 Note the quotes.  This means it's "figurative" speech.

 For someone who criticizes others' grasp of the English language and
 typing skills, you don't seem to have a very good grasp yourself.

 By the "back of the book" he meant this:
 http://hg.dsource.org/projects/dwt-samples/file/200a229be5ca/, a
 repository
 of snippets and examples.  The one you're looking for is in
 dwtsnippets/table/Snippet38.d.
Oh I see how quaint -silly me I will have to go and learn what is meant by double quotes won't I ? Now lets see BBs means..... and Jerkit means... and Funk means... Garbage -You are not well taught in English grammar yourself.Double quotes are lines of speech" Strings in your language and always have been . To assign another meaning simply erodes their usefulness until you have utter confusion.
 Of course, you're not actually going to read the useful part of this
 post, and instead will just bitch like a little girl about how mean
 everyone is to
 you.  Whatever.  If you want to be an ungrateful ass, go right
 ahead. People will stop helping you eventually.
If you find any bitching done here it from the likes of you Dear. Easy..Dont reply to my posts , I won't miss you Dear
This post would be so perfect for a "Dramatic reading" a la http://fanfictionredux.ytmnd.com/
Mar 04 2008
next sibling parent "Jarrett Billingsley" <kb3ctd2 yahoo.com> writes:
"Robert Fraser" <fraserofthenight gmail.com> wrote in message 
news:fqlcu9$vp3$2 digitalmars.com...

 Oh I see how quaint -silly me I will have to go and learn what is
 meant by double quotes won't I ? Now lets see BBs means..... and
 Jerkit means... and Funk means...
 Garbage -You are not well taught in English grammar yourself.Double
 quotes are lines of speech" Strings in your language and always have
 been . To assign another meaning simply erodes their usefulness until
 you have utter confusion.

 Of course, you're not actually going to read the useful part of this
 post, and instead will just bitch like a little girl about how mean
 everyone is to
 you.  Whatever.  If you want to be an ungrateful ass, go right
 ahead. People will stop helping you eventually.
If you find any bitching done here it from the likes of you Dear. Easy..Dont reply to my posts , I won't miss you Dear
This post would be so perfect for a "Dramatic reading" a la http://fanfictionredux.ytmnd.com/
lol!
Mar 05 2008
prev sibling next sibling parent Alexander Panek <alexander.panek brainsware.org> writes:
Robert Fraser wrote:
 This post would be so perfect for a "Dramatic reading" a la 
 http://fanfictionredux.ytmnd.com/
Hahaha, awesome!
Mar 05 2008
prev sibling parent Bruno Medeiros <brunodomedeiros+spam com.gmail> writes:
Robert Fraser wrote:
 Ty Tower wrote:
 Jarrett Billingsley wrote:
  
 Note the quotes.  This means it's "figurative" speech.

 For someone who criticizes others' grasp of the English language and
 typing skills, you don't seem to have a very good grasp yourself.

 By the "back of the book" he meant this:
 http://hg.dsource.org/projects/dwt-samples/file/200a229be5ca/, a
 repository
 of snippets and examples.  The one you're looking for is in
 dwtsnippets/table/Snippet38.d.
Oh I see how quaint -silly me I will have to go and learn what is meant by double quotes won't I ? Now lets see BBs means..... and Jerkit means... and Funk means... Garbage -You are not well taught in English grammar yourself.Double quotes are lines of speech" Strings in your language and always have been . To assign another meaning simply erodes their usefulness until you have utter confusion.
 Of course, you're not actually going to read the useful part of this
 post, and instead will just bitch like a little girl about how mean
 everyone is to
 you.  Whatever.  If you want to be an ungrateful ass, go right
 ahead. People will stop helping you eventually.
If you find any bitching done here it from the likes of you Dear. Easy..Dont reply to my posts , I won't miss you Dear
This post would be so perfect for a "Dramatic reading" a la http://fanfictionredux.ytmnd.com/
Apropos, my favorite one: http://explosionedafire.ytmnd.com/ :P -- Bruno Medeiros - MSc in CS/E student http://www.prowiki.org/wiki4d/wiki.cgi?BrunoMedeiros#D
Mar 22 2008