pivot-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sandro Martini <sandro.mart...@gmail.com>
Subject Re: Little change in Alert and Prompt fro better diagnostic info (optional)
Date Tue, 24 Apr 2012 13:41:58 GMT
Hi all,
in attach you can find the patch for all this stuff, and even a sample
test application of it (the bxml file and the js containing the
I have sen that Alert and Prompt already contains a static method, but
I think that even a constructor one dedicated to this is useful.

And I know that the new utility class Console is trivial, but having a
default implementation could help in simple cases ... so the new test
application, showing the usage of all these diagnostic-related

Unless objections I'll commit this Friday (and assign it to an issue
for the 2.0.2, as improvement).

Anyway, tell me what you think.


2012/4/23 Sandro Martini <sandro.martini@gmail.com>:
> Hi all,
> lookign at Clipboard files (under tutorials), for the issue PIVOT-843
> I just found some little but useful changes, so my proposal:
> what do you think to add a new constructor to Alert (and meybe even
> Prompt) so from code I could call them with all default options, but
> setting ontly the message ?
> In this way we could have a Javascript-like way to open Alert dialogs
> ... and then for example in the clipboard.js I could do this:
> function paste() {
> // TODO: test ...
> Alert("alert").open(window);
> of course having the window injected here, requiring a little change
> in clipboard.bxml (add the bxml:id for the window):
> <Window title="Clipboard" maximized="true"
>    bxml:id="window"
>    xmlns:bxml="http://pivot.apache.org/bxml"
>    xmlns="org.apache.pivot.wtk">
>    <bxml:script src="clipboard.js"/>
> Of course we could even go further and also make another, more
> specific version of its constructor, but the proposed one could be
> enough ...
> What do you think (1) ?
> And last, even for better debug (but without the debugger), what do
> you think on utility methods to log to system.out and system.err a
> given string ?
> Useful to log messages in js files like that seen before here ...
> Note: probably methods to do this already exists (I have to look) but
> the news here is to make them callable from resources-like files ...
> What do you think (2) ?
> Bye,
> Sandro

  • Unnamed multipart/mixed (inline, None, 0 bytes)
View raw message