Skip to content

Avoid manually creating signals for every field in java #75

Closed Answered by omix
mchistovib asked this question in Q&A
Discussion options

You must be logged in to vote

QtJambi extracts all properties, invokables, slots and signals of a class at runtime. A signal is only detected if there actually is a signal field in Java code. It cannot be auto-generated. However, it does not make sense having a property notifiier signal without a signal field. I think you might want to call emit in the getter, don't you?

public void setFoo(int foo){
    this.foo = foo;
    fooChanged.emit(foo);
}

public final Signal1<Integer> fooChanged = new Signal1<>();

Replies: 5 comments 9 replies

Comment options

You must be logged in to vote
2 replies
@mchistovib
Comment options

@omix
Comment options

Answer selected by omix
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@mchistovib
Comment options

@mchistovib
Comment options

@mchistovib
Comment options

Comment options

You must be logged in to vote
2 replies
@mchistovib
Comment options

@omix
Comment options

Comment options

You must be logged in to vote
2 replies
@mchistovib
Comment options

@omix
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants