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