Re: Are these improvements(?) on the Swixml queue?

[email protected]
Newsgroups gmane.comp.embedded.carlsbad-cubes
Message-ID <[email protected]>
Wolf's suggestions are, of course, what I wanted.  Thanks. 

But I wondered why I was lead to ask the questions I did.
The answer, or so I would like to think, lies in misleading
aspects of the sample programs.  I probably didn't look at
all the samples, but I did read quite a few of them. 

1. The samples use absolute coordinates, expressed as
   dimensions for containers.  Because, at least in
   most cases, there is no need to use coordinates,
   I assumed they were there because they had to be;
   ie, that SwiXML didn't support packing layouts.
   At first I did't think of the more obvious -- these
   were generated by a program (Franklin?), not a human. 

2. And regarding DefaultCloseOperation="JFrame.EXIT_ON_CLOSE",
  it's right there in the tag documentation, but I didn't
  notice it in any of the samples.  The samples either
  suffered from not doing anything about stopping the
  progam when the window was closed (eg, HelloWorld), to
  handling it and just calling exit().  So why didn't
  they use it?  Compatibility with the past? 

Unfortunately, I choose the HelloWorld sample as a starting point
for my first experiments.  This program doesn't terminate when
the close box is clicked.  Such nasty behavior is an example of
why Sun should have chosen the EXIT_ON_CLOSE default, but they
didn't.  It also uses a mysterious LabelFor="tf" tag on the label.
And it mysteriously used fixed pixel dimensions, even tho they
make it look terrible.  These samples made me think SwiXML was
not up to the job I needed done.  And if they convinced me there
were big deficiencies, I'm sure many other casual testers have
also turned away withoug posting and finding out how wrong they
were.  Enuf whining. 

During the month before I start teaching Java again, I'll start
recoding some samples using SwiXML.  If that goes well, I'll offer
them here, and would be interested in feedback. 

Turned back on by SwiXML, 

 -- Fred 


Wolf Paulus writes: 

> Fred,
> Thanks for your feedback. Before considering your suggestions, I would 
> like to find out if I understand them correctly. 
> 
> 1.) You don't ant to define a JFrames default closing operation through 
> XML or code, you want Swixml have it set for you:
> I.e.
> 	<frame DefaultCloseOperation="JFrame.EXIT_ON_CLOSE"> ..</frame>
> would become
> 	<frame/> 
> 
> 2.) You want the SwingEngine to call the pack method for you to save one 
> line in this example:
> ..
>   public JFrame frame; 
> 
>   private HelloMac() throws Exception {
>     SwingEngine  swix= new SwingEngine( this );
>     swix.render( "xml/hellomac.xml" );
>     frame.pack();
>     frame.setVisible( true );
>   } 
> 
> 
> 	Wolf Paulus 
> 
> C a r l s b a d   C u b e s
> mailto:[email protected] 
> 
> CONFIDENTIALITY NOTICE:
> This message is intended only for the use of the individual or entity to 
> which it is addressed, and may contain information that is privileged, 
> confidential and exempt from disclosure under applicable law.
> If you are not the intended recipient, please contact the sender by reply 
> email and destroy all copies of the original message.
> On Feb 22, 2004, at 12:18 PM, [email protected] wrote: 
> 
>> I've only used Swixml on a small program, and the same for Thinlet.  
>> However, I'm quite enthusiastic about this approach and Swixml seems to 
>> be a good choice.  But ...
>> My target audience is college students in their first few Java courses.  
>> Currently I teach Swing GUI programming, and there's much good to be said 
>> about GUI programming and what it teaches, but it's a big step for 
>> beginners and it often overwhelms the logic of the problem.  The XUL 
>> philosophy offers a lower entry cost to GUI programming with it's own 
>> benefits in the separation of logic and user interface.  So I'm looking 
>> for Swixml features that make small student programs easier.
>> Two features that were immediately apparent.
>> * The default window closing operation is not EXIT_ON_CLOSE.  This is
>> not the default on JFrame tho it probably should have been.  Would
>> it be possible for Swixml to use this more desirable default?
>> It would remove one small obstacle for the students.
>> * Packing.  I was surprised to see window dimensions in every example.
>> Students aside, this seemed primitive.  Are there plans to pack
>> instead of setSize?
>> -- Fred  
>> 
>> 
>> _______________________________________________
>> Forum mailing list
>> [email protected]
>> http://carlsbadcubes.com/mailman/listinfo/forum_carlsbadcubes.com
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.