Open GoogleCodeExporter opened 8 years ago
I confirm. The code in NSBundle+USAdditions.m essentially says the following:
- if the template directory is specified, assume it's correct (non recursive)
- if not specified, then find the file anywhere in the app support directories
(recursive)
That's why when you specify the templates dir, the app doesn't look recursively
in it.
Original comment by hasse...@gmail.com
on 1 Mar 2011 at 9:13
okey, that makes sense. Probably I should present a use case ;)
I've included wsdl2objc in my Xcode project/workspace and want to run in during
the build/test-phase.
The idea is to fetch the wsdl, generate the classes and finally run the
unit-tests.
Installing wsdl2objc to some dir, or installing the templates somewhere isn't
that appealing.
Any ideas on this?
Thanks for sharing wsdl2objc,
stephan
p.s.: just checked - (NSString *)pathForTemplateNamed:(NSString *)templateName
and it looks to me this doesn't work recursive, but just checks in all the
app-support directories.
Besides that, the app bundle seems to have all the templates in a flat
directory, too.
Original comment by stephan.diederich@gmail.com
on 1 Mar 2011 at 9:25
I'm not saying I agree with the way it's done, as I'm neither the original
developer of the wsdl2objc code, nor am I the developer of the templating
system that whose code we're talking about (it's a company called LightSPEED
Technologies, Inc, from the headers).
I stand corrected regarding pathForTemplateNamed:. As I said, it first checks
all the app-support dirs, but then if it doesn't find the template, it looks
NON-recursively in the app bundle to find the template (pathForResource:ofType:
doesn't recurse). So in all cases there is no recursion.
So if we were to want to recursively look in all cases, it'd be a real bitch.
What we could instead do is specifically allow recursion when a template dir is
specified, hoping the user doesn't set templateDirectory="/" or something
idiotic like that.
Original comment by hasse...@gmail.com
on 2 Mar 2011 at 8:13
Thanks for clarifying!
Do you have an idea if moving the templates from the subdirectories in
Templates(/*/) to Templates/ is a bad idea? Seems to work for me...
Original comment by stephan.diederich@gmail.com
on 2 Mar 2011 at 3:03
I don't think it matters.
Original comment by hasse...@gmail.com
on 2 Mar 2011 at 4:16
Original issue reported on code.google.com by
stephan.diederich@gmail.com
on 1 Mar 2011 at 5:15