Skip to content

Conversation

tcr3dr
Copy link
Contributor

@tcr3dr tcr3dr commented Nov 6, 2015

Renames some things late in the game:

  • renames on_attribute to add_attribute_listener
  • renames on_message to add_message_listener
  • renames attribute_listener to on_attribute
  • renames message_listener to on_message

This creates more parity between add_attribute_listener and remove_attribute_listener, which attach and remove functions, and the simple shorthand / decorate on_attribute which would be pretty difficult to remove.

  • Make notify_attribute_listeners and notify_message_listeners public

As per request.

  • Pass attribute value into attribute listener.

See #61. Function prototype is now: def listener(vehicle, attr_name, value)

@tcr3dr tcr3dr changed the title [WIP] Attribute renaming [WIP] Attribute handler refactoring Nov 7, 2015
@hamishwillee
Copy link
Contributor

@tcr3dr Added a bunch of example and docs fixes associated with this change. I was previously a bit confused about the separate add_ vs on_distinction. This is much more comprehensive and also covers use of the wildcard.

@tcr3dr tcr3dr changed the title [WIP] Attribute handler refactoring Attribute handler refactoring Nov 9, 2015
@tcr3dr tcr3dr merged commit ed56dda into master Nov 9, 2015
tcr3dr added a commit that referenced this pull request Nov 9, 2015
@tcr3dr tcr3dr deleted the tcr-attr branch November 9, 2015 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants