advertisement

Article:
  Plug It In, Plug It In
Subject:   plugin vs. plug-in in discoverPlug-ins
Date:   2002-10-16 12:44:22
From:   halliday
- (void)discoverPlug-ins
{
...
while ( path = [pathEnum nextObject] ) {
...
while ( name = [e nextObject] )
if ( [[name pathExtension] isEqualToString:@"plugin"] ) {
/**/NSBundle *plugin = [NSBundle bundleWithPath: name];

/**/if ( filterClass = [plug-in principalClass] )
...


As you can see above, you declared the NSBundle as "plugin" but you used it as "plug-in". Unfortunately, hyphens are significant in all C languages. :-)


In fact, doesn't C disallow hyphens in identifiers, so it would try and take the difference between "plug" and "in"?


This will cause a compiler error, or two. :-)


1 to 2 of 2
  1. Michael Beam photo plugin vs. plug-in in discoverPlug-ins
    2002-10-25 07:18:04  Michael Beam | O'Reilly Author [View]

  2. Apple shouldn't have used a popup with "plug-in" on it
    2002-10-19 19:12:32  psheldon [View]

1 to 2 of 2