Closed
Bug 345119
Opened 18 years ago
Closed 18 years ago
Set up and use architecture for helper functions in components
Categories
(Calendar :: Internal Components, defect)
Calendar
Internal Components
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: jminta, Assigned: jminta)
References
Details
Attachments
(1 file)
68.64 KB,
patch
|
jminta
:
first-review+
|
Details | Diff | Splinter Review |
dmose says he wants to be able to share helper funciton across components. This probably needs to use mozIJSSubScriptLoader to load a file with those helper functions.
Updated•18 years ago
|
Summary: Set up and use architeture for helper functions in components → Set up and use architecture for helper functions in components
Assignee | ||
Comment 1•18 years ago
|
||
Patch implements a couple of common component utils and begins using them in our providers. There's a ton of extra Ci/Cc cleanup, and probably some more functions that can be shared, but this patch was getting pretty big. The utils also include some debugging functions, in the style of other toolkit apps. (Yes, they're infecting me.) Eventually I'd like to see this replace calendarUtils, and we can load that into the global chrome:// scope too, but one step at a time. Note that this will cause an additional notification bubble about weird component loading, but that's another bug. Note that I also didn't touch WCAP, because that code is all over the place. UUID helper function will follow in that bug.
Assignee | ||
Comment 2•18 years ago
|
||
Comment on attachment 229984 [details] [diff] [review] first cut at common utils: providers Index: calendar/base/src/componentUtils.js =================================================================== RCS file: calendar/base/src/componentUtils.js calUtils.js would be a better name, if we intend for this to be used outside of components too. + * + * ***** END LICENSE BLOCK ***** */ + +const Cc = Components.classes; Add a comment describing what this file is used for and what we think it might be useful for in the future. + if (shouldLog) { + ASSERT(aArg, "Bad log argument.", false); + var string; How about if(!shouldLog) return;? Fix the places you replaced with LOG to not end up with 2x \n.
Attachment #229984 -
Flags: first-review?(dmose) → first-review+
Assignee | ||
Comment 3•18 years ago
|
||
patch checked in.
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Comment 4•18 years ago
|
||
Reviewing your own patches now? That's gonna speed up the process! :)
You need to log in
before you can comment on or make changes to this bug.
Description
•