JTable in Netrexx

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

JTable in Netrexx

drequena
With default compiler flags string literals would create NetRexx instances, which're quite a different beast than java Strings.

 
Saludos cordiales / Best regards,
David Requena Zabala, Grupo Indukern


----- Original Message -----
From: Patrick Forhan [[hidden email]]
Sent: 01/08/2009 06:31 MST
To: IBM Netrexx <[hidden email]>
Subject: Re: [Ibm-netrexx] JTable in Netrexx



On Fri, Jul 31, 2009 at 2:22 PM, Quique Britto<[hidden email]> wrote:
> ? -- create some data
> ? data = Vector()
> ? data.add( String( "pepe" ))
> ? data.add( String( "maite" ))
> ? data.add( String( "maria jose" ))

data should not be a vector of Strings.  It needs to be a vector of
vectors of strings.  I'm not a netrexx person quite yet, but I'm very
much a JTable person.  Assuming the syntax you're using is correct,
try this:

   -- create some data
   row1 = Vector()
   row1.add( String( "pepe" ))
   row1.add( String( "maite" ))
   row1.add( String( "maria jose" ))

   row2 = Vector()
   row2.add( String( "pepe2" ))
   row2.add( String( "maite2" ))
   row2.add( String( "maria jose2" ))

   data = Vector()
   data.add(row1);
   data.add(row2);

Two things:  I'd be willing to bet that String("pepe") is equivalent
to Java's new String("pepe"), which is creating unnecessary String
objects.  Just use the quoted strings directly.

Also, if you are serious about making a TableModel, you will
ultimately be happier with doing the implementation yourself, rather
than using DefaultTableModel and its Vector of Vectors of generic
data.  When you write your own impl, or extend AbstractTableModel, you
can use real objects to represent the rows.

Pat.
--
Defy mediocrity.

_______________________________________________
Ibm-netrexx mailing list
[hidden email]

________________________________________________________________________
Antes de imprimir este e-mail, piense si es necesario hacerlo: El medioambiente es cosa de todos.
Before printing this email please think twice if it?s really necessary: We all should protect our environment!

______________________________________________
Este correo electr?nico puede contener informaci?n confidencial y/o privilegiada. Si usted no es el destinatario adecuado o ha recibido este correo por error o tiene conocimiento del mismo por cualquier motivo, rogamos nos lo comunique de inmediato, por esta misma direcci?n electr?nica o por tel?fono al 902 502 500, y que proceda a su eliminaci?n. Toda copia, revelaci?n o distribuci?n de esta informaci?n queda terminantemente prohibida pudiendo incurrir en responsabilidades legales. El presente documento y sus anexos que se entregan pueden contener datos de car?cter personal, advirti?ndole de su obligaci?n de conocer y cumplir lo establecido en la Ley Org?nica 15/1999, de 13 de diciembre, de protecci?n de datos de car?cter personal y el Real Decreto 1720/2007, de 21 de diciembre por el que se aprueba el Reglamento de Desarrollo de la LOPD.
___________________________________________________
Privileged / Confidential information may be contained in this message. If you are not the addressee indicated in this message you may not copy or deliver this message to anyone. In such case, you should destroy this message, and notify us immediately, by this same e?mail or by phone at 902 502 500. The copy, disclosure or distribution of this information is strictly forbidden, falling into legal responsibilities. This message and its attached may contain personal details, warning you about your duty of knowing and carrying out the established in the Organical Law 15/1999, december 13th, about personal details protection, the Order in Council 1720/2007, december 21th, which approves the deployment of the LOPD.
___________________________________________________

Reply | Threaded
Open this post in threaded view
|

JTable in Netrexx

rvjansen
This is true; compile with -keep and look at the generated source to  
be absolutely positive about what it generates. With options binary  
you will get strings, but without it objects of type Rexx.

I will look into your program tomorrow - it must be some Swing layout/
painting issue.


best regards,

Ren? Jansen
On 2 aug 2009, at 01:30, [hidden email] wrote:

