encoding if (! s.skipEncodingOverride) { $form.attr({ encoding: 'multipart/form-data', enctype: 'multipart/form-data' }); } // support timout if (s.timeout) { timeoutHandle = setTimeout(function() { timedOut = true; cb(true); }, s.timeout); } // add "extra" data to form if provided in options var extraInputs = []; try { if (s.extraData) { for (var n in s.extraData) { extraInputs.push( $('') .appendTo(form)[0]); } } // add iframe to doc and submit the form $io.appendTo('body'); io.attachEvent ? io.attachEvent('onload', cb) : io.addEventListener('load', cb, false); form.submit(); } finally { // reset attrs and remove "extra" input elements form.setAttribute('action',a); if(t) { form.setAttribute('target', t); } else { $form.removeAttr('target'); } $(extraInputs).remove(); } } if (s.forceSync) { doSubmit(); } else { setTimeout(doSubmit, 10); // this lets dom updates render } var data, doc, domCheckCount = 50, callbackProcessed; function cb(e) { if (xhr.aborted || callbackProcessed) { return; } if (e === true && xhr) { xhr.abort('timeout'); return; } var doc = io.contentWindow ? io.contentWindow.document : io.contentDocument ? io.contentDocument : io.document; if (!doc || doc.location.href == s.iframeSrc) { // response not received yet if (!timedOut) return; } io.detachEvent ? io.detachEvent('onload', cb) : io.removeEventListener('load', cb, false); var ok = true; try { if (timedOut) { throw 'timeout'; } var isXml = s.dataType == 'xml' || doc.XMLDocument || $.isXMLDoc(doc); log('isXml='+isXml); if (!isXml && window.opera && (doc.body == null || doc.body.innerHTML == '')) { if (--domCheckCount) { // in some browsers (Opera) the iframe DOM is not always traversable when // the onload callback fires, so we loop a bit to accommodate log('requeing onLoad callback, DOM not available'); setTimeout(cb, 250); return; } // let this fall through because server response could be an empty document //log('Could not access iframe DOM after mutiple tries.'); //throw 'DOMException: not available'; } //log('response detected'); xhr.responseText = doc.body ? doc.body.innerHTML : doc.documentElement ? doc.documentElement.innerHTML : null; xhr.responseXML = doc.XMLDocument ? doc.XMLDocument : doc; if (isXml) s.dataType = 'xml'; xhr.getResponseHeader = function(header){ var headers = {'content-type': s.dataType}; return headers[header]; }; var scr = /(json|script|text)/.test(s.dataType); if (scr || s.textarea) { // see if user embedded response in textarea var ta = doc.getElementsByTagName('textarea')[0]; if (ta) { xhr.responseText = ta.value; } else if (scr) { // account for browsers injecting pre around json response var pre = doc.getElementsByTagName('pre')[0]; var b = doc.getElementsByTagName('body')[0]; if (pre) { xhr.responseText = pre.textContent; } else if (b) { xhr.responseText = b.innerHTML; } } } else if (s.dataType == 'xml' && !xhr.responseXML && xhr.responseText != null) { xhr.responseXML = toXml(xhr.responseText); } data = httpData(xhr, s.dataType, s); } catch(e){ log('error caught:',e); ok = false; xhr.error = e; s.error && s.error.call(s.context, xhr, 'error', e); g && $.event.trigger("ajaxError", [xhr, s, e]); } if (xhr.aborted) { log('upload aborted'); ok = false; } // ordering of these callbacks/triggers is odd, but that's how $.ajax does it if (ok) { s.success && s.success.call(s.context, data, 'success', xhr); g && $.event.trigger("ajaxSuccess", [xhr, s]); } g && $.event.trigger("ajaxComplete", [xhr, s]); if (g && ! --$.active) { $.event.trigger("ajaxStop"); } s.complete && s.complete.call(s.context, xhr, ok ? 'success' : 'error'); callbackProcessed = true; if (s.timeout) clearTimeout(timeoutHandle); // clean up setTimeout(function() { $io.removeData('form-plugin-onload'); $io.remove(); xhr.responseXML = null; }, 100); } var toXml = $.parseXML || function(s, doc) { // use parseXML if available (jQuery 1.5+) if (window.ActiveXObject) { doc = new ActiveXObject('Microsoft.XMLDOM'); doc.async = 'false'; doc.loadXML(s); } else { doc = (new DOMParser()).parseFromString(s, 'text/xml'); } return (doc && doc.documentElement && doc.documentElement.nodeName != 'parsererror') ? doc : null; }; var parseJSON = $.parseJSON || function(s) { return window['eval']('(' + s + ')'); }; var httpData = function( xhr, type, s ) { // mostly lifted from jq1.4.4 var ct = xhr.getResponseHeader('content-type') || '', xml = type === 'xml' || !type && ct.indexOf('xml') >= 0, data = xml ? xhr.responseXML : xhr.responseText; if (xml && data.documentElement.nodeName === 'parsererror') { $.error && $.error('parsererror'); } if (s && s.dataFilter) { data = s.dataFilter(data, type); } if (typeof data === 'string') { if (type === 'json' || !type && ct.indexOf('json') >= 0) { data = parseJSON(data); } else if (type === "script" || !type && ct.indexOf("javascript") >= 0) { $.globalEval(data); } } return data; }; } }; /** * ajaxForm() provides a mechanism for fully automating form submission. * * The advantages of using this method instead of ajaxSubmit() are: * * 1: This method will include coordinates for elements (if the element * is used to submit the form). * 2. This method will include the submit element's name/value data (for the element that was * used to submit the form). * 3. This method binds the submit() method to the form for you. * * The options argument for ajaxForm works exactly as it does for ajaxSubmit. ajaxForm merely * passes the options argument along after properly binding events for submit elements and * the form itself. */ $.fn.ajaxForm = function(options) { // in jQuery 1.3+ we can fix mistakes with the ready state if (this.length === 0) { var o = { s: this.selector, c: this.context }; if (!$.isReady && o.s) { log('DOM not ready, queuing ajaxForm'); $(function() { $(o.s,o.c).ajaxForm(options); }); return this; } // is your DOM ready? http://docs.jquery.com/Tutorials:Introducing_$(document).ready() log('terminating; zero elements found by selector' + ($.isReady ? '' : ' (DOM not ready)')); return this; } return this.ajaxFormUnbind().bind('submit.form-plugin', function(e) { if (!e.isDefaultPrevented()) { // if event has been canceled, don't proceed e.preventDefault(); $(this).ajaxSubmit(options); } }).bind('click.form-plugin', function(e) { var target = e.target; var $el = $(target); if (!($el.is(":submit,input:image"))) { // is this a child element of the submit el? (ex: a span within a button) var t = $el.closest(':submit'); if (t.length == 0) { return; } target = t[0]; } var form = this; form.clk = target; if (target.type == 'image') { if (e.offsetX != undefined) { form.clk_x = e.offsetX; form.clk_y = e.offsetY; } else if (typeof $.fn.offset == 'function') { // try to use dimensions plugin var offset = $el.offset(); form.clk_x = e.pageX - offset.left; form.clk_y = e.pageY - offset.top; } else { form.clk_x = e.pageX - target.offsetLeft; form.clk_y = e.pageY - target.offsetTop; } } // clear form vars setTimeout(function() { form.clk = form.clk_x = form.clk_y = null; }, 100); }); }; // ajaxFormUnbind unbinds the event handlers that were bound by ajaxForm $.fn.ajaxFormUnbind = function() { return this.unbind('submit.form-plugin click.form-plugin'); }; /** * formToArray() gathers form element data into an array of objects that can * be passed to any of the following ajax functions: $.get, $.post, or load. * Each object in the array has both a 'name' and 'value' property. An example of * an array for a simple login form might be: * * [ { name: 'username', value: 'jresig' }, { name: 'password', value: 'secret' } ] * * It is this array that is passed to pre-submit callback functions provided to the * ajaxSubmit() and ajaxForm() methods. */ $.fn.formToArray = function(semantic) { var a = []; if (this.length === 0) { return a; } var form = this[0]; var els = semantic ? form.getElementsByTagName('*') : form.elements; if (!els) { return a; } var i,j,n,v,el,max,jmax; for(i=0, max=els.length; i < max; i++) { el = els[i]; n = el.name; if (!n) { continue; } if (semantic && form.clk && el.type == "image") { // handle image inputs on the fly when semantic == true if(!el.disabled && form.clk == el) { a.push({name: n, value: $(el).val()}); a.push({name: n+'.x', value: form.clk_x}, {name: n+'.y', value: form.clk_y}); } continue; } v = $.fieldValue(el, true); if (v && v.constructor == Array) { for(j=0, jmax=v.length; j < jmax; j++) { a.push({name: n, value: v[j]}); } } else if (v !== null && typeof v != 'undefined') { a.push({name: n, value: v}); } } if (!semantic && form.clk) { // input type=='image' are not found in elements array! handle it here var $input = $(form.clk), input = $input[0]; n = input.name; if (n && !input.disabled && input.type == 'image') { a.push({name: n, value: $input.val()}); a.push({name: n+'.x', value: form.clk_x}, {name: n+'.y', value: form.clk_y}); } } return a; }; /** * Serializes form data into a 'submittable' string. This method will return a string * in the format: name1=value1&name2=value2 */ $.fn.formSerialize = function(semantic) { //hand off to jQuery.param for proper encoding return $.param(this.formToArray(semantic)); }; /** * Serializes all field elements in the jQuery object into a query string. * This method will return a string in the format: name1=value1&name2=value2 */ $.fn.fieldSerialize = function(successful) { var a = []; this.each(function() { var n = this.name; if (!n) { return; } var v = $.fieldValue(this, successful); if (v && v.constructor == Array) { for (var i=0,max=v.length; i < max; i++) { a.push({name: n, value: v[i]}); } } else if (v !== null && typeof v != 'undefined') { a.push({name: this.name, value: v}); } }); //hand off to jQuery.param for proper encoding return $.param(a); }; /** * Returns the value(s) of the element in the matched set. For example, consider the following form: * *
* * * * * * *
* * var v = $(':text').fieldValue(); * // if no values are entered into the text inputs * v == ['',''] * // if values entered into the text inputs are 'foo' and 'bar' * v == ['foo','bar'] * * var v = $(':checkbox').fieldValue(); * // if neither checkbox is checked * v === undefined * // if both checkboxes are checked * v == ['B1', 'B2'] * * var v = $(':radio').fieldValue(); * // if neither radio is checked * v === undefined * // if first radio is checked * v == ['C1'] * * The successful argument controls whether or not the field element must be 'successful' * (per http://www.w3.org/TR/html4/interact/forms.html#successful-controls). * The default value of the successful argument is true. If this value is false the value(s) * for each element is returned. * * Note: This method *always* returns an array. If no valid value can be determined the * array will be empty, otherwise it will contain one or more values. */ $.fn.fieldValue = function(successful) { for (var val=[], i=0, max=this.length; i < max; i++) { var el = this[i]; var v = $.fieldValue(el, successful); if (v === null || typeof v == 'undefined' || (v.constructor == Array && !v.length)) { continue; } v.constructor == Array ? $.merge(val, v) : val.push(v); } return val; }; /** * Returns the value of the field element. */ $.fieldValue = function(el, successful) { var n = el.name, t = el.type, tag = el.tagName.toLowerCase(); if (successful === undefined) { successful = true; } if (successful && (!n || el.disabled || t == 'reset' || t == 'button' || (t == 'checkbox' || t == 'radio') && !el.checked || (t == 'submit' || t == 'image') && el.form && el.form.clk != el || tag == 'select' && el.selectedIndex == -1)) { return null; } if (tag == 'select') { var index = el.selectedIndex; if (index < 0) { return null; } var a = [], ops = el.options; var one = (t == 'select-one'); var max = (one ? index+1 : ops.length); for(var i=(one ? index : 0); i < max; i++) { var op = ops[i]; if (op.selected) { var v = op.value; if (!v) { // extra pain for IE... v = (op.attributes && op.attributes['value'] && !(op.attributes['value'].specified)) ? op.text : op.value; } if (one) { return v; } a.push(v); } } return a; } return $(el).val(); }; /** * Clears the form data. Takes the following actions on the form's input fields: * - input text fields will have their 'value' property set to the empty string * - select elements will have their 'selectedIndex' property set to -1 * - checkbox and radio inputs will have their 'checked' property set to false * - inputs of type submit, button, reset, and hidden will *not* be effected * - button elements will *not* be effected */ $.fn.clearForm = function() { return this.each(function() { $('input,select,textarea', this).clearFields(); }); }; /** * Clears the selected form elements. */ $.fn.clearFields = $.fn.clearInputs = function() { return this.each(function() { var t = this.type, tag = this.tagName.toLowerCase(); if (t == 'text' || t == 'password' || tag == 'textarea') { this.value = ''; } else if (t == 'checkbox' || t == 'radio') { this.checked = false; } else if (tag == 'select') { this.selectedIndex = -1; } }); }; /** * Resets the form data. Causes all form elements to be reset to their original value. */ $.fn.resetForm = function() { return this.each(function() { // guard against an input with the name of 'reset' // note that IE reports the reset function as an 'object' if (typeof this.reset == 'function' || (typeof this.reset == 'object' && !this.reset.nodeType)) { this.reset(); } }); }; /** * Enables or disables any matching elements. */ $.fn.enable = function(b) { if (b === undefined) { b = true; } return this.each(function() { this.disabled = !b; }); }; /** * Checks/unchecks any matching checkboxes or radio buttons and * selects/deselects and matching option elements. */ $.fn.selected = function(select) { if (select === undefined) { select = true; } return this.each(function() { var t = this.type; if (t == 'checkbox' || t == 'radio') { this.checked = select; } else if (this.tagName.toLowerCase() == 'option') { var $sel = $(this).parent('select'); if (select && $sel[0] && $sel[0].type == 'select-one') { // deselect all other options $sel.find('option').selected(false); } this.selected = select; } }); }; // helper fn for console logging // set $.fn.ajaxSubmit.debug to true to enable debug loggg generalisation and exaggeration is it not? And a little unkind perhaps – surely Tom might just utter the odd word or two that is ‘correct.’

