Opened 12 years ago

Closed 11 years ago

Last modified 11 years ago

#5325 closed defect (fixed)

dojox.grid declares dojo function unknowingly

Reported by: dante Owned by: sorvell
Priority: high Milestone: 1.1
Component: DojoX Grid Version: 0.9
Keywords: Cc:
Blocked By: Blocking:

Description

in dojox/grid/_grid/lib.js the function dojo.isNumber is defined. this is technically not allowed, and is a simple fix as a call to dojo.isNumber only appears ~ line 50 or dojox/grid/_grid/view.js in the setStructure() method.

it is an issue because the doc tool picks up the fact you are given a dojo.isNumber method by calling dojo.require("dojox.grid._grid.lib") which is just weird.

Attachments (1)

isNumber.patch (1.1 KB) - added by dante 12 years ago.
cleaner patch going isNaN route

Download all attachments as: .zip

Change History (6)

comment:1 Changed 12 years ago by dante

actually, the comments in view.js say "similar logic is duplicated in layout", and it is in addCellDef() ... that particular method uses (!isNaN(foo))) vs's the problematic dojo.isNumber(foo) method used in view.js

comment:2 Changed 12 years ago by Adam Peller

Component: GeneralDojoX Grid

Changed 12 years ago by dante

Attachment: isNumber.patch added

cleaner patch going isNaN route

comment:3 Changed 12 years ago by dante

Owner: changed from dante to sorvell

attached a patch removing dojo.isNumber = function ... and duplicating method found in _grid/layout.js !isNaN(...) deferring to you for consideration or to make a decision about making isNumber a private function somewhere within dojox.grid if it's vital that 0 not return false ... either way, they should have the same behavior or even share code (the parent methods mentioned)

comment:4 Changed 11 years ago by sorvell

Resolution: fixed
Status: newclosed

Closing this bug. The change to use isNaN was made in [10734] and is reasonable.

comment:5 Changed 11 years ago by dante

actually was fixed in [11983] fwiw

Note: See TracTickets for help on using tickets.