You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pivot.apache.org by Sandro Martini <sa...@gmail.com> on 2011/03/21 23:29:25 UTC

WindowApplicationAdapter for samples, demos, etc

Hi all,
searching in Pivot code base I've found 45 occurrences of

private Window window = null;

(of course most of them under demos, examples, tests, tutorials)

and related (empty method required by Application).

So, to simplify a little, what do you think to add an
WindowApplicationAdapter (or if someone has a better name is welcome
:-) ) so all samples can simply extend it (and maybe put inside a
private window and a private bxmlserializer) ?
(Ok I agree that's a very little thing but could be useful ...).

Comments ?

Bye,
Sandro

Re: WindowApplicationAdapter for samples, demos, etc

Posted by Greg Brown <gk...@verizon.net>.
I'm not in favor of it. I think it's an artificial simplification with little real benefit.

On Mar 22, 2011, at 10:03 AM, Sandro Martini wrote:

> Hi,
> if you aren't against this I'd prefer to add (I like WindowedApplication :-)
> ), so I could reduce some boilerplate code from tests and demos.
> 
> Thanks,
> Sandro
> 
> 
> --
> View this message in context: http://apache-pivot-developers.417237.n3.nabble.com/WindowApplicationAdapter-for-samples-demos-etc-tp2712254p2714966.html
> Sent from the Apache Pivot - Developers mailing list archive at Nabble.com.


Re: WindowApplicationAdapter for samples, demos, etc

Posted by Greg Brown <gk...@verizon.net>.
Sorry, "artificial" isn't the right word - it's a trivial simplification with little benefit.

On Mar 22, 2011, at 10:03 AM, Sandro Martini wrote:

> Hi,
> if you aren't against this I'd prefer to add (I like WindowedApplication :-)
> ), so I could reduce some boilerplate code from tests and demos.
> 
> Thanks,
> Sandro
> 
> 
> --
> View this message in context: http://apache-pivot-developers.417237.n3.nabble.com/WindowApplicationAdapter-for-samples-demos-etc-tp2712254p2714966.html
> Sent from the Apache Pivot - Developers mailing list archive at Nabble.com.


Re: WindowApplicationAdapter for samples, demos, etc

Posted by Sandro Martini <sa...@gmail.com>.
Hi,
if you aren't against this I'd prefer to add (I like WindowedApplication :-)
), so I could reduce some boilerplate code from tests and demos.

Thanks,
Sandro


--
View this message in context: http://apache-pivot-developers.417237.n3.nabble.com/WindowApplicationAdapter-for-samples-demos-etc-tp2712254p2714966.html
Sent from the Apache Pivot - Developers mailing list archive at Nabble.com.

Re: WindowApplicationAdapter for samples, demos, etc

Posted by Greg Brown <gk...@verizon.net>.
Most demo and tutorial apps should already be using ScriptApplication. The few cases where we could not (or didn't want to) use ScriptApplication didn't seem to justify creating a generic "WindowedApplication" class. For the other cases (in tests) it might make more sense, but IMO isn't worth the effort at this point since it doesn't really solve any major problem.

On Mar 22, 2011, at 9:30 AM, Sandro Martini wrote:

> Hi Greg,
> probably a better name could be WindowApplication or something similar
> (suggestions are always welcome) ... and we could adapt existing classes
> using it any time it's not possible to use ScriptApplication, ok ?
> 
> Tell me, so as soon as possible I can start to make this little change.
> 
> Bye
> 
> 
> --
> View this message in context: http://apache-pivot-developers.417237.n3.nabble.com/WindowApplicationAdapter-for-samples-demos-etc-tp2712254p2714824.html
> Sent from the Apache Pivot - Developers mailing list archive at Nabble.com.


Re: WindowApplicationAdapter for samples, demos, etc

Posted by Sandro Martini <sa...@gmail.com>.
Hi Greg,
probably a better name could be WindowApplication or something similar
(suggestions are always welcome) ... and we could adapt existing classes
using it any time it's not possible to use ScriptApplication, ok ?

Tell me, so as soon as possible I can start to make this little change.

Bye


--
View this message in context: http://apache-pivot-developers.417237.n3.nabble.com/WindowApplicationAdapter-for-samples-demos-etc-tp2712254p2714824.html
Sent from the Apache Pivot - Developers mailing list archive at Nabble.com.

Re: WindowApplicationAdapter for samples, demos, etc

Posted by Sandro Martini <sa...@gmail.com>.
continuing this thread from here (via Nabble, sorry because I'm not able via
email today):
http://apache-pivot-developers.417237.n3.nabble.com/WindowApplicationAdapter-for-samples-demos-etc-td2712254.html


--
View this message in context: http://apache-pivot-users.399431.n3.nabble.com/WindowApplicationAdapter-for-samples-demos-etc-tp2712253p2714843.html
Sent from the Apache Pivot - Users mailing list archive at Nabble.com.

Re: WindowApplicationAdapter for samples, demos, etc

Posted by Greg Brown <gk...@verizon.net>.
"Adapter" isn't really the right term. Have you considered using ScriptApplication?

On Mar 21, 2011, at 6:29 PM, Sandro Martini wrote:

> Hi all,
> searching in Pivot code base I've found 45 occurrences of
> 
> private Window window = null;
> 
> (of course most of them under demos, examples, tests, tutorials)
> 
> and related (empty method required by Application).
> 
> So, to simplify a little, what do you think to add an
> WindowApplicationAdapter (or if someone has a better name is welcome
> :-) ) so all samples can simply extend it (and maybe put inside a
> private window and a private bxmlserializer) ?
> (Ok I agree that's a very little thing but could be useful ...).
> 
> Comments ?
> 
> Bye,
> Sandro


Re: WindowApplicationAdapter for samples, demos, etc

Posted by Greg Brown <gk...@verizon.net>.
"Adapter" isn't really the right term. Have you considered using ScriptApplication?

On Mar 21, 2011, at 6:29 PM, Sandro Martini wrote:

> Hi all,
> searching in Pivot code base I've found 45 occurrences of
> 
> private Window window = null;
> 
> (of course most of them under demos, examples, tests, tutorials)
> 
> and related (empty method required by Application).
> 
> So, to simplify a little, what do you think to add an
> WindowApplicationAdapter (or if someone has a better name is welcome
> :-) ) so all samples can simply extend it (and maybe put inside a
> private window and a private bxmlserializer) ?
> (Ok I agree that's a very little thing but could be useful ...).
> 
> Comments ?
> 
> Bye,
> Sandro