Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IllegalAccessError in AutoDialog (0.7.0) #25

Closed
jpsacha opened this issue Apr 23, 2023 · 0 comments
Closed

IllegalAccessError in AutoDialog (0.7.0) #25

jpsacha opened this issue Apr 23, 2023 · 0 comments
Labels
Milestone

Comments

@jpsacha
Copy link
Member

jpsacha commented Apr 23, 2023

Exception when trying to use AutoDialog. This happening with release 0.7.0

Exception in thread "main" java.lang.IllegalAccessError: failed to access class org.scalafx.extras.auto_dialog.DialogEncoder$LabeledBuilder from class staircase.AutoDialogDemo1$$anon$1 (org.scalafx.extras.auto_dialog.DialogEncoder$LabeledBuilder and staircase.AutoDialogDemo1$$anon$1 are in unnamed module of loader 'app')
	at staircase.AutoDialogDemo1$$anon$1.<init>(AutoDialogDemo1.scala:51)
	at staircase.AutoDialogDemo1$.main(AutoDialogDemo1.scala:51)
	at staircase.AutoDialogDemo1.main(AutoDialogDemo1.scala)

The source code to reproduce the issue:

package staircase

import org.scalafx.extras.auto_dialog.AutoDialog
import org.scalafx.extras.initFX

object AutoDialogDemo1:

  case class LikeRecord(
    firstName: String = "",
    lastName: String = "",
    age: Int = 0,
    likesBeatles: Boolean = true
  )
  def main(args: Array[String]): Unit =

    initFX()

    val srcData = LikeRecord()

    val result: Option[LikeRecord] =
      new AutoDialog(srcData)
        .showDialog(
          "AutoDialog Demo",
          "Fields are auto generated from `LikeRecord` object"
        )

    println(result)

    System.exit(0)

v.0.7.0 was build with Scala 3.0.2, rebuilding scalafx-extras with Scala 3.2.2 resolves the issue (without modification to the above example).

@jpsacha jpsacha added the bug label Apr 23, 2023
@jpsacha jpsacha added this to the v.0.8.0 milestone Apr 23, 2023
@jpsacha jpsacha closed this as completed Apr 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant