I believe the order in this case is undefined and shouldn't be relied on. The compiler doesn't convert it to C before compiling it, but the effect on the meaning is the same. So the safe thing is to force the order you want:
obj1 = [coder decodeObject]; obj2 = "" return self initwithobject:obj1 and object:obj2]; -mike On 10/25/07, Adam R. Maxwell <[EMAIL PROTECTED]> wrote: > > 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 > -- Michael McCracken UCSD CSE PhD Candidate research: http://www.cse.ucsd.edu/~mmccrack/ misc: http://michael-mccracken.net/wp/ ------------------------------------------------------------------------- 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