Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Categories in plugins



Hi all,

I already posted this on macosx-dev, but got no replies. Maybe somebody here has an idea. I have a little problem with categories and the visibility of methods defined therein:

- I have a shared framework that defines a class "Entry".
- I have an application A that does some stuff and creates some instances of "Entry"
- I have a plugin P that gets loaded at runtime by A. P also defines a category of "EntryXML" of "Entry"


Now, in the plugin I have the following code. "entries" here is an NSArray of "Entry" objects that were instantiated in the application:

	NSLog(@"fine...");
	Entry *testEntry = [[Entry alloc] init];
	NSLog([testEntry dumpAsXML]);
	NSLog(@"still fine...");
	NSEnumerator *enumerator = [entries objectEnumerator];
	Entry *entry;
	while (entry = [enumerator nextObject])
		[xmlDump appendString: [entry dumpAsXML]];

The output of this is:
2005-06-28 18:15:53.194 MiniText[940] fine...
2005-06-28 18:15:53.194 MiniText[940] <entry date="28/06/2005, 18:15" title="New Entry" sort="2005-06-28-18-15"/>
2005-06-28 18:15:53.194 MiniText[940] still fine...
2005-06-28 18:15:53.194 MiniText[940] *** -[Entry dumpAsXML]: selector not recognized


So, the Entry objects that were instantiated in the application don't seem to know the "dumpAsXML" method, while the Entry object defined just there in the plugin happily accepts it. Does anybody have an idea what is going on here?

-------------------------------------------------
Knud Möller, MA
+353 - 91 - 512624
Digital Enterprise Research Institute
  National University of Ireland, Galway
Institiúid Taighde na Fiontraíochta Digití
  Ollscoil na hÉireann, Gaillimh
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.