← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #667296]: Java FX app: using SikuliX features in handlers freezes UI

 

Question #667296 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/667296

    Status: Answered => Solved

Julian confirmed that the question is solved:
Thank you very much, everything working fine right now!
I changed my run() method to: 

 public void run() {

        //starts a the new Thread "Workroutine" every 20 seconds
        Timeline timeline_WorkroutineStarter = new Timeline(new KeyFrame(Duration.seconds(20), new EventHandler<ActionEvent>() {

            @Override
            public void handle(ActionEvent event) {
                workroutine();
            }
        }));
        timeline_WorkroutineStarter .setCycleCount(Timeline.INDEFINITE);
        timeline_WorkroutineStarter .play();

    }

And everything that used to be in run() was just moved to the
workroutine() method

My initialize() - function in the Controller does now look like this:


    //starts a the new Thread "Workroutine" every 20 seconds and  activates the actualizer method every 3 seconds
    public void initialize() {

        debug_log("Started the work!");

        Thread t = new Thread(new Workroutine(listView_log));
        t.start();
    }


As for now, everything seems to work like charm, thank you very much for your support!

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.