Re: [JPP-Devel] Implementation of the setLayerNamesAsListData method.

2007-09-18 Thread Martin Davis
FWIW, and without wanting to get into a philosophical flame war - SS, the coding principles that you've listed are pretty right in line with the way I code as well. The good news is that with Java and modern IDE's, code understandability is much less dependent on these details than it was in th

Re: [JPP-Devel] Implementation of the setLayerNamesAsListData method.

2007-09-18 Thread Sunburned Surveyor
OK. We are on the same page then. :] Sorry for the long-winded e-mail. SS On 9/18/07, Larry Becker <[EMAIL PROTECTED]> wrote: > I assume you mean the revised version: > > Collection layers = argManager.getLayers(); > Object[] layersAsArray = layers.toArray(); > argList.setListData(layersAsArray)

Re: [JPP-Devel] Implementation of the setLayerNamesAsListData method.

2007-09-18 Thread Larry Becker
I assume you mean the revised version: Collection layers = argManager.getLayers(); Object[] layersAsArray = layers.toArray(); argList.setListData(layersAsArray); and not the original. Nothing wrong with that. Larry On 9/18/07, Sunburned Surveyor <[EMAIL PROTECTED]> wrote: > So we don't have an

Re: [JPP-Devel] Implementation of the setLayerNamesAsListData method.

2007-09-18 Thread Sunburned Surveyor
So we don't have an issue with my using a utility method. That is good. What is horrible about my implementation? Can you please provide details? I know I am using two (2) more lines of code than your implementation would, but I tried to explain my reasons for this. I want to write rookie-friendl

Re: [JPP-Devel] Implementation of the setLayerNamesAsListData method.

2007-09-18 Thread Larry Becker
OK, then: public static void setLayerNamesAsListData(LayerManager argManager, JList argList) { argList.setListData(argManager.getLayers().toArray()); } I can cope with creating the utility method, just not the horrible implementation. Larry On 9/18/07, Sunburned Surveyor <[EMAIL

Re: [JPP-Devel] Implementation of the setLayerNamesAsListData method.

2007-09-18 Thread Sunburned Surveyor
Larry, Maybe I am totally missing something with my programming style. I will try to explain my reasoning for wanting this in a separate method, and then you can correct whatever bad programming habits that appear. :] First of all, I really try to avoid chaining method calls like you have done in

Re: [JPP-Devel] Implementation of the setLayerNamesAsListData method.

2007-09-18 Thread Larry Becker
Why don't you just do: argList.setListData(argManager.getLayers().toArray()); and skip the whole method. Larry On 9/18/07, Sunburned Surveyor <[EMAIL PROTECTED]> wrote: > I have attached my implementation of the setLayerNamesAsListData > method. I was thinking about placing this method in Sigle

[JPP-Devel] Implementation of the setLayerNamesAsListData method.

2007-09-18 Thread Sunburned Surveyor
I have attached my implementation of the setLayerNamesAsListData method. I was thinking about placing this method in Sigle's DialogUtil class. Someone asked to see my implementation, and I didn't want to cloud up the other thread, which has moved onto other topics. The Sunburned Surveyor P.S. -