Author: qmathe
Date: Wed Mar 12 17:24:24 2014
New Revision: 10548

URL: http://svn.gna.org/viewcvs/etoile?rev=10548&view=rev
Log:
Don't instantiate an app object in +mainRepository. This doesn't play well in 
case some code wants to instantiate the app object later (based on a custom 
subclass).

Modified:
    trunk/Etoile/Frameworks/CoreObject/Tests/TestCommon.m
    
trunk/Etoile/Frameworks/EtoileFoundation/Headers/ETModelDescriptionRepository.h
    
trunk/Etoile/Frameworks/EtoileFoundation/Source/ETModelDescriptionRepository.m
    trunk/Etoile/Frameworks/EtoileFoundation/TODO

Modified: trunk/Etoile/Frameworks/CoreObject/Tests/TestCommon.m
URL: 
http://svn.gna.org/viewcvs/etoile/trunk/Etoile/Frameworks/CoreObject/Tests/TestCommon.m?rev=10548&r1=10547&r2=10548&view=diff
==============================================================================
--- trunk/Etoile/Frameworks/CoreObject/Tests/TestCommon.m       (original)
+++ trunk/Etoile/Frameworks/CoreObject/Tests/TestCommon.m       Wed Mar 12 
17:24:24 2014
@@ -189,6 +189,11 @@
 + (void) willRunTestSuite
 {
        [SQLiteStoreTestCase deleteStore];
+
+       // NOTE: We are about to initialize every loaded class. Make sure
+       // NSApplication is created first or various other gui classes on 
GNUstep
+       // will throw exceptions.
+       [NSApplication sharedApplication];
 }
 
 + (void) didRunTestSuite

Modified: 
trunk/Etoile/Frameworks/EtoileFoundation/Headers/ETModelDescriptionRepository.h
URL: 
http://svn.gna.org/viewcvs/etoile/trunk/Etoile/Frameworks/EtoileFoundation/Headers/ETModelDescriptionRepository.h?rev=10548&r1=10547&r2=10548&view=diff
==============================================================================
--- 
trunk/Etoile/Frameworks/EtoileFoundation/Headers/ETModelDescriptionRepository.h 
    (original)
+++ 
trunk/Etoile/Frameworks/EtoileFoundation/Headers/ETModelDescriptionRepository.h 
    Wed Mar 12 17:24:24 2014
@@ -131,7 +131,10 @@
 class that provided the description. See -setEntityDescription:forClass:.
 
 After collecting the entity descriptions, -checkConstraints is called and must 
-return no warnings, otherwise a NSInternalInconsistencyException is raised. */
+return no warnings, otherwise a NSInternalInconsistencyException is raised.
+
+For an application, the UIApplication or NSApplication object must exist at 
the 
+time this method is called. */
 + (id) mainRepository;
 /** <init />
 Returns a new repository that just contains the core metamodel (Object, 
Number, 

Modified: 
trunk/Etoile/Frameworks/EtoileFoundation/Source/ETModelDescriptionRepository.m
URL: 
http://svn.gna.org/viewcvs/etoile/trunk/Etoile/Frameworks/EtoileFoundation/Source/ETModelDescriptionRepository.m?rev=10548&r1=10547&r2=10548&view=diff
==============================================================================
--- 
trunk/Etoile/Frameworks/EtoileFoundation/Source/ETModelDescriptionRepository.m  
    (original)
+++ 
trunk/Etoile/Frameworks/EtoileFoundation/Source/ETModelDescriptionRepository.m  
    Wed Mar 12 17:24:24 2014
@@ -98,17 +98,6 @@
        {
                NSMutableArray *warnings = [NSMutableArray array];
 
-#ifdef GNUSTEP
-               // HACK: We are about to initialize every loaded class. Make
-               // sure NSApplication is created first or various other gui 
classes
-               // on GNUstep will throw exceptions.
-               Class nsappClass = NSClassFromString(@"NSApplication");
-               if (nsappClass != Nil)
-               {
-                       [nsappClass performSelector: 
@selector(sharedApplication)];
-               }
-#endif
-
                mainRepo = [[self alloc] init];
                [mainRepo collectEntityDescriptionsFromClass: [NSObject class]
                                             excludedClasses: nil

Modified: trunk/Etoile/Frameworks/EtoileFoundation/TODO
URL: 
http://svn.gna.org/viewcvs/etoile/trunk/Etoile/Frameworks/EtoileFoundation/TODO?rev=10548&r1=10547&r2=10548&view=diff
==============================================================================
--- trunk/Etoile/Frameworks/EtoileFoundation/TODO       (original)
+++ trunk/Etoile/Frameworks/EtoileFoundation/TODO       Wed Mar 12 17:24:24 2014
@@ -16,17 +16,6 @@
 
 - Add NSFastEnumeration support to NSPointerArray on GNUstep (see 
ETEntityDescription)
 
-- Support additional UTIDefinitions.plist and UTIClassBindings.plist per 
application on iOS
-
-       - EtoileFoundation is a static library on iOS, so the EtoileFoundation 
resources (UTIDefinitions.plist and UTIClassBindings.plist) are copied into the 
application project, and in the .app bundle, these EtoileFoundation resources 
appear in root directory. Both EtoileFoundation bundle and the app bundle are 
one and the same on iOS.
-
-- Remove AppKit dependency
-
-- Don't call +[NSApplication sharedApplication] in 
+[ETModelDescriptionRepository mainRepository]
-
-       - this can break EtoileUI and applications that subclass NSApplication  
(if +mainRepository is called before the app object is created)
-       - +sharedApplication can just be called in +willRunTestSuite as 
EtoileUI test suite does it
-
 - Split Collection protocols and categories into multiple files
 
 - Add some useful HOM methods such as -flattenedCollection, 
-deepFlattenedCollection, -flatMappedCollection etc. and their block equivalent 
methods.


_______________________________________________
Etoile-cvs mailing list
Etoile-cvs@gna.org
https://mail.gna.org/listinfo/etoile-cvs

Reply via email to