> With default compiler flags string literals would create NetRexx  
> instances, which're quite a different beast than java Strings.
>
>
> Saludos cordiales / Best regards,
> David Requena Zabala, Grupo Indukern
>
>
> ----- Original Message -----
> From: Patrick Forhan [[hidden email]]
> Sent: 01/08/2009 06:31 MST
> To: IBM Netrexx <[hidden email]>
> Subject: Re: [Ibm-netrexx] JTable in Netrexx
>
>
>
> On Fri, Jul 31, 2009 at 2:22 PM, Quique Britto<[hidden email]>  
> wrote:
>>   -- create some data
>>   data = Vector()
>>   data.add( String( "pepe" ))
>>   data.add( String( "maite" ))
>>   data.add( String( "maria jose" ))
>
> data should not be a vector of Strings.  It needs to be a vector of
> vectors of strings.  I'm not a netrexx person quite yet, but I'm very
> much a JTable person.  Assuming the syntax you're using is correct,
> try this:
>
>   -- create some data
>   row1 = Vector()
>   row1.add( String( "pepe" ))
>   row1.add( String( "maite" ))
>   row1.add( String( "maria jose" ))
>
>   row2 = Vector()
>   row2.add( String( "pepe2" ))
>   row2.add( String( "maite2" ))
>   row2.add( String( "maria jose2" ))
>
>   data = Vector()
>   data.add(row1);
>   data.add(row2);
>
> Two things:  I'd be willing to bet that String("pepe") is equivalent
> to Java's new String("pepe"), which is creating unnecessary String
> objects.  Just use the quoted strings directly.
>
> Also, if you are serious about making a TableModel, you will
> ultimately be happier with doing the implementation yourself, rather
> than using DefaultTableModel and its Vector of Vectors of generic
> data.  When you write your own impl, or extend AbstractTableModel, you
> can use real objects to represent the rows.
>
> Pat.
> --
> Defy mediocrity.
>
> _______________________________________________
> Ibm-netrexx mailing list
> [hidden email]
>
> ________________________________________________________________________
> Antes de imprimir este e-mail, piense si es necesario hacerlo: El  
> medioambiente es cosa de todos.
> Before printing this email please think twice if it?s really  
> necessary: We all should protect our environment!
>
> ______________________________________________
> Este correo electr?nico puede contener informaci?n confidencial y/o  
> privilegiada. Si usted no es el destinatario adecuado o ha recibido  
> este correo por error o tiene conocimiento del mismo por cualquier  
> motivo, rogamos nos lo comunique de inmediato, por esta misma  
> direcci?n electr?nica o por tel?fono al 902 502 500, y que proceda a  
> su eliminaci?n. Toda copia, revelaci?n o distribuci?n de esta  
> informaci?n queda terminantemente prohibida pudiendo incurrir en  
> responsabilidades legales. El presente documento y sus anexos que se  
> entregan pueden contener datos de car?cter personal, advirti?ndole  
> de su obligaci?n de conocer y cumplir lo establecido en la Ley  
> Org?nica 15/1999, de 13 de diciembre, de protecci?n de datos de  
> car?cter personal y el Real Decreto 1720/2007, de 21 de diciembre  
> por el que se aprueba el Reglamento de Desarrollo de la LOPD.
> ___________________________________________________
> Privileged / Confidential information may be contained in this  
> message. If you are not the addressee indicated in this message you  
> may not copy or deliver this message to anyone. In such case, you  
> should destroy this message, and notify us immediately, by this same  
> e?mail or by phone at 902 502 500. The copy, disclosure or  
> distribution of this information is strictly forbidden, falling into  
> legal responsibilities. This message and its attached may contain  
> personal details, warning you about your duty of knowing and  
> carrying out the established in the Organical Law 15/1999, december  
> 13th, about personal details protection, the Order in Council  
> 1720/2007, december 21th, which approves the deployment of the LOPD.
> ___________________________________________________
>
> _______________________________________________
> Ibm-netrexx mailing list
> [hidden email]
>
>