
8 Oct
2009
8 Oct
'09
12:53 p.m.
Hi all, I'm using an object as a placeholder, and would like to call various methods to the object from within my actions. Something along the lines of: port = (s1= *digit) [ _placeholder->setPort( as<int>(s1) ) ]; I've found a way to do something equivalent using method pointers, but the resulting code is really opaque. I'm afraid nobody else will ever be able to figure out what I've done. I also know I can do this by creating separate function objects for each method that will be called. This is less opaque, but really verbose. I end up with hundreds of lines of boilerplate code. Is there a "right" way to achieve something similar? Regards, Ami.