Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Dynamic Programming in Boo
Message
De
07/07/2010 21:54:21
 
 
À
07/07/2010 16:45:03
Information générale
Forum:
Visual FoxPro
Catégorie:
Visual FoxPro et .NET
Divers
Thread ID:
01471462
Message ID:
01471782
Vues:
65
You've got me. <s> You can ask on the Boo Google Group: Rodrigo and a couple of other smart cookies seem to have the answers for most everything. One of the others is Oren Einei (sp?), who writes as Ayende: RhinoBus, RhinoQueues, and on and on -- he has an article in the current MSDN magazine (available online) on using Bus and Queues to build a smartclient application using nHibernate. Very cool stuff.

Hank

>Just thinking about this:
>I assume Boo would have the same problem as C# when using anonymous methods: viz. there is no way to 'unwire' the event if that should be neccessary?
>
>>That _is_ cool.
>>
>>The reason that the o,e are passed is that the def is of an unnamed function that is the eventhandler method. In C#, if you type in the line you did, the IDE (in VS2010) will complain that the function you named is not available. You then have to define that method.
>>
>>private void ButtonClick(object o, EventArgs e)
>>{
>>
>>}
>>
>>in order to compile, of course. So that still looks like a lot of extra typing to me. <s> In fact, it looks as though it is twice as much typing, if not more. If I can cut out half the typing I do (and I don't think it will be that much, probably more like 20-30%) over the next 15 years of my working career, I would like that. This is all individual, of course; I have a couple of friends who type code out at 90+ words per minute. For myself (I'm sure this is not universal), having fewer superfluous words means I can focus on the meat of what is being done. à chacun son goût, as they say.
>>
>>Hank
>>
>>>>At the most, Boo's compiler does more, as I indicated. For example, if I have a button b, then I can define an eventhandler and an eventhandler method like so:
>>>>
>>>>b.Click += def(o,e):
>>>> b.Text = "Clicked"
>>>
>>>Not sure what the (o,e) means, but in C# you simple do:
>>>
>>>b.Click += ButtonClick
>>>
>>>
>>>Seems less verbose to me
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform