• 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
Categories in plugins
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Categories in plugins


  • Subject: Categories in plugins
  • From: Knud Möller <email@hidden>
  • Date: Thu, 30 Jun 2005 13:38:02 +0100

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:
This email sent to email@hidden


  • Prev by Date: Re: WebKit & MiniBrowser: Document Tail Wagging the Dog
  • Next by Date: how to use MountedRemovableMedia API ???
  • Previous by thread: How to build split pane outline or table view?
  • Next by thread: how to use MountedRemovableMedia API ???
  • Index(es):
    • Date
    • Thread