Open Darkyenus opened 9 years ago
Current understanding:
setClasspath()
- setSourceFolders()
- Classpath of compiled user sources (.class, not .java)setResourceFolders()
- Resource folders, same as setInfoPlist()
- Info Plist of the app, no tricks hereSource folders and resource folders are watched for changes and trigger Xcode project regeneration.
Open questions:
Classpath
contain user classes as well? Or is it merged with Source Folders
and the Xcode project is generated from that?newIOSStoryboard-like
methods and if yes, why do they throw NPE?setClasspath/SourceFolders/...
cause problems?Classpath
should contain user classes, yes.
User libraries should go into Classpath
.
Can you please run against the latest 1.9.0 release of RoboVM and show me the NPE stack trace and I can try to investigate? Or let me know how to reproduce it (I never used sbt :-) ) and I can try to debug it.
Calling setClasspath/...
often should be fine. We don't do it very often in Eclipse/IDEA. Only when the project classpath changes. So I cannot say for sure. Shouldn't be a problem in theory.
Thanks! (Updated my previous comment)
With RoboVM 1.9.0 NPE still appears, relevant part of stack trace:
java.lang.NullPointerException
at com.robovm.ibintegrator.a.s.a(Unknown.java:22356)
at com.robovm.ibintegrator.a.v.a(Unknown.java:882)
at com.robovm.ibintegrator.n.a(Unknown.java:269)
at com.robovm.ibintegrator.a.s.a(Unknown.java:849)
at com.robovm.ibintegrator.IBIntegrator.newIOSFileFromTemplate(Unknown.java:267)
at com.robovm.ibintegrator.IBIntegrator.newIOSStoryboard(Unknown.java:237)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
(... a lot of plugin and then sbt frames)
And as before, the file appears and seems to work, although something might be missing, I don't know how it should look.
Note: This is about a new feature in version1.7 branch, not present in the published versions
With InterfaceBuilder integration, a few commands were added: createStoryboard, createView and createViewController. (Latter two were not feature-tested yet, but exhibit the same behavior as createStoryboard.) createStoryboard, when invoked, creates the storyboard (seemingly) correctly, but then throws an obfuscated NPE:
The question is: why does it happen? The usage is created to mimic the robovm-idea's usage as closely as possible. Should we even use these (newIOSStoryboard etc.) methods?
Another, related question is: com.robovm.ibintegrator.IBIntegrator has these methods:
Since they are not part of the public API, their correct usage is hard to guess. When they should be called, on which thread, with which arguments? I think I got them mostly right, but currently, setClasspath and setSourceFolders is called with the same files for argument. It works, but it is probably not 100% correct.
Any help with these questions would be appreciated.