Skip to content

Commit 6b61181

Browse files
BUG FIX: The 'name' and class of handler_nnn() functions where all "reset"
1 parent 5108639 commit 6b61181

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

NEWS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ BUG FIXES:
4343
* Argument 'target' was ignored for all handler functions.
4444

4545
* Argument 'interval' was ignored for handler_debug().
46+
47+
* The class of handler_nnn() functions where all "reset_progression_handler"
48+
rather than "nnn_progression_handler". The same bug caused the reported
49+
'name' field to be "reset" rather than "nnn".
4650

4751

4852
Version: 0.5.0 [2020-04-16]

R/make_progression_handler.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ make_progression_handler <- function(name, reporter = list(), handler = NULL, en
6464
stop_if_not(is.numeric(enable_after), length(enable_after),
6565
!is.na(enable_after), enable_after >= 0)
6666
times <- as.numeric(times)
67-
stop_if_not(length(times) == 1L, is.numeric(times), !is.na(name),
67+
stop_if_not(length(times) == 1L, is.numeric(times), !is.na(times),
6868
times >= 0)
6969
interval <- as.numeric(interval)
7070
stop_if_not(length(interval) == 1L, is.numeric(interval),
@@ -79,8 +79,8 @@ make_progression_handler <- function(name, reporter = list(), handler = NULL, en
7979
}
8080

8181
## Reporter
82-
for (name in setdiff(c("reset", "initiate", "update", "finish", "hide", "unhide"), names(reporter))) {
83-
reporter[[name]] <- structure(function(...) NULL, class = "null_function")
82+
for (key in setdiff(c("reset", "initiate", "update", "finish", "hide", "unhide"), names(reporter))) {
83+
reporter[[key]] <- structure(function(...) NULL, class = "null_function")
8484
}
8585

8686
## Progress state

0 commit comments

Comments
 (0)