Threading and Node.lookup
phdoerfler at gmail.com
Wed Mar 20 05:51:15 PDT 2013
haha, thanks for the links!
I am actually considering going an entirely different route, now: Writing a SBT plugin that (like Android, playframework, ...) auto-generates variables to glue code and FXML together. So I can just say e.g. FX.myButton, which has fx:id="myButton". This should be fairly easy given that FXML is - well - XML and that SBT has special support for code generation.
This is of course similiar to controllers for FXML, but is checked at compile time rather then runtime, which itself is something neither node.lookup nor an own, custom API nor JXPath or the controller class can provide.
Am 20.03.2013 um 13:04 schrieb Tom Schindl <tom.schindl at bestsolution.at>:
> On 20.03.13 12:59, Philipp Dörfler wrote:
>> Oh, turns out I had no idea that CSS selectors can be that complex! Yes, I certainly don't want to replicate this. Might be a good exercise, though.
> had no idea myself before I started working on the CSS-Editor ;-)
> * http://www.w3.org/TR/CSS2/selector.html
> * http://www.w3.org/TR/selectors/
> Not all of those selectors work in JavaFX but i gives you an expression how complex those can get.
> So if you create an API you better not allow CSS-Selectors but:
> * findById(String)
> * findByClassNames(String ...)
> BTW if you need an intermediate complex solution there is JXPath allowing you to traverse Java-Object graphs using XPath ;-)
More information about the openjfx-dev