advertisement

Article:
  Plug It In, Plug It In
Subject:   deployment candidate fix but didn't work
Date:   2003-05-29 09:19:01
From:   anonymous2
Response to: deployment candidate fix but didn't work

In some cases, build style will make some problems, but not this one.


The problem is caused by a small bug in the code:


we get the plugin by:


plugin = [NSBundle bundleWithPath: name];


and we go the name by enumerate the objetc returned by:


[[NSFileManager defaultManager] directoryContentsAtPath: path]


You will find that the name variable only contains the name of the bundle, but not the path. So the application has to find the bundle in the default directory. And apparently, the envionment setting of running within PB and as a standalone application is different, so it makes our application behave differently.


The solution is add a statement on the first of second while block:


name = [path stringByAppendingPathComponent: name];


You will find that it works fine now.


Good luck.