Egg timer tutorial part 3 doesn't work

Been trying for 2 days now to get part 3 of the Egg Timer Tutorial to work.
simply put it does not.
One error after another.
info.Plist error, but figured that out and it was because the file was moved into the Support files folder, so you have to update that in the build time area.
Now getting this error:
In View Controller.swift on line 79:
TimeRemaining.stringValue = textToDisplay(for: timeRemaining)
Thread 1: Fatal error: Unexpectedly found nil while unwrapping an Optional value…

Man, this thing is sensitive with variable names.
For the Label: timeLeftField, I named it something different: TimeRemaining (with a capital T),
yet that seemed to cause the build time to get caught in a loop of some kind with the null value (i.e. TimeRemaining and timeRemaining was basically pointing to itself).

Either way I got it fixed:
Changed the first 6:00 variable back to: timeLeftField.
and updated the line in the Function back to:
timeLeftField.stringValue = textToDisplay(for: timeRemaining)

Hi @litning1!, glad you were able to fix the issue you were having. Great job tackling the issue and hopefully you were able to successfully complete the tutorial. Happy coding!

Gina

This topic was automatically closed after 166 days. New replies are no longer allowed.