Skip to main content

creation trigger in compiled JFX

2 replies [Last post]
tengimon
Offline
Joined: 2008-06-23
Points: 0

Is there a new syntax for creation trigger? Or is there anything that can work as a constructor? i'm just giving values to class attributes whenever i declare a new objects, but it gets rough when there are so many attributes. Im just looking for a way around it.

btw, also Is there a new syntax for delete trigger?

Thanks

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
michael_heinrichs
Offline
Joined: 2007-11-15
Points: 0

The init-construct can be used instead of a constructor. The usual way to create a new object and setting its attributes is by using an object-literal. And you can set the default values in the definition of an attribute. Don't know what you mean with "a way around it".

Do you mean creation- and delete-triggers in the context of sequences? The functionality of both can be implemented using only the on replace-trigger.

shagus
Offline
Joined: 2007-05-10
Points: 0

There is postinit block in JavaFX to provide constructor-related functionality.
For more information about postinit block take a look at James Weavers's JavaFX Blog.

http://learnjavafx.typepad.com/weblog/2007/12/compiled-java-1.html