Thanks, very interesting article!
>http://blog.niftysnippets.org/2010/03/anonymouses-anonymous.html

On 26 дек, 00:59, "T.J. Crowder" <[email protected]> wrote:
> > why do not you like the anonymous function?
>
> Because I like to help my tools help 
> me:http://blog.niftysnippets.org/2010/03/anonymouses-anonymous.html
>
> -- T.J. :-)
>
> On Dec 25, 8:26 pm, buda <[email protected]> wrote:
>
>
>
>
>
>
>
> > why do not you like the anonymous function?
>
> > On 25 дек, 00:42, "T.J. Crowder" <[email protected]> wrote:
>
> > > Hi,
>
> > > I'm sorry to say that I really can't tell what you're asking. I mean,
> > > singletons in JavaScript are dead easy because objects are just
> > > objects:
>
> > >     var Singleton = {
> > >         foo: function() {
> > >             // ...
> > >         },
> > >         bar: function() {
> > >             // ...
> > >         }
> > >     };
>
> > > Or if (like me) you don't like anonymous functions:
>
> > >     var Singleton = (function(){
> > >         var pubs = {};
>
> > >         pubs.foo = Singleton_foo;
> > >         function Singleton_foo() {
> > >             // ...
> > >         }
>
> > >         pubs.bar = Singleton_bar;
> > >         function Singleton_bar() {
> > >             // ...
> > >         }
>
> > >         return pubs;
> > >     })();
>
> > > Usage:
>
> > >     Singleton.foo(...);
> > >     Singleton.bar(...);
>
> > > ...but somehow I don't think that's what you have in mind.
>
> > > FWIW (little, I'm thinking),
> > > --
> > > T.J. Crowder
> > > Independent Software Engineer
> > > tj / crowder software / com
> > > www / crowder software / com
>
> > > On Dec 24, 2:01 am, buda <[email protected]> wrote:
>
> > > > Usually we have some fields in a form like date-field.
> > > > I have a dilemma: in such languages as C# I would create singleton and
> > > > use one class per many date-fields to display calendar.
> > > > I dont know is it possible (how to create singleton class and how
> > > > create ordinary class with static methods and fields) and expediently
> > > > to make singleton calendar class or have on ordinary calendar object
> > > > per date-field?
>
> > > > Help me please

-- 
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.

Reply via email to