Subclass

  1. 4 months ago

    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. doobox

    Apr 21 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. like me @doobox

  4. marco

    Apr 27 Administrator User since 2016

    All fixed in the latest beta

  5. doobox

    Apr 27 User since 2018

    @Marco I'm actually skipping :-)

or Sign Up to reply!