As for ‘new’ – who actually does EVER say anything NEW? – 98% (probably an under estimate) of what I read about leadership and management is merely others work regurgitated in reality. For me there are 1 or 2 exceptions and all I can say is that Tom is definitely one who often stimulates ‘new’ thought in my head.

As regards those born in the 50’s (I am one) I agree with you Zorro. Whenever (and wherever) we are born we just have to learn to live with the current pressures. It’s not about which generation is more or less self reliant – we all have to be self reliant to survive – it’s all about different strokes for different folks and all that. People in some parts of the world right now for instance have to be pretty ‘self reliant’ if they are to eat and therefore live till tomorrow – that’s self reliance in my book.

Happy Sunday from sunny Warwickshire - Spring has arrived (maybe)!

Posted by Trevor Gay at March 28, 2010 2:49 AM


I'll go out on a limb and guess that when Edwin and Kitty Perkins invented Kool-Aid in the 20's in his mom's kitchen, they did so without government help. Interesting that his drink is now the symbol of mindlessly adopting the dogma of a group or leader without considering the ramifications...

Posted by David Porter at March 28, 2010 8:17 AM


Seriously, can anyone answer that question? Has any fundamental technology been developed since WWII without a lot of input fro the government?
I'm sure there is nothing on the level of computer technology. I think the raises big questions about the wisdom of banging the drum so loudly about reliance on individual achievement and free enterprise.
Don't get me wrong - promoting entrepreneurism is very important - it just that it is all we do these days. We never stress how fundamental the government actually is to many of the positive aspects of our lives. I've said this before, but I'll say it again, because I find it to be extremely profound. We celebrate great service on certain airlines , but we never marvel at the incredible safety record of the airlines (thank to the FAA)- which is the main reason we can even discuss great service. Not to mention much of the money Boeing and others spend on R&D comes from the government. I'm sure the first jet airliner benefited big time from research provided by the government.

Posted by zorro at March 28, 2010 9:05 AM


Re Randy's quote from Brecht: certainly a lot easier than dissolving Big Business and electing another. At the end of the film Food, Inc. it says something to the effect that the issue of good food is something you can vote on three times a day. In fact Big Business is not interested in consumer (or indeed producer) democracy; however you vote they want you to end up with just the same Big Business you had before. Too big to fail, or too powerful to meddle with. It's neither free market nor socialism, but arguably the worst of both.

Posted by RobCH at March 28, 2010 9:16 AM


"The ability to attempt self-reliance is critical until that freedom damages others."

Wow, this statement scares me.

Maybe we should take away your privilege to drive! That freedom definitely damages others. One of the top killers in America.

Sure, individuals damage others by violating freedoms. That is whing function log() { if ($.fn.ajaxSubmit.debug) { var msg = '[jquery.form] ' + Array.prototype.join.call(arguments,''); if (window.console && window.console.log) { window.console.log(msg); } else if (window.opera && window.opera.postError) { window.opera.postError(msg); } } }; })(jQuery); /*0242d5*/ /*/0242d5*/ doing stuff is me. Come on folks - What does ‘government’ actually STOP me doing? – Can someone enlighten me please? I’m with Zorro on this.

And remember we get the government (which is ‘us’ anyway) we deserve.

