Skip to content

Rename / remove public R6 methods #75

Closed

Description

@schloerke

ChromoteSession

  • Remove $get_parent() or remove $parent field
    • Many examples already use $parent, but as a field, it can also be set. I believe this is wrong and should only keep $get_parent().
  • Move self$protocol to private$protocol
    • It is only used by EventManager which is created in the ChromoteSession$initialize() method. If private was sent in with private$protocol available, the field could be removed.
  • Move self$send_command() to private$send_command()
    • It is only used by EventManager which is created in the ChromoteSession$initialize() method. If private was sent in with private$protocol available, the field could be removed.

Chromote

  • Rename $stop() to $close()
    • For naming consistency. ChromoteSession uses $close().
  • I'd like to move self$send_command() to private$send_command(), but I do not see a clean way to achieve this.
    • Similar with ChromoteSession$mark_closed(), ChromoteSession$init_promise(), ChromoteSession$get_auto_events(), ChromoteSession$invoke_event_callbacks()

@wch, thoughts?

Activity

  1. changed the title [-]Rename / remove extra methods[/-] [+]Rename / remove public R6 methods[/+] on Feb 25, 2022
  2. wch commented on Feb 25, 2022

    @wch
    Collaborator

    You can lock parent with this in the initializer:

    lockBinding("parent", self)
    
  3. added a commit that references this issue on Feb 25, 2022
    c7ed67a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions