Skip to content
This repository has been archived by the owner on Mar 5, 2023. It is now read-only.

HelpWindow: help window stays open even after exiting by clicking the close button #826 #832

Merged

Conversation

yamidark
Copy link
Contributor

@yamidark yamidark commented Feb 16, 2018

Fixes #826

The MainWindow does not have an event handler to handle external
requests (such as the close button or through the taskbar) to close
the MainWindow.

This may cause the app to not close properly since MainApp#stop() is
not called as the ExitAppRequestEvent is not raised. MainApp#stop() is
the method used to call Platform#exit() and System#exit(int) which
closes our app and all remaining open windows. Thus, if MainApp#stop()
is not called, the app may continue to run even after the MainWindow is
closed, causing existing HelpWindows to remain open even when the user
expects the app to stop.

According to the life-cycle section in the documentation on JavaFX
Application[1], the app will only finish and call MainApp#stop() when
the app either calls Platform#exit() or when the last window has been
closed. Thus, should there be any HelpWindows still opened, the app
will continue running, causing those HelpWindows to remain open.

Let's add an event handler for the onCloseRequest event in the root of
MainWindow.fxml. This event will call MainWindow#handleExit(), which
raises an ExitAppRequestEvent, when there is an external request to
close the app.

EmptyMainWindowHandle does not contain a close button, thus to test if
an ExitAppRequestEvent was raised, we fire a
WindowEvent#WINDOW_CLOSE_REQUEST event which will trigger the
onCloseRequest event.

[1] JavaFx documentation for Application:
https://docs.oracle.com/javafx/2/api/javafx/application/Application.html

@CanIHasReview-bot
Copy link

v1

@yamidark submitted v1 for review.

(📚 Archive)

Checkout this PR version locally
git fetch https://github.com/se-edu/addressbook-level4.git refs/pr/832/1/head:BRANCHNAME

where BRANCHNAME is the name of the local branch you wish to fetch this PR to.

Copy link
Contributor

@vivekscl vivekscl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few nits on the commit message:
The title of the commit message could give a better overview instead? Like for example, MainWindow: add an event handler for the close button?

any other external method sounds a bit unclear to me.

This may cause the app to not close properly
To be more specific, only the HelpWindow doesn't close, right?

The 4th paragraph seems to have gone into too much detail such as explaining what handleExit() does.

@yamidark
Copy link
Contributor Author

The title of the commit message could give a better overview instead? Like for example, MainWindow: add an event handler for the close button?

Kind of followed the style I have been using, where the commit title just states what I'm doing, and the other parts of the message explains what it is and why we need it.

any other external method sounds a bit unclear to me.

We technically can close the MainWindow via other means like closing it in the taskbar below which also result in the bug. Not too sure how to phrase this better though, maybe we can just give the 1 example I mentioned earlier?

This may cause the app to not close properly
To be more specific, only the HelpWindow doesn't close, right?

The app itself also doesn't stop running which is the reason why the HelpWindow does not close.
You can try just clicking the close button with HelpWindow open, and the logger on the console does not state that MainApp#stop() is called, only after the HelpWindow is closed does Mainapp#stop() get called.

The 4th paragraph seems to have gone into too much detail such as explaining what handleExit() does

Hmmm, yep probably don't need to go into detail what handleExit() does.

@vivekscl
Copy link
Contributor

Kind of followed the style I have been using, where the commit title just states what I'm doing, and the other parts of the message explains what it is and why we need it.

Oh, in that case, it should be fine 👍

We technically can close the MainWindow via other means like closing it in the taskbar below which also result in the bug. Not too sure how to phrase this better though, maybe we can just give the 1 example I mentioned earlier?

You could add the example and phrase it like, There is no event handler for closing the MainWindow via external methods such as the close button or the taskbar.

The app itself also doesn't stop running which is the reason why the HelpWindow does not close.
You can try just clicking the close button with HelpWindow open, and the logger on the console does not state that MainApp#stop() is called, only after the HelpWindow is closed does Mainapp#stop() get called.

Oh, didn't notice that, my bad 😅

* Sets an event handler for the app to stop when the {@code MainWindow}'s close button is pressed.
*/
private void setCloseButtonEvent() {
getPrimaryStage().setOnCloseRequest(event -> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If some other parts of the application calls getPrimaryStage().close();, it does not trigger OnCloseRequest. Perhaps we should use setOnHiding instead? (Source)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If some other parts of the application calls getPrimaryStage().close();, it does not trigger OnCloseRequest. Perhaps we should use setOnHiding instead?

I wanted to differentiate between closing the app internally (via ExitCommand or the exit menu button) and externally (close button or from taskbar).
If we use setOnHiding, handleExit() actually gets called twice if we close it internally since setOnHiding would call handleExit() for the 2nd time afterMainApp.stop() calls mainWindow.hide() in ui.stop().

@yamgent
Copy link
Member

yamgent commented Feb 18, 2018

Also I wonder whether we should perhaps use fxml to do our deed instead of writing some more code...

diff --git a/src/main/resources/view/MainWindow.fxml b/src/main/resources/view/MainWindow.fxml
index 1dadb95b..daf386d8 100644
--- a/src/main/resources/view/MainWindow.fxml
+++ b/src/main/resources/view/MainWindow.fxml
@@ -12,7 +12,7 @@
 <?import javafx.scene.layout.VBox?>

 <fx:root type="javafx.stage.Stage" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1"
-         minWidth="450" minHeight="600">
+         minWidth="450" minHeight="600" onHiding="#handleExit">
   <icons>
     <Image url="@/images/address_book_32.png" />
   </icons>

@yamidark
Copy link
Contributor Author

Also I wonder whether we should perhaps use fxml to do our deed instead of writing some more code...

Wanted to do that too, but didn't know if it could be done and my MainWindow.fxml doesn't seem to open in Scenebuilder. Yep, doing this in the .fxml would definitely be better.

@yamgent
Copy link
Member

yamgent commented Feb 19, 2018

my MainWindow.fxml doesn't seem to open in Scenebuilder

Ah okay. IIRC SceneBuilder has never been working even when I was a cs2103t student, so don't worry about it. :P SceneBuilder has strict requirements on how we structure our UI codes (e.g. controllers) and widgets (e.g. placeholders), so loading problems are probably not unheard of.

Anyway, you can also spot possible attributes in the JavaFX docs under Property Summary as well. onCloseRequest="#handleExit" is probably what you are looking for.

@yamidark yamidark force-pushed the 826-HelpWindow-stays-open-after-exit branch 4 times, most recently from 7a9043c to ce305ac Compare February 19, 2018 07:05
@CanIHasReview-bot
Copy link

v2

@yamidark submitted v2 for review.

(📚 Archive) (📈 Interdiff between v1 and v2)

Checkout this PR version locally
git fetch https://github.com/se-edu/addressbook-level4.git refs/pr/832/2/head:BRANCHNAME

where BRANCHNAME is the name of the local branch you wish to fetch this PR to.

@Zhiyuan-Amos
Copy link
Contributor

Zhiyuan-Amos commented Feb 19, 2018

Can you call some method in guiRobot to move the cursor to click on the x button to close the window? That way we can write regression tests for it.

@vivekscl do take a look at the commit message and suggest improvements to it. I spotted a few bugs alrd :P

@yamidark
Copy link
Contributor Author

Can you call some method in guiRobot to move the cursor to click on the x button to close the window? That way we can write regression tests for it.

Couldn't find any method to move it to the x button, tried manually shifting the cursor there by using getWidth() , but same problem as closing the window via ExitCommand or the menu item, the test class terminates after it is closed, so I don't think this can be tested :X.

@Zhiyuan-Amos
Copy link
Contributor

Zhiyuan-Amos commented Feb 20, 2018

but same problem as closing the window via ExitCommand or the menu item, the test class terminates after it is closed

Take a look at the 2nd answer and here as well.

It seems like the main thing we are testing for is that whenever we click on the x button, System#exit(int) is called (if I'm reading correctly, the reason why HelpWindow closes when we click on x button is because System#exit(int) is called right?).

As such, I think we need to create a MainAppTest which tests that all forms of exiting the app will result in calling System#exit(int).

@yamidark
Copy link
Contributor Author

Take a look at the 2nd answer and here as well.

Probably should have searched for this System.exit() test :O.

Anyway, I tried this extending of the SecurityManager but the test now hangs instead of terminating after we try any methods to exit the app.
Seems like this is because we call Platform.exit() first.
Can't seem to find a way catch and stop this Platform.exit(), so for this test should we override MainApp.stop() in TestApp to not call Platform.exit() instead?

@Zhiyuan-Amos
Copy link
Contributor

Can't seem to find a way catch and stop this Platform.exit(), so for this test should we override MainApp.stop() in TestApp to not call Platform.exit() instead?

I don't think we can override TestApp for this test alone right? I.e. this update will affect all the other tests as well.

Can we try System Rules (also in the link I posted above)?

@yamidark
Copy link
Contributor Author

yamidark commented Feb 20, 2018

Can we try System Rules (also in the link I posted above)?

System Rules needs at least JUnit 4.9 while ours is 4.12(?) :X.
*Edit: whoops saw wrong, thought ours was 4.1.2, its 4.12 xD. Will look to see how to include this in.

@yamidark
Copy link
Contributor Author

Just tested the System Rules, since the ExpectedSystemExit also uses an extended SecurityManager, the same problem occurs and the test hangs.

@Zhiyuan-Amos
Copy link
Contributor

Hmm ok, document this down as part of the commit message then ^^

This may cause the app to not close properly since it will not raise a
ExitAppRequestEvent, in turn MainApp#stop() is not called and the app
may continue to run.

Commit message needs to be clearer

  1. MainApp#stop() calls System#exit() (or is it Platform#exit()?) which then closes all the remaining windows.
  2. App continues to run -> Causing existing windows to remain open.

@yamidark yamidark force-pushed the 826-HelpWindow-stays-open-after-exit branch from ce305ac to 61964c9 Compare February 20, 2018 14:17
@CanIHasReview-bot
Copy link

v3

@yamidark submitted v3 for review.

(📚 Archive) (📈 Interdiff between v2 and v3)

Checkout this PR version locally
git fetch https://github.com/se-edu/addressbook-level4.git refs/pr/832/3/head:BRANCHNAME

where BRANCHNAME is the name of the local branch you wish to fetch this PR to.

Copy link
Contributor

@Zhiyuan-Amos Zhiyuan-Amos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Showing the link to the API of SecurityManager without explaining in the commit message isn't helpful :P

  2. No need for line break for website links, otherwise the hyperlink is unclickable.

let's wait for Vivek to review first.

@Zhiyuan-Amos
Copy link
Contributor

Can't seem to find a way catch and stop this Platform.exit(), so for this test should we override MainApp.stop() in TestApp to not call Platform.exit() instead?

If you override the method in TestApp, then you aren't testing the actual class MainApp isn't it :P I.e. you have no guarantee whether MainApp is calling System#exit(int) or not.

Can we do unit test for MainWindow, particularly for the method #handleExit()? We just check that whenever you press x or press the Exit button, this ExitAppRequestEvent is raised.

Ideally, we should have an integration test between MainWindow & MainApp. However, that doesn't seem possible in this scenario.

@yamidark
Copy link
Contributor Author

Showing the link to the API of SecurityManager without explaining in the commit message isn't helpful :P

Hmm, so I should explain how we can use SecurityManager to catch this System.exit(int), and maybe instead of the API link which isn't really useful I can show the link to the stackoverflow post?

No need for line break for website links, otherwise the hyperlink is unclickable.

Whoops, didn't notice that. Will update in next iteration.

If you override the method in TestApp, then you aren't testing the actual class MainApp isn't it :P I.e. you have no guarantee whether MainApp is calling System#exit(int) or not.

Now that you mention this, yep, dunno what I was thinking xD.

Can we do unit test for MainWindow, particularly for the method #handleExit()? We just check that whenever you press x or press the Exit button, this ExitAppRequestEvent is raised.

Will check to see how we can add this test. Should this be done in this PR though?

@Zhiyuan-Amos
Copy link
Contributor

Hmm, so I should explain how we can use SecurityManager to catch this System.exit(int), and maybe instead of the API link which isn't really useful I can show the link to the stackoverflow post?

The link to the SO post is more helpful.

Can we do unit test for MainWindow, particularly for the method #handleExit()? We just check that whenever you press x or press the Exit button, this ExitAppRequestEvent is raised.

Will check to see how we can add this test. Should this be done in this PR though?

Yup it should be done in this PR since this PR updates MainWindow.fxml onCloseRequest="#handleExit", so you can write unit tests for this addition.

Copy link
Contributor

@vivekscl vivekscl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some nits with the commit message
para 2:
Thus, if MainApp#stop() is not called, the app may continue to
run even after the MainWindow is closed, causing any existing
HelpWindows...

para 3:
For the first line maybe this sounds better?
According to the life-cycle section in the documentation on JavaFX Application[1]...

para 4:
The sentence structure is too long and complex. Maybe this sounds better?
Let's add an event handler for the onCloseRequest event in the root of MainWindow.fxml. This event will call MainWindow#handleExit() when raised by an external request to close the app.

para 5:
As a result, we are unable to write regression tests for this bug fix as the test classes terminates prematurely...

@yamidark
Copy link
Contributor Author

You shouldn't setup a new stage but use mainWindow.getPrimaryStage() right?

The fireEvent(Event) method needs to be called in the FX user thread which is why I used the FxToolkit.

Perhaps we should leave a comment that WINDOW_CLOSE_REQUEST triggers the .fxml function.

Yea, will mention the MainWindow for the test does not have a X button too, and this WINDOW_CLOSE_REQUEST is used to simulate any external request to close the MainWindow as mentioned in earlier parts of the commit message.

@Zhiyuan-Amos
Copy link
Contributor

The fireEvent(Event) method needs to be called in the FX user thread which is why I used the FxToolkit.

You can run this on the FX Thread by calling guiRobot#interact(() -> ...)

@yamidark yamidark force-pushed the 826-HelpWindow-stays-open-after-exit branch from d190ee3 to c7f0cf8 Compare February 23, 2018 16:41
@CanIHasReview-bot
Copy link

v5

@yamidark submitted v5 for review.

(📚 Archive) (📈 Interdiff between v4 and v5)

Checkout this PR version locally
git fetch https://github.com/se-edu/addressbook-level4.git refs/pr/832/5/head:BRANCHNAME

where BRANCHNAME is the name of the local branch you wish to fetch this PR to.

}

/**
* Closes the {@code MainWindow} using it's menu bar.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

its

}

@Test
public void menuBar_exit_success() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are testing exit through menu bar, and the end result we are verifying for is ExitAppRequestEvent posted. So it should be:

exit_menuBarExitButton_ExitAppRequestEventPosted

}

/**
* Simulate an external request to close the {@code MainWindow}.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's unclear what "external request" means.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, should I give examples like in this commit message (using the 'X' button or closing from taskbar?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's better to leave it in the code so that future developers know what is this piece of code doing :P


private MainWindowHandleUnit(Stage stage) {
super(stage);
this.stage = stage;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a hackish way of doing things :P We can remove the need for this by storing stage as a variable in the test class alongside with mainWindow and mainWindowHandle.

public void setUp() throws Exception {
FxToolkit.setupStage(stage -> {
mainWindow =
new MainWindow(stage, new Config(), new UserPrefs(), new LogicManager(new ModelManager()));
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Zhiyuan-Amos Actually, should I extract this out as a method in the test class as prepareMainWindow(Stage), which should make the test cleaner and clearer?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, looks good!

@yamidark yamidark force-pushed the 826-HelpWindow-stays-open-after-exit branch 2 times, most recently from be7e926 to b552913 Compare February 24, 2018 13:57
@CanIHasReview-bot
Copy link

v6

@yamidark submitted v6 for review.

(📚 Archive) (📈 Interdiff between v5 and v6)

Checkout this PR version locally
git fetch https://github.com/se-edu/addressbook-level4.git refs/pr/832/6/head:BRANCHNAME

where BRANCHNAME is the name of the local branch you wish to fetch this PR to.

Copy link
Contributor

@Zhiyuan-Amos Zhiyuan-Amos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm ok after these changes are made. I didn't take a look at the commit message though. @vivekscl can take a look again? Thanks!

E.g. 1st para:

The MainWindow has no specified event handler when there are external
requests to close the MainWindow, such as the close button or through
the taskbar.

The MainWindow does not have an event handler to handle external requests (such as clicking on the close button or though the taskbar) to close the MainWindow.

}

@Test
public void exit_menuBarExitButton_exitAppRequestEventPosted() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we use the term close elsewhere (closeMainWindowExternally), let's rename exit to close.

/**
* {@code MainWindow} unit test class without any other components to test closing of the {@code MainWindow}.
*/
private class MainWindowHandleUnit extends StageHandle {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This name is kinda weird haha. Let's rename it to EmptyMainWindowHandle.

}

/**
* {@code MainWindow} unit test class without any other components to test closing of the {@code MainWindow}.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Provides a handle for {@code MainWindow}. The components in {@code MainWindow} are not initialized. <- This header comment is more descriptive as it mentions that this is a handle for MainWindow.

}

/**
* Closes the {@code MainWindow} using its menu bar.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's be more specific: Closes the {@code MainWindow} by clicking on the menu bar's exit button.


/**
* Simulate an external request to close the {@code MainWindow} (e.g pressing the 'X' button on the
* {@code MainWindow} or closing the app through the taskbar).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Closes the {@code MainWindow} through an external request (e.g pressing the 'X' button on the.... We don't need to know that it's simulating an external request or not. :P

public void setUp() throws Exception {
FxToolkit.setupStage(stage -> {
this.stage = stage;
mainWindow = prepareMainWindow(stage);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought you meant extracting everything in this inner method as a private method :P We generally don't need to extract 1 sentence statements.

FxToolkit.setupStage(stage -> {
    this.stage = stage;
    mainWindow = new MainWindow(stage, new Config(), new UserPrefs(), new LogicManager(new ModelManager()));
    mainWindowHandle = new EmptyMainWindowHandle(stage);
    // leave 1 line here to show that the above is initialization of variables, while below is setting up the ui.
    stage.setScene(mainWindow.getRoot().getScene());
    mainWindowHandle.focus();
});

@yamidark yamidark force-pushed the 826-HelpWindow-stays-open-after-exit branch 2 times, most recently from c08960e to 28f2c09 Compare February 26, 2018 05:16
@CanIHasReview-bot
Copy link

v7

@yamidark submitted v7 for review.

(📚 Archive) (📈 Interdiff between v6 and v7)

Checkout this PR version locally
git fetch https://github.com/se-edu/addressbook-level4.git refs/pr/832/7/head:BRANCHNAME

where BRANCHNAME is the name of the local branch you wish to fetch this PR to.

@Zhiyuan-Amos
Copy link
Contributor

@vivekscl can take a look? ^^

Copy link
Contributor

@vivekscl vivekscl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor nits in the commit message:
1st para:
The MainWindow does not have an event handler to handle external requests
(such as the close button or through the taskbar) to close the
MainWindow.

2nd para:
This may cause the app to not close properly since MainApp#stop() is not called as the ExitAppRequestEvent is not raised.
MainApp#stop() is the method used to call...

Last para:
Did you mean MainWindowHandleUnitTest?
Maybe this phrasing sounds better?
... does not contain a close button, thus to test if an ExitAppRequestEvent was raised we fire a WindowEvent#WINDOW_CLOSE_REQUEST event which will trigger the onCloseRequest event.

@yamidark yamidark force-pushed the 826-HelpWindow-stays-open-after-exit branch from 28f2c09 to b233003 Compare February 27, 2018 08:40
@CanIHasReview-bot
Copy link

v8

@yamidark submitted v8 for review.

(📚 Archive) (📈 Interdiff between v7 and v8)

Checkout this PR version locally
git fetch https://github.com/se-edu/addressbook-level4.git refs/pr/832/8/head:BRANCHNAME

where BRANCHNAME is the name of the local branch you wish to fetch this PR to.

Copy link
Contributor

@Zhiyuan-Amos Zhiyuan-Amos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

handle external
requests(such as the close button or through the taskbar)

Missing whitespace before the parentheses.

Let's add an event handler for the onCloseRequest event in the root of
MainWindow.fxml. This event will call MainWindow#handleExit() when
raised by an external request to close the app.

Can specify that this method raises ExitAppRequestEvent since you mentioned about ExitAppRequestEvent above.

Last paragraph missing period at the end of the sentence.

Let's wait for prof to review first :)

@Zhiyuan-Amos Zhiyuan-Amos requested a review from damithc February 27, 2018 09:24
Copy link
Contributor

@damithc damithc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Some nits only.

import seedu.address.ui.testutil.EventsCollectorRule;

/**
* Contains test for closing of the {@code MainWindow}.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment sounds like there is only one test?
Also, the class name doesn't indicate that the scope is limited to testing the 'close' feature only.


/**
* Provides a handle for {@code MainWindow}. The components in {@code MainWindow} are not initialized.
*/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Provides is redundant?

The MainWindow does not have an event handler to handle external
requests (such as the close button or through the taskbar) to close
the MainWindow.

This may cause the app to not close properly since MainApp#stop() is
not called as the ExitAppRequestEvent is not raised. MainApp#stop() is
the method used to call Platform#exit() and System#exit(int) which
closes our app and all remaining open windows. Thus, if MainApp#stop()
is not called, the app may continue to run even after the MainWindow is
closed, causing existing HelpWindows to remain open even when the user
expects the app to stop.

According to the life-cycle section in the documentation on JavaFX
Application[1], the app will only finish and call MainApp#stop() when
the app either calls Platform#exit() or when the last window has been
closed. Thus, should there be any HelpWindows still opened, the app
will continue running, causing those HelpWindows to remain open.

Let's add an event handler for the onCloseRequest event in the root of
MainWindow.fxml. This event will call MainWindow#handleExit(), which
raises an ExitAppRequestEvent, when there is an external request to
close the app.

EmptyMainWindowHandle does not contain a close button, thus to test if
an ExitAppRequestEvent was raised, we fire a
WindowEvent#WINDOW_CLOSE_REQUEST event which will trigger the
onCloseRequest event.

[1] JavaFx documentation for Application:
https://docs.oracle.com/javafx/2/api/javafx/application/Application.html
@yamidark yamidark force-pushed the 826-HelpWindow-stays-open-after-exit branch from b233003 to b883e8d Compare February 28, 2018 04:48
@CanIHasReview-bot
Copy link

v9

@yamidark submitted v9 for review.

(📚 Archive) (📈 Interdiff between v8 and v9)

Checkout this PR version locally
git fetch https://github.com/se-edu/addressbook-level4.git refs/pr/832/9/head:BRANCHNAME

where BRANCHNAME is the name of the local branch you wish to fetch this PR to.

@Zhiyuan-Amos
Copy link
Contributor

@yamidark update the merge commit message ya :)

@Zhiyuan-Amos Zhiyuan-Amos merged commit 088db25 into se-edu:master Mar 2, 2018
@yamidark yamidark deleted the 826-HelpWindow-stays-open-after-exit branch July 5, 2018 08:41
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HelpWindow: help window stays open even after exiting by clicking the close button
6 participants