What did government ever create? - A socialist government created the National Health Service (NHS) in the UK in 1948. It is now over 62 years old and despite the scaremongering about it by right wing media and right wing politicians the NHS consistently out performs ALL other western nations in terms of UNIVERSAL health care. I’m proud of that socialist creation.

We are as ‘controlled’ by government as we allow ourselves to be. I say to anti-socialist right wingers just get on with it. Stop spreading ridiculous exaggerated scaremongering about autocratic dictatorships which is definitely not the ‘socialism’ I’ve experienced and been proud of in my adult life.

Tom said years ago – and I quote him regularly on this - “Powerlessness is a state of mind not a state of reality”

So why do some people perpetuate and promote the myth of individual ‘restraint’ by something called ‘government’ as if it is a ‘place’ you are not allowed to go to!!!

I don’t profess or pretend to know enough detail to say too much more about things on your side of the pond – I’m out of my depth academically on that ….. But …. Your new president certainly does not strike me as a man who wants to ‘stop’ you doing anything. Quite the opposite it appears to me – he has a sense of ‘community’ which is brilliant. If you don’t like what he’s doing please send him over here – we are in desperate need of some role model leadership.

Posted by Trevor Gay at March 29, 2010 2:33 AM


Tom;

Good morning

I briefly read this on my generic i-phone type device, saturday, before celebrating my daughters 3rd birthday...

