Subclass

  1. 5 years ago

    Luiz D'Aniello

    18 Apr 2019 User since 2019

    If i create a Class and say that it's a subclass of a OvalShape, that class will not extend the OvalShape class?
    For example, my new class it's called OvalShape_ext, subclass of OvalShape.

    var oval=OvalShape_ext();

    why i can't access for example oval.frame.x

  2. 4 years ago

    doobox

    21 Apr 2019 User since 2018

    Bump: Also interested in this.

    Started exploring the class object.
    My simple test:

    Add class object, name it "specialView", and set it's subclass to View
    In a button action add:

    const test= specialView()
    test.backgroundColor = Color.red
    test.frame = Rect(0,0,100,100)
    View1.addSubview(test)

    Expected result:
    New view created inside View1
    Actual result:
    Error " Unable to find backgroundColor into class specialView"

  3. Luiz D'Aniello

    22 Apr 2019 User since 2019

    like me @doobox

  4. marco

    27 Apr 2019 Administrator User since 2016

    All fixed in the latest beta

  5. doobox

    27 Apr 2019 User since 2018

    @Marco I'm actually skipping :-)

or Sign Up to reply!