Request for review 7147066: [macosx] FileDialog.getDirectory() returns incorrect directory
Dmitry Cherepanov
dmitry.cherepanov at oracle.com
Wed Feb 29 15:49:09 PST 2012
Mike Swingler wrote:
> On Feb 28, 2012, at 2:01 PM, Dmitry Cherepanov wrote:
>
>
>> Mike Swingler wrote:
>>
>> Here's new webrev -
>> http://cr.openjdk.java.net/~dcherepanov/7147066/webrev.1/
>>
>
> Looks great. I probably should have also mentioned that you can use NSArray iteration syntax too:
> for (id item in array) { }
>
We use the array index within the loop and the loop would look like:
for (id item in array){
i = [array indexOfObject:item];
(*env)->SetObjectArrayElement(env, returnValue, i, filename);
}
This way (with the indexOfObject:) might seem to be more costly rather
than incrementing a variable, isn't it?
Thanks,
Dmitry
More information about the macosx-port-dev
mailing list