On Sep 30, 2013, at 2:45 AM, Laurens Van Houtven firstname.lastname@example.org wrote:
What am I doing wrong? Is this a bug?
I think it's pretty clearly a bug. Calling the argument "proto" in the first place indicates the nature of the confusion.
There are parts of the flow here from bytes to method execution and back (like _wrapWithSerialization) which are nice for composition, but the fact that they're private sort of ruins their utility for extensibility.
Looking at the code you're trying to write in txampext though, the problem appears to be simply that you're writing functionality close enough to AMP's core that you should be making the changes to AMP directly, and fixing the issue by making changes to AMP itself rather than trying to work around it externally. The way I was going to recommend fixing it before I clicked on your link was by writing something like ExposingArgument and accessing the locator/receiver/sender via that new API rather than via the 'proto' argument at all :)