Thread WxPerl und AnyEvent (19 answers)
Opened by Hubbi at 2010-05-06 12:57

lichtkind
 2010-05-07 20:06
#136911 #136911
User since
2004-03-22
5701 Artikel
ModeratorIn + EditorIn
[Homepage]
user image
ja bei mir siehts halt so aus:

Code (perl): (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
sub start_timer {
        # set or update timer events
        my $win = Kephra::App::Window::_ref();
        my $config = Kephra::API::settings()->{file};   

        stop_timer();
        if ($config->{open}{notify_change}) {
                $timer{file_notify} = Wx::Timer->new( $win, 2 );
                $timer{file_notify}->Start( $config->{open}{notify_change} * 1000 );
                Wx::Event::EVT_TIMER( $win, 2, sub { Kephra::File::changed_notify_check() } );
        }
        if ($config->{save}{auto_save}) {
                $timer{file_save} = Wx::Timer->new( $win, 1 );
                $timer{file_save}->Start( $config->{save}{auto_save} * 1000 );
                Wx::Event::EVT_TIMER( $win, 1, sub { Kephra::File::save_all_named() } );
        }
}
Wiki:Tutorien in der Wiki, mein zeug:
kephra, baumhaus, garten, gezwitscher

Es beginnt immer mit einer Entscheidung.

View full thread WxPerl und AnyEvent