Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#16519 closed defect (fixed)

SpinWheelSlot accidentally creates global variables "i" and "j" / has an unused local variable "a" / uses an undefined property "nDays"

Reported by: Paul Christopher Owned by: Eric Durocher
Priority: undecided Milestone: 1.9
Component: DojoX Mobile Version: 1.8.0
Keywords: Cc:
Blocked By: Blocking:

Description

  • In "buildRendering", SpinWheelSlot creates two global variables i,j.
  • Function "adjustDestination" has an unused local variable "a".
  • Line 215: "nDays" is not defined. Should be "n"?

Attachments (2)

SpinWheelSlot.js.patch (979 bytes) - added by Paul Christopher 6 years ago.
patch16519.patch (2.2 KB) - added by Adrian Vasiliu 6 years ago.
Fixed unintended global variables, unused variable, and wrong implementation of disableValues() - Paul Christopher, CLA and Adrian Vasiliu, IBM, CCLA

Download all attachments as: .zip

Change History (5)

Changed 6 years ago by Paul Christopher

Attachment: SpinWheelSlot.js.patch added

Changed 6 years ago by Adrian Vasiliu

Attachment: patch16519.patch added

Fixed unintended global variables, unused variable, and wrong implementation of disableValues() - Paul Christopher, CLA and Adrian Vasiliu, IBM, CCLA

comment:1 Changed 6 years ago by Adrian Vasiliu

Good catches, thanks Paul. My attached patch16519.patch is strongly inspired from yours, however for disableValues() I also modified the code (and API doc) to make it generic and avoid that it throws an exception when the slot contains less than 28 items (in other words, when it is not used for showing the days of the month). That said, I guess the real purpose of the method is to be only called internally for calendar slots. Also included in my patch a DOH test case for disableValues().

Last edited 6 years ago by Adrian Vasiliu (previous) (diff)

comment:2 Changed 6 years ago by cjolif

Resolution: fixed
Status: newclosed

In [30294]:

Fixes #16519. Unintended global variables, unused variable, and wrong implementation of disableValues() - Thanks Paul Christopher (CLA) and Adrian Vasiliu (IBM, CCLA).

comment:3 Changed 6 years ago by bill

Milestone: tbd1.9
Note: See TracTickets for help on using tickets.