Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Feature Requests
 More $MethodArgs$.
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

netics
Senior Member

30 Posts

Posted - Feb 10 2009 :  8:48:35 PM  Show Profile  Reply with Quote

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?

sean
Whole Tomato Software

USA
2817 Posts

Posted - Feb 10 2009 :  9:16:30 PM  Show Profile  Reply with Quote
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).
Go to Top of Page

netics
Senior Member

30 Posts

Posted - Feb 10 2009 :  11:35:18 PM  Show Profile  Reply with Quote

...

...

hmmmmm...

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

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000