Re: [JSMentors] Why this Global Object is not Found in the Firebug Console (Throws Error)

2011-07-04 Thread Lasse Reichstein
On Tue, Jul 5, 2011 at 2:57 AM, Poetro wrote: > 2011/7/5 David Marrs : > > Why do you have a 2nd arg in your lambda called undefined? > Because he might want to use the undefined value, and in case someone > in the global scope created a variable named undefined, then it can > cause trouble. > I

Re: [JSMentors] Why this Global Object is not Found in the Firebug Console (Throws Error)

2011-07-04 Thread Poetro
2011/7/5 David Marrs : > Why do you have a 2nd arg in your lambda called undefined? Because he might want to use the undefined value, and in case someone in the global scope created a variable named undefined, then it can cause trouble. > > Also, you will want to check for the existence of console.

Re: [JSMentors] Why this Global Object is not Found in the Firebug Console (Throws Error)

2011-07-04 Thread David Marrs
Why do you have a 2nd arg in your lambda called undefined? Also, you will want to check for the existence of console.log before you call it, otherwise you will get a runtime error if firebug is switched off. On 4 Jul 2011 20:30, Sam3k wrote: Why does the following scrip

[JSMentors] Re: Parameters vs. Objects as Parameters

2011-07-04 Thread RobG
On Jul 4, 7:34 pm, "David Marrs" wrote: [...] > P.S. Please let me know if my MUA is a bit rubbish for mailing lists.  I > noticed the formatting of my email in your quotes was a bit ugly. I'm using Google Groups, your replies are not well formatted at all: http://groups.google.com/group/jsme

[JSMentors] Re: Why this Global Object is not Found in the Firebug Console (Throws Error)

2011-07-04 Thread Sam3k
Doh, oh course it doesn't show in window as it is part of the Firebug scope (not window) as you mentioned Poetro. Thanks you two. On Jul 4, 4:04 pm, Sam3k wrote: > Oh wow, I was checking the window globals and this convenience > function is not seen there. Hehe, learned something new. > > Thanks

[JSMentors] Re: Why this Global Object is not Found in the Firebug Console (Throws Error)

2011-07-04 Thread Sam3k
Oh wow, I was checking the window globals and this convenience function is not seen there. Hehe, learned something new. Thanks so much Poetro. On Jul 4, 3:58 pm, Poetro wrote: > To be able to use it, you have to use the global context for it, > namely window.debug each and every time, or you wil

Re: [JSMentors] Why this Global Object is not Found in the Firebug Console (Throws Error)

2011-07-04 Thread Poetro
To be able to use it, you have to use the global context for it, namely window.debug each and every time, or you will be calling Firebug's debug function, as that is the current scope. -- Poetro -- To view archived discussions from the original JSMentors Mailman list: http://www.mail-archive.c

Re: [JSMentors] Re: Why this Global Object is not Found in the Firebug Console (Throws Error)

2011-07-04 Thread Poetro
debug is a convinence function in firebug so you may not be able to overwrite it, or get it to user your user defined function. http://getfirebug.com/wiki/index.php/Command_Line_API#debug.28fn.29 -- Poetro -- To view archived discussions from the original JSMentors Mailman list: http://www.mai

Re: [JSMentors] Re: Why this Global Object is not Found in the Firebug Console (Throws Error)

2011-07-04 Thread Michael Geary
Try adding these four lines immediately before the debug.log() call inside the wrapper function (the one that fails): console.log( _debug ); console.log( window.debug ); console.log( debug ); console.log( debug.toString() ); That may lead to this interesting idea... What if you change these lines

[JSMentors] Re: Why this Global Object is not Found in the Firebug Console (Throws Error)

2011-07-04 Thread Sam3k
Environment: FireFox 5 Firebug 1.7.3 On Jul 4, 3:30 pm, Sam3k wrote: > Why does the following script works within the application code but it > doesn't when I type it in the firebug console. It throws the following > error: > > TypeError: debug.log is not a function > > My goal with this scri

[JSMentors] Why this Global Object is not Found in the Firebug Console (Throws Error)

2011-07-04 Thread Sam3k
Why does the following script works within the application code but it doesn't when I type it in the firebug console. It throws the following error: TypeError: debug.log is not a function My goal with this script is to make an object from where I can log things to the console, store javascript sp

Re: [JSMentors] Re: Parameters vs. Objects as Parameters

2011-07-04 Thread Dean Landolt
On Fri, Jul 1, 2011 at 8:13 PM, Jason Mulligan wrote: > yes i am. extjs/jquery are fantastic examples of this paradigm gone > wrong. the syntax ends up on multiple lines as you try to figure out > what's what, and no IDE can accurately parse the docblock/expression/ > literal to say Param1 is ...

Re: [JSMentors] Re: Parameters vs. Objects as Parameters

2011-07-04 Thread Poetro
jsdoc-toolkit [http://code.google.com/p/jsdoc-toolkit/] already has an approach to mark up object parameters in the form of: /** * @param userInfo Information about the user. * @param userInfo.name The name of the user. * @param userInfo.email The email of the user. */ -- Poetro -- To

Re: [JSMentors] Re: Parameters vs. Objects as Parameters

2011-07-04 Thread David Marrs
On 4 Jul 2011 06:16, RobG wrote: Choosing to use objects with defined property names instead of formal  parameters isn't a language feature, it's a design decision. That IDEs don't support it likely means it is too difficult to do easily I think IDEs already use docblocks to get param info. It s