Skip to content
This repository has been archived by the owner on Sep 28, 2024. It is now read-only.

Wizard component #211

Closed
edvin opened this issue Nov 22, 2016 · 6 comments
Closed

Wizard component #211

edvin opened this issue Nov 22, 2016 · 6 comments

Comments

@edvin
Copy link
Owner

edvin commented Nov 22, 2016

Now that we have the Slideshow and InternalWindow components we have all the building blocks for a Wizard component as well. The API needs to be thought out though. What features should we include?

The basic API would probably be something like:

wizard {
    step(Step1::class)
    step(Step2::class)
}

We must figure out:

  • Inter step communication and access to the Wizard
    • Maybe each Step/UIComponent could implement a WizardStep interface?
  • Each step should be able to block Next/Previous buttons
  • Button configuration?
  • Show progress, possibly in a sidebar?
@edvin
Copy link
Owner Author

edvin commented Apr 2, 2017

Since nobody has asked for this feature and I don't have sufficient use cases at the moment I think we should not implement this until we do. Real world use cases are important to make sure we don't create a too restrictive API that's hard to evolve later.

@edvin edvin closed this as completed Apr 2, 2017
@Awais16
Copy link

Awais16 commented Dec 5, 2017

Hi, how can i disable backbutton ?
i tired overriding with canGoBack= SimpleBooleanProperty
but it leaves me with error

Parameter specified as non-null is null: method tornadofx.NodesKt.enableWhen, parameter predicate

pardon my newbieness 😅

@edvin
Copy link
Owner Author

edvin commented Dec 5, 2017

override val canGoBack = SimpleBooleanProperty(false) should do it. If this doesn't work, post your exact code and the complete stack trace.

@Awais16
Copy link

Awais16 commented Dec 5, 2017

Class ImportWizard: Wizard("Import Wizard","Connect your device with usb and follow the instructions") {

  override val canGoNext = currentPageComplete
    override val canFinish = allPagesComplete
    val backEnable=SimpleBooleanProperty(false)
    override val canGoBack=backEnable
init {
        add(DeviceList::class)
    }

}

and stacktrace:

SEVERE: Uncaught error
java.lang.IllegalArgumentException: Parameter specified as non-null is null: method tornadofx.NodesKt.enableWhen, parameter predicate
	at tornadofx.NodesKt.enableWhen(Nodes.kt)
	at tornadofx.NodesKt.enableWhen(Nodes.kt:1131)
	at tornadofx.Wizard$root$1$4$1$1.invoke(Wizard.kt:152)
	at tornadofx.Wizard$root$1$4$1$1.invoke(Wizard.kt:23)
	at tornadofx.ControlsKt.button(Controls.kt:358)
	at tornadofx.ControlsKt.button$default(Controls.kt:351)
	at tornadofx.Wizard$root$1$4$1.invoke(Wizard.kt:150)
	at tornadofx.Wizard$root$1$4$1.invoke(Wizard.kt:23)
	at tornadofx.FXKt.opcr(FX.kt:454)
	at tornadofx.ControlsKt.buttonbar(Controls.kt:284)
	at tornadofx.ControlsKt.buttonbar$default(Controls.kt:281)
	at tornadofx.Wizard$root$1$4.invoke(Wizard.kt:148)
	at tornadofx.Wizard$root$1$4.invoke(Wizard.kt:23)
	at tornadofx.LayoutsKt.region(Layouts.kt:142)
	at tornadofx.LayoutsKt.bottom(Layouts.kt:136)
	at tornadofx.Wizard$root$1.invoke(Wizard.kt:147)
	at tornadofx.Wizard$root$1.invoke(Wizard.kt:23)
	at tornadofx.FXKt.opcr(FX.kt:454)
	at tornadofx.LayoutsKt.borderpane(Layouts.kt:128)
	at tornadofx.Wizard.<init>(Wizard.kt:87)
	at com.ikmb.questy.view.ImportWizardViews.ImportWizard.<init>(ImportWizard.kt:9)
	at com.ikmb.questy.view.TopView.startImportWizard(TopView.kt:47)

edvin pushed a commit that referenced this issue Dec 5, 2017
@edvin
Copy link
Owner Author

edvin commented Dec 5, 2017

Thanks for reporting :) I've committed a fix for this now.

@Awais16
Copy link

Awais16 commented Dec 5, 2017

Thanks 😄

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants