calendar.model, tools.errors.model: re-initialize models on startup
parent
f78bbb865e
commit
2ba7c8c639
|
@ -1,4 +1,4 @@
|
||||||
! Copyright (C) 2008 Slava Pestov
|
! Copyright (C) 2008, 2010 Slava Pestov
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: calendar namespaces models threads kernel init ;
|
USING: calendar namespaces models threads kernel init ;
|
||||||
IN: calendar.model
|
IN: calendar.model
|
||||||
|
@ -15,5 +15,7 @@ SYMBOL: time
|
||||||
(time-thread)
|
(time-thread)
|
||||||
] "Time model update" spawn drop ;
|
] "Time model update" spawn drop ;
|
||||||
|
|
||||||
f <model> time set-global
|
[
|
||||||
[ time-thread ] "calendar.model" add-startup-hook
|
f <model> time set-global
|
||||||
|
time-thread
|
||||||
|
] "calendar.model" add-startup-hook
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
! Copyright (C) 2009 Slava Pestov.
|
! Copyright (C) 2009, 2010 Slava Pestov.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: models source-files.errors namespaces models.delay init
|
USING: models source-files.errors namespaces models.delay init
|
||||||
kernel calendar ;
|
kernel calendar ;
|
||||||
|
@ -6,13 +6,14 @@ IN: tools.errors.model
|
||||||
|
|
||||||
SYMBOLS: (error-list-model) error-list-model ;
|
SYMBOLS: (error-list-model) error-list-model ;
|
||||||
|
|
||||||
(error-list-model) [ f <model> ] initialize
|
|
||||||
|
|
||||||
error-list-model [ (error-list-model) get-global 100 milliseconds <delay> ] initialize
|
|
||||||
|
|
||||||
SINGLETON: updater
|
SINGLETON: updater
|
||||||
|
|
||||||
M: updater errors-changed drop f (error-list-model) get-global set-model ;
|
M: updater errors-changed
|
||||||
|
drop f (error-list-model) get-global set-model ;
|
||||||
|
|
||||||
[ updater add-error-observer ] "ui.tools.error-list" add-startup-hook
|
[
|
||||||
|
f <model> (error-list-model) set-global
|
||||||
|
(error-list-model) get-global 100 milliseconds <delay> error-list-model set-global
|
||||||
|
updater add-error-observer
|
||||||
|
] "ui.tools.error-list" add-startup-hook
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue