8000 lazySet is not triggering update events · Issue #67 · uchuhimo/konf · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
lazySet is not triggering update events #67
Open
@xmlking

Description

@xmlking
val handler = Account.maxRetry.onSet { value -> println("the maxRetry has changed to $value") }
val handler2 = Account.maxRetry.beforeSet { config, value -> println("the maxRetry will change to $value") }
val handler3 = config.beforeSet { item, value -> println("${item.name} will change to $value") }

val maxRetry by config.property(Account.maxRetry)
println(maxRetry)
config.lazySet(Account.maxRetry) { 4 }
println(maxRetry)
config[Account.maxRetry] = 6
println(maxRetry)
3
4
the maxRetry has changed to 6
the maxRetry will change to 6
maxRetry will change to 6
6

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0