CallBackery

 view release on metacpan or  search on metacpan

lib/CallBackery/GuiPlugin/AbstractAction.pm  view on Meta::CPAN


has screenOpts => sub {
    {
    }
};

=head2 actionCfg

Returns a list of action buttons to place at the top of the form.

For C<download> and C<display> actions the gui is blocked by a modal busy
indicator while the download is being prepared (for at most 3 seconds).
Actions which take a long time to produce their data can switch this off by
setting C<noBusyIndicator> to true, keeping the gui usable while they run:

 {
     label         => trm('Create Report'),
     action        => 'download',
     key           => 'createReport',
     noBusyIndicator => true,
     actionHandler => sub { ... },

lib/CallBackery/qooxdoo/callbackery/source/class/callbackery/ui/Busy.js  view on Meta::CPAN

   Utf8Check:  äöü

************************************************************************ */

/**
@asset(callbackery/spinner.gif);
 */

/**
 * singleton with two methods for blocking and unblocking the screen. while the screen
 * is blocked, a busy icon is shown.
 *
 * <pre code='javascript'>
 * var busy = callbackery.ui.Busy.getInstance();
 * busy.manifest();busy.vanish();
 * </pre>
 */

qx.Class.define("callbackery.ui.Busy", {
    extend : qx.ui.basic.Atom,
    type : "singleton",

t/config-restore.t  view on Meta::CPAN


    my $reader = DBI->connect("dbi:SQLite:dbname=$cfgDb",'','',{
        RaiseError => 1,
        PrintError => 0,
        AutoCommit => 1,
    });
    $reader->begin_work;
    $reader->selectrow_array('SELECT count(*) FROM cbconfig');

    ok !eval { $cfg->restoreConfigBlob($blob,'secret'); 1 },
        'a restore blocked by another connection fails';
    like "$@",qr/restore the configuration database/,
        'and fails with the restore error, not something incidental';

    is +(stat $cfgDb)[1], $inode, 'the blocked restore left the inode alone';
    is $db->getConfigValue('restoreProbe'),'busy',
        'the blocked restore left the data alone';

    $reader->rollback;
    $reader->disconnect;

    # and the database is still usable afterwards
    $db->setConfigValue('restoreProbe','afterBusy');
    is $db->getConfigValue('restoreProbe'),'afterBusy',
        'the database is still writable after a blocked restore';
}

# no staging database is left behind
is_deeply [glob "$cfgDb.restore*"],[],'the restore leaves no staging database behind';

$live->disconnect;

done_testing();



( run in 1.338 second using v1.01-cache-2.11-cpan-800906f7e73 )