Bug 5225 - timeout setting in ScreenSavers/settings.lua causing fh:read() to fail
: timeout setting in ScreenSavers/settings.lua causing fh:read() to fail
Status: RESOLVED FIXED
Product: SB Controller
Classification: Unclassified
Component: Screensavers
: unspecified
: Macintosh Other
: P2 normal (vote)
: ---
Assigned To: Ben Klaas
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-08-06 12:28 UTC by Ben Klaas
Modified: 2007-08-06 15:03 UTC (History)
0 users

See Also:
Category: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ben Klaas 2007-08-06 12:28:30 UTC
in ScreenSavers/settings.lua, the settings["timeout"] = 60000 line (i.e., the only non-string in this table) will generate a malformed number error when loading

142111:166 WARN (AppletManager.lua:510) - Error reading ScreenSavers settings: (load):1: malformed number near '30000settings'

EXCEPT, if the timeout setting is pasted down to the last line in the file, then it causes no issue. I thought perhaps this was a newline issue, but even if I put in a newline char when the timeout setting is at the end, no error...

settings = {}
settings["whenPlaying"] = "None"
settings["whenStopped"] = "None"
settings["whenDocked"] = "None"
settings["timeout"] = 60000

this feels like it might be a Lua bug...
Comment 1 Ben Klaas 2007-08-06 15:03:14 UTC
fixed in r216 by adding semicolon to end of all lines saved to settings.lua files