Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Feature Requests
 More $MethodArgs$.

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
netics Posted - Feb 10 2009 : 8:48:35 PM

New macro $MethodArgs$ is so useful for implementing delegation.

But it has much potential that can make it better.

Its current limitation is that it is all or nothing. No order change, No value modification, etc..


How about this?

$MethodArg1$
$MethodArg2$
$MethodArg3$
$MethodArg4$
...
(or it can be 0-based index)


If there is no 4th argument, then $MethodArg4$ is just empty string.

Supporting this, we can do much more.


void Method(int a, float b, char c)
{
    float d = g_SomeHelper.Calculate($MethodArg2$ * 2.0f);
    pimpl->MethodImpl($MethodArg1$, $MethodArg3$, d);
}


It looks nice, isn't it?
2   L A T E S T    R E P L I E S    (Newest First)
netics Posted - Feb 10 2009 : 11:35:18 PM

...

...

hmmmmm...

You are right. It doesn't look nice than when the idea comes across my mind.

sean Posted - Feb 10 2009 : 9:16:30 PM
It does look nice - but are you going to create different snippets for each signature required of your delegate? It would seem to be more work than modifying the results that $MethodArgs$ gives you (managing one snippet vs one for every modification that you require).

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000