jfxtras
jfxtras copied to clipboard
editAppointment popup hiding or closing - ICalendarAgenda
I have made a few alterations to ICalendarAgenda and effects to more properly suit my needs so I may have caused this on my own. But It's small enough and easy enough to look into thought I would mention it. I find when a user closes the editAppointment popup on a newly created appointment, and then exit the popup using the x instead of cancel, the vcomponent will be deleted (or not created) but the appointment will remain. Leading to a nullPointerException if you then click on the appointment and press delete or edit. This also happens if you hide the popup and try to delete the newly drawn appointment that hasn't been saved or canceled yet. The way I have avoided these issues is like so:
popupStage.initModality(Modality.APPLICATION_MODAL); popupStage.setOnCloseRequest(e -> popupScene.getEditDisplayableTabPane().handleCancel());
by not allowing hiding and by setting the close request to your cancel button.
Sorry if this is the wrong place for this I don't use github very much and you may have already solved this.