Skip to content

Swift 4 - Stuck on build #12

Description

@MaIronCool

XCode Version 9.2 (9C40b)

File: KJTreeView.swift
Line 67 - self.addChild(inChild: &child, components: &components, index: index)
Error: Use of 'self' in method call 'addChild' before super.init initializes self

What wrong?

Activity

  1. AppinessVashum commented on Jun 21, 2018

    @AppinessVashum

    add super.init() in that method

  2. ronak4567 commented on Jul 13, 2018

    @ronak4567

    Which place to add super.init() method

  3. AppinessVashum commented on Jul 13, 2018

    @AppinessVashum

    At the beginning of the method.
    Like below
    public init(indices: [String]) {
    super.init()
    for i in 0..<indices.count{
    ...
    }
    }

  4. ronak4567 commented on Jul 13, 2018

    @ronak4567

    Thank You

  5. swami303 commented on Jul 21, 2018

    @swami303

    i'm getting following error
    Initializer does not override a designated initializer from its superclass

    public override init() {
    super.init()
    }

  6. lpbas commented on Nov 13, 2018

    @lpbas
    Contributor

    If you are still interested, I've migrated the library to Swift 4.2 in my PR #15 since I'm using it in two of my production apps and needed to support the latest Swift version. Feel free to use my fork until my PR is merged.

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions