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

Node Tooltip Delay Timer fix #863

Conversation

kah-heng
Copy link
Contributor

Important fix

This is fixing a crash upon null pointer exception (Added null checks to fix this)

Changes

  1. Renamed timer
  2. Refactored delay duration into config file
  3. Made timer stop after one tick (this was accidentally left out in previous pull)

twoSecondsWaitTimer = new DispatcherTimer();
twoSecondsWaitTimer.Interval = TimeSpan.FromSeconds(2); // two seconds wait
delayTimer = new DispatcherTimer();
delayTimer.Interval = TimeSpan.FromSeconds(Configurations.NodeToolTipFadeInDelayInSeconds);
Copy link
Contributor

Choose a reason for hiding this comment

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

Ben's golden rules:

  1. Before creating a data member, check if it is already created (especially on recurring method like this).
  2. Before accessing a data member, check to see if it is null.

Luke's golden rule:

  1. If ReferencePointGridXYZ - Want Z array #2 in Ben's golden rule causes too many null checks, we might as well instantiate the data member as part of the owner's construction.

kahheng added 2 commits November 29, 2013 15:29
Benglin added a commit that referenced this pull request Nov 30, 2013
…coButterUI

This fixes a rather important and easy-to-reproduce crash when mouse moves away from out-ports, so I'm accepting this pull request in the interest of having it tested earlier.
@Benglin Benglin merged commit 93779b0 into DynamoDS:ChocoButterUI Nov 30, 2013
sharadkjaiswal pushed a commit to sharadkjaiswal/Dynamo that referenced this pull request Mar 31, 2014
…rFix_ChocoButterUI

This fixes a rather important and easy-to-reproduce crash when mouse moves away from out-ports, so I'm accepting this pull request in the interest of having it tested earlier.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants