On Thursday, October 25, 2007, at 10:58AM, "Christiaan Hofman" <[EMAIL 
PROTECTED]> wrote:
>A question for Mike, hope he sees this. It's related to the execution  
>order discussed recently. If in a method arguments are message calls,  
>is the order in which these arguments are executed actually  
>determined? So if I have something like:
>
>[anObject arg1:[obj1 acceessor1]  arg2:[obj2 acceessor2]];
>
>is the order in which -accessor1 and -accessor2 are called determined?
>
>In context, this is relevant when passing arguments to an initializer  
>in -initWithCoder:, where the arguments are non-keyed coding calls.  
>tyhe order in which the decodeObject: calls are executed is relevant.
>
>- (id)initWithCoder:(NSCoder *)coder {
>       return [self initWithObject:[coder decodeObject] andObject:[coder  
>decodeObject]];
>}

If you converted this to call the IMP directly in C, I think you'd end up with

initWithObjectIMP(self, _cmd, coderDecodeObjectIMP(coder, _cmd), 
coderDecodeObjectIMP(coder, _cmd));

(pseudo-code...I have to look this up every time I use it).  So if arg 2 of 
initWithObjectIMP() depends on arg1, I think you'd have to explicitly call it 
first.  Dr. McCracken can certainly give a more reliable answer than my guess, 
though :).

-- 
Adam

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Bibdesk-develop mailing list
Bibdesk-develop@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bibdesk-develop

Reply via email to