Apple Developer Connection
Member Login Log In | Not a Member? Contact ADC

< Previous PageNext Page > Hide TOC

Providing a Connection Dictionary in Code

The code in “Listing 10-1” provides a connection dictionary programmatically using the procedure discussed in “Storing in Code.”

Listing 9-1  Setting connection dictionary programmatically

EOModel model = EOModelGroup.defaultGroup().modelNamed("RealEstate");
NSLog.out.appendln("connection dictionary keys:" +      model.connectionDictionary().allKeys());
 
NSMutableDictionary overrides = new NSMutableDictionary();
overrides.takeValueForKey("brent", "username");
overrides.takeValueForKey("secret", "password");
EODatabaseContext.forceConnectionWithModel(model, overrides, new EOEditingContext());


< Previous PageNext Page > Hide TOC


Last updated: 2007-07-11




Did this document help you?
Yes: Tell us what works for you.

It’s good, but: Report typos, inaccuracies, and so forth.

It wasn’t helpful: Tell us what would have helped.
Get information on Apple products.
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Copyright © 2007 Apple Inc.
All rights reserved. | Terms of use | Privacy Notice