• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Storing bundle loaded main class instances in NSArray
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Storing bundle loaded main class instances in NSArray


  • Subject: Storing bundle loaded main class instances in NSArray
  • From: Daniel Luis dos Santos <email@hidden>
  • Date: Wed, 8 Apr 2009 01:23:55 +0100

Hello,

I have some code that loads a bundle like :

	[NSBundle bundleForPath: path]

Then I get its main class. Then I cycle through some parameters that initialize that loaded main class and stores each new instance in a NSMutableArray.

Problem is that when I do the assignment to the array that causes the code later to behave unstable and failing with a message like :

2009-04-08 01:03:48.357 TestRunner[9643:813] *** -[NSFileManager fileExistsAtPath:]: unrecognized selector sent to instance 0x1126f0

The only thing I can think of, to see something like this is that I am probably overwriting the NSFileManager's class internal tables and therefore the message. When I comment out the assignment it all goes well.

The class that I instantiate from the bundle is handled through a protocol. The implementation is derived from an NSObject. I have considered using an NSPointerArray instead.

Help!


_______________________________________________

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


  • Follow-Ups:
    • Re: Storing bundle loaded main class instances in NSArray
      • From: Graham Cox <email@hidden>
  • Prev by Date: order of NSToolbarItems in toolbar
  • Next by Date: Re: order of NSToolbarItems in toolbar
  • Previous by thread: Re: order of NSToolbarItems in toolbar
  • Next by thread: Re: Storing bundle loaded main class instances in NSArray
  • Index(es):
    • Date
    • Thread