Trolltech Home | Qt-jambi-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 1

Qt-jambi-interest Archive, September 2006
Re: Feedback after a brief use


Message 1 in thread

On Monday 28 August 2006 07:48, Eskil A. Blomfeldt wrote:
> > * Some people complain against the file named Ui_* ... I also agree,
> > that would be nice to have filenames in the "java way". So Ui* or *Ui
> > or no "Ui" at all.
>
> We've seen some comments on this, so it's something we will reconsider.
> What would be the preferred way for you out of your three suggestions?

Probably superfluous, but I'll point out what I have seen being accepted 
in several forums (and naturally in my company)

Since the UI file actually has a 'form name' embedded I would like to 
suggest:
1) juic give an error message when the filename does not equal the form 
name. 
To avoid confusion on which file will be generated and not assume the 
filename of the ui file is leading. This means a fail-fast exactly like 
javac refuses to compile a (public) class where the filename does not 
match the classname.

2) use the name as-is. No additions.
Due to the advantage of the C++ namespace not being available in Java, I 
think the plain usage of the classname as-is gives the lowest amount of 
surprises and therefor should be preferred.
All additions are personal preference and for every person that likes it, 
there will be one that finds it confusing or annoying.

This allows the following workflow:

I create a "MyForm.ui"
This generates a "MyForm.java"
I use that in another class.

Or, if you want to extend  the class it might be usefull to have a 
different name;
I create a "MyFormBase.ui"
This generates a "MyFormBase.java"
I create a "MyForm.java" which is a class that extends MyFormBase
-- 
 [ signature omitted ] 

Attachment: pgp1kbFTmlpE9.pgp
Description: PGP signature