2008/11/24 bricklemacho <[EMAIL PROTECTED]>: > <snip> >> config.macros.myMacro = { >> handler: function(place, macroName) {/* ... */}, >> School: createPrototypedFunction( >> function(){ >> /* This will become the constructor */ >> }, >> { >> method1: function(){/*..*/}, >> method2: function(){/*..*/}, >> } > > Thanks, I will have a play/investigate with the above suggestion just > so understand it better. A follow up question, is it "cleaner" or > "better" this way as opposed to using object references as in my > original example (or should this be take to a Javascrpt forum)? It depends on what you want to do, and what the requirements are.
Putting the prototype definition outside: +: It doesn't require an extra function to work -: It's not completely inline code Using my helper function: +: Completely inline code -: Requires an extra function to work, the code might look confusing for some people In the end it's a matter of taste and judgement. I propose that my function be added to TW. Unless there's already such a function. (I sadly haven't fiddled with tiddly for a while now so I don't keep up with news. I just lurk this list.) /Ove -----BEGIN 2ROT13 MESSAGE----- Low Bitrate Netlabel: <http://flb.gg8.se/> Blog: <http://gameboygenius.8bitcollective.com/> SKRIVA på Lysator. Ditt Ahrvid-fria alternativ: <http://lists.lysator.liu.se/mailman/listinfo/korkek?SKRIVA?> Sätt på ett par flipflops, vippa på rumpan och gör det här till en minnesvärd sommar! -----END 2ROT13 MESSAGE----- --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TiddlyWikiDev" group. To post to this group, send email to TiddlyWikiDev@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/TiddlyWikiDev?hl=en -~----------~----~----~----~------~----~------~--~---