[REVIEW] Make controller instantiation customizable
Tom Schindl
tom.schindl at bestsolution.at
Wed Dec 14 08:46:10 PST 2011
Am 14.12.11 17:08, schrieb Greg Brown:
>> Yeah but you require me to make up an classpath to make to look up
>> succeed which when you'd give me a way to intercept the lookup where I
>> simply return the files content (or URL) would not be needed!
>
> I'm afraid I still don't understand. You're not "making up" a classpath - you have defined it as "/my/package/test/". Are you suggesting that FXMLLoader should allow you to redefine the meaning of the classpath? If so, that seems *really* confusing.
>
>
Let's see if I understand the current logic how the include look up is
done with a source like "/my/package/test/HeaderView.fxml".
My current assumption is that you are consulting the current Classloader
to locate the file, correct?
The FXMLLoader is running in the JVM of the Tooling (in my case Eclipse
but I guess it is the same for Netbeans) to e.g. place the preview next
to your editor which naturally has no idea about the classpath found in
your project.
Say I have a project like this:
+ MyProject
+ lib
+ library.jar
+ my.package.test
+ HeaderView.fxml
+ src
+ my.application
+ MainView.fxml
To make FXMLLoader happy I now need to construct an URLClassLoader by
inspecting the projects classpath and redefine the
Thread-Context-Classloader which has the draw backs outlined in my other
post (e.g. locking).
If in contrast you'd provide me a delegate to do the look up for you it
makes it really easy for me to look up the file from inside my IDE and
return you the URL.
It would be much simpler I guess to discuss this whole thing once the
FXMLLoader code is found in the openfx repo.
Tom
--
B e s t S o l u t i o n . a t EDV Systemhaus GmbH
------------------------------------------------------------------------
tom schindl geschäftsführer/CEO
------------------------------------------------------------------------
eduard-bodem-gasse 5-7/1 A-6020 innsbruck fax ++43 512 935833
http://www.BestSolution.at phone ++43 512 935834
More information about the openjfx-dev
mailing list