Re: creating classes on the fly ??
Re: creating classes on the fly ??
- Subject: Re: creating classes on the fly ??
- From: Daniel Child <email@hidden>
- Date: Wed, 26 Sep 2007 13:50:38 -0400
Sorry for basic questions, but I've never looked into using an
alternate language like Python. Would I be able to make C-language
Carbon calls as well, all from within the same project?
On Sep 26, 2007, at 1:17 PM, Nir Soffer wrote:
On Sep 26, 2007, at 18:34, Daniel Child wrote:
Wow, interesting suggestion. I have never used Python, but I will
look into. I have to say that I find working with strings in Obj-C
very tedious. Even my prototype Lexicon using NSDictionary doesn't
seem to work, as I fill it with one set of values, and when I
search, it returns something different than what I was searching
for. If Python could make things easier, that would be great.
Can you show example code that does not seem to work?
Python will make your code much shorter. For example, instead of
NSMutableDictionary *d = [NSMutableDictionary
dictionaryWithObjectsAndKeys:
[NSNumber numberWithUnsignedInt:1], @"key", nil];
NSNumber *n = [d objectForKey:@"key"];
if (n) {
// do something with n
}
You can write:
d = {'key': 1}
if 'key' in d:
# do something with d['key']
When you say "OP" you mean "Object-Predicate"? I don't understand
your meaning when you say Core Data would be a bad match for
storing lexical data....
He meant Original Poster :-)
Why do you need to create classes on the fly?
Best Regards,
Nir Soffer
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden