This page is no longer maintained — Please continue to the home page at www.scala-lang.org

Accessing protected static methods from inherited java classes

No replies
Sciss
Joined: 2008-12-17,
User offline. Last seen 28 weeks 5 days ago.

hi,

i'm using a java library of mine, and have the following problem:

package de.sciss.common;

// ...

class AppWindow {
// ...

protected static Dimension stringToDimension( String value ) {
// ...
}

// ...
}

now in scala using that lab:

package de.sciss.kontur.gui

import de.sciss.common.{ AppWindow, BasicApplication }

// ...

class TimelineFrame extends AppWindow {

// ...

private def initBounds {
// ...
val cp = getClassPrefs()
val dt = AppWindow.stringToDimension( cp.get( TimelineFrame.KEY_TRACKSIZE, null ))
// ...
}

// ...
}

gives me

"error: method stringToDimension cannot be accessed in object de.sciss.common.AppWindow"

so it seems there is a mismatch problem regarding visibility of static methods in java classes....

can this problem be solved without modifying the library?

thanks, -sciss-

Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland