bug-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC/PATCH] EOModel


From: David Ayers
Subject: Re: [RFC/PATCH] EOModel
Date: Wed, 27 Nov 2002 08:51:01 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2a) Gecko/20020910

Richard Frith-Macdonald wrote:

On Tuesday, November 26, 2002, at 10:59 pm, David Ayers wrote:

Hello Everyone,

Here's a patch to support more programatic model manipulation:

I applied that, with a fix to a typo and a few very minor updates to the file.

Thanx!

PS: I orignially wanted to patch findPathForModelNamed: to use NSSearchPathForDirectoriesInDomains, but the current implemetation seems so unusual, that I would prefer to remove it. It seaches the main bundels resource directory for the model (which the global modal group would also); then it interprets the path as the location of a loadable bundle and if it is, searches its resource directory; then it searches for a loadable bundle named "Models" in ~/Library, /LocalLibrary and /NextLibrary, and if it finds it searches its resource directory. I think this method should be removed, but maybe someone can convince me otherwise.

I'm afraid I have no idea ... I never used the original EOF code, so I don't know what it did, but it seems reasonable to look in resources belonging to loaded bundles. Is that what it's trying to do?

Well actually, I don't believe this method ever existed in EOF, but please correct me if I'm wrong. In fact the method generally used to get all accessable models is [[EOModelGroup globalModelGroup] models]
http://developer.apple.com/techpubs/webobjects/WebObjects_4.5/System/Library/Frameworks/EOAccess.framework/ObjC_classic/Classes/EOModelGroup.html#//apple_ref/occ/clm/EOModelGroup/globalModelGroup
but this only return models in the main bundle and all used frameworks (and manually added models,).

I don't know of a method for retrieving the path of specific Model by name which searches all loaded bundles. But if this is what's needed, than it shouldn't be hard to implement. Yet in the previous version this method was used to "fix" the path to load models ignoring the actual path supplied. Maybe there was another intention behind it, or it's for some "historical" reasons. But I'll leave that for the experts to answer :-)

Cheers,
Dave






reply via email to

[Prev in Thread] Current Thread [Next in Thread]