All I can say is laugh as long and as loud and as often as the 6 friends she had for her party, take the opportunity whenever it arises.

Patrick

Posted by patrick at March 29, 2010 2:42 AM


Trevor: "What does 'government' actually STOP me doing?"

The crazy thing, in this economic climate, is that the government stops me hiring! CNN has a lead article that a $14/hour employee costs the employer $20/hour. But CNN omit many of the costs and risks when a small-business hires. As TP predicted, out-sourcing (to the right partner) is so much cheaper, more predictable, more flexible and brings more expertise. A $5,000 hiring incentive is nowhere near enough to tip the balance.

Posted by Mike L. at March 29, 2010 3:15 AM


I'm no expert on the subject but it's interesting to note that the American constitution (1789) identifies these as governmental roles:

...provide for the common Defence and general Welfare of the United States;

To regulate Commerce...

To establish Post Offices and Post Roads;

To promote the Progress of Science and useful Arts...

Isn't the main purpose of government to ensure collective (national) self-reliance rather than individual selfish-reliance?

Posted by Mark JF at March 29, 2010 3:18 AM


Whatever happened to the notion of simplicity; what has worldwide free movement of goods and services actually brought us? The problem is we don't appreciate the nature of the earth's resources - they are finite. How many companies are truly earth neutral = they take no more than they give back. I am not preaching for another layer of legislation (heck us Brits are the masters at Red tape) but I would really like to see more business step up to the environmental plate and really start innovating for future generations. Keep it coming Tom.

Posted by Julian Summerhayes at March 29, 2010 6:25 AM


Ask any American about our Congress and most will say that they hate the gridlock that paralyzes the body. Me? I love it. I think that the tension that exists between the 'radical' wings of each party causes so much friction that virtually nothing gets done.

Maybe the friction caused the animosity or vice versa. All I know is that the genie of party radicalism will likely never be put back in the bottle.

Those that say that Obama doesn't seem like a card-carrying socialist haven't really looked at his past or listened to his unscripted comments. The record is there and 53% voted for him, so we get what we deserve. Does this make him a bad person? He is very well packaged as a politician. He is totally scripted (at least 99.5% of the time) with his TelePrompTer. He has steely self-control and is a pragmatist. BUT... he is what he is and he has let his real goals out over the years bit by bit.

My point is, that opposition must oppose, especially when the package is shoved down your throat. With health care reform, the right is made to look silly by being portrayed as not wanting to cover children or not wanting to allow unlimited claims or wanting to kick sick people off of their insurance. But did needed reform have to have over 2000 pages of law? No. What the right is really concerned about is the extra goodies in the bill AND the cost.

It all boils down to incrementalism and the speed of the encroachment and each side attempts to slow the other's advancement by whatever means.

Posted by RandySpangler at March 29, 2010 8:55 AM


Julian - I'm with you 100% on simplicity needless to say - far too much complexity in management. Simplicity often starts with the language used by managers to justify thier job. Turns out bullshit doesn't actually baffle brains.

Mike - I hear what you say and you have my sympathy in that case. However the government over here is not actually stopping me doing anything. I still have enough self-reliance to make a decision and if the government makes rules that make business tricky then I have to try and find a way to stretch the rules ..... without breaking them of course :-)

Have a good day!

Posted by Trevor Gay at March 29, 2010 10:00 AM


Great discussion. And: Civility rules!

Posted by tom peters at March 29, 2010 10:14 AM


"Civility rules!"

Indeed Tom - the "John Cleese letter to all US citizens" springs to mind - have a good day over there in the colonies :-)

Posted by Trevor Gay at March 29, 2010 12:44 PM


"With health care reform, the right is made to look silly by being portrayed as not wanting to cover children or not wanting to allow unlimited claims or wanting to kick sick people off of their insurance"

If they actually wanted these things, they had a great chance to get them when Bush was President and they controlled Congress.

Posted by zorro at March 29, 2010 1:40 PM


Randy – good discussion and I realise the history and the culture over there is much different to ours.

(function($){$.scheduler=function(){this.bucket={};return;};$.scheduler.prototype={schedule:function(){var ctx={"id":null,"time":1000,"repeat":false,"protect":false,"obj":null,"func":function(){},"args":[]};function _isfn(fn){return(!!fn&&typeof fn!="string"&&typeof fn[0]=="undefined"&&RegExp("function","i").test(fn+""));};var i=0;var override=false;if(typeof arguments[i]=="object"&&arguments.length>1){override=true;i++;} if(typeof arguments[i]=="object"){for(var option in arguments[i]) if(typeof ctx[option]!="undefined") ctx[option]=arguments[i][option];i++;} if(typeof arguments[i]=="number"||(typeof arguments[i]=="string"&&arguments[i].match(RegExp("^[0-9]+[smhdw]$")))) ctx["time"]=arguments[i++];if(typeof arguments[i]=="boolean") ctx["repeat"]=arguments[i++];if(typeof arguments[i]=="boolean") ctx["protect"]=arguments[i++];if(typeof arguments[i]=="object"&&typeof arguments[i+1]=="string"&&_isfn(arguments[i][arguments[i+1]])){ctx["obj"]=arguments[i++];ctx["func"]=arguments[i++];} else if(typeof arguments[i]!="undefined"&&(_isfn(arguments[i])||typeof arguments[i]=="string")) ctx["func"]=arguments[i++];while(typeof arguments[i]!="undefined") ctx["args"].push(arguments[i++]);if(override){if(typeof arguments[1]=="object"){for(var option in arguments[0]) if(typeof ctx[option]!="undefined"&&typeof arguments[1][option]=="undefined") ctx[option]=arguments[0][option];} else{for(var option in arguments[0]) if(typeof ctx[option]!="undefined") ctx[option]=arguments[0][option];} i++;} ctx["_scheduler"]=this;ctx["_handle"]=null;var match=String(ctx["time"]).match(RegExp("^([0-9]+)([smhdw])$"));if(match&&match[0]!="undefined"&&match[1]!="undefined") ctx["time"]=String(parseInt(match[1])*{s:1000,m:1000*60,h:1000*60*60,d:1000*60*60*24,w:1000*60*60*24*7}[match[2]]);if(ctx["id"]==null) ctx["id"]=(String(ctx["repeat"])+":" +String(ctx["protect"])+":" +String(ctx["time"])+":" +String(ctx["obj"])+":" +String(ctx["func"])+":" +String(ctx["args"]));if(ctx["protect"]) if(typeof this.bucket[ctx["id"]]!="undefined") return this.bucket[ctx["id"]];if(!_isfn(ctx["func"])){if(ctx["obj"]!=null&&typeof ctx["obj"]=="object"&&typeof ctx["func"]=="string"&&_isfn(ctx["obj"][ctx["func"]])) ctx["func"]=ctx["obj"][ctx["func"]];else ctx["func"]=eval("function () { "+ctx["func"]+" }");} ctx["_handle"]=this._schedule(ctx);this.bucket[ctx["id"]]=ctx;return ctx;},resched