Closed Bug 514315 Opened 16 years ago Closed 16 years ago

undeclared variables on stats tab

Categories

(Other Applications Graveyard :: QA Companion, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: harth, Unassigned)

Details

Attachments

(1 file)

getting these in the error console: Warning: assignment to undeclared variable weekly Source File: chrome://qa/content/tabs/stats.js Line: 78 for a bunch of variables.
Forgive my js scoping knowledge but by declaring these variables global are they not defined before the call to them? See line 39 in stats.js
ahh, I see what you're trying to do. Just say 'qaStats.monthly' instead of 'monthly' ('this.monthly' also works, but in the QAC code we never use 'this' because of all of our callbacks, so we should stay consistent) and put var's before all i's in the for loop declarations.
This patch addresses those warning as well as introduces local variable declaration within the loops in setStars()
Attachment #398316 - Flags: review?(harthur)
Attachment #398316 - Attachment is patch: true
Attachment #398316 - Attachment mime type: application/octet-stream → text/plain
Attachment #398316 - Flags: review?(harthur) → review+
Comment on attachment 398316 [details] [diff] [review] Warning fixes for variables in stats yay!
Sending chrome/content/tabs/stats.js Transmitting file data . Committed revision 50791.
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Product: Other Applications → Other Applications Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: