> The problem, I believe, is that I can only pass one string to replace() > for all method calls, whether they're nested or not.
You can give different code to replace() for a different MethodCall object. Since edit() in ExprEditor is a sort of callback method, in the case of nested method calls, edit() is invoked twice; it first receives a MethodCall object representing the inner call toBytes(), then it receives a different MethodCall object for write(). > In the example > bytestream.write(myfile.toBytes()); > I don't want to assign a value to $_ for the call to toBytes(). > The return value must be pushed onto the stack and remain > there to be passed as a parameter to the enclosing method write(). The value assined to $_ during the first call to edit() for toBytes() is pushed onto the stack. It is referred to by $1 during the second call to edit() for write(). Maybe I should revise the tutorial to clarify this issue... View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3837909#3837909 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3837909 ------------------------------------------------------- This SF.Net email is sponsored by: GNOME Foundation Hackers Unite! GUADEC: The world's #1 Open Source Desktop Event. GNOME Users and Developers European Conference, 28-30th June in Norway http://2004/guadec.org _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
