Re: How to partially apply member functions?

2017-06-30 Thread ct via Digitalmars-d-learn
On Thursday, 29 June 2017 at 14:30:19 UTC, Andrea Fontana wrote: On Thursday, 29 June 2017 at 13:01:10 UTC, ct wrote: I was only able to do it this way: auto on_next_previous = &this.OnNextPreviousMatch; entry_.addOnNextMatch(&partial!(on_next_previous, true)); entry_.addOnPreviousM

Re: How to partially apply member functions?

2017-06-29 Thread ct via Digitalmars-d-learn
I was only able to do it this way: auto on_next_previous = &this.OnNextPreviousMatch; entry_.addOnNextMatch(&partial!(on_next_previous, true)); entry_.addOnPreviousMatch(&partial!(on_next_previous, false));

Re: How to partially apply member functions?

2017-06-29 Thread ct via Digitalmars-d-learn
On Thursday, 29 June 2017 at 12:31:58 UTC, ct wrote: I have something similar to the following: class Editor { void OnNextPreviousMatch(bool is_forward, SearchEntry entry) { } } I pressed send by mistake. Again, I have something similar to the following: class Editor { void OnNextPrevio

How to partially apply member functions?

2017-06-29 Thread ct via Digitalmars-d-learn
I have something similar to the following: class Editor { void OnNextPreviousMatch(bool is_forward, SearchEntry entry) { } }