Hallo, Hans-Christoph Steiner hat gesagt: // Hans-Christoph Steiner wrote:
[once] controls flow. It should take a float argument like [spigot] and [gate] so you can choose the default state. No argument implies an argument of 0. Therefore it makes sense that [once] would be default closed.
But then it wouldn't be [once] anymore, as I already remarked.
If you want it to be default open, you can easily do [once 1].
Changing the behaviour of [once] would force anyone who was using [once] to change their patches.
I guess we all agree that adding an argument to [once] can be considered, however IOhannes and I both don't want this if it changes the default behaviour.
As a compromise why not let [once] stay the way it is and as it's used, but instead introduce a new object with a new name. I thought a bit about this, and *if* we want an argument to [once], then this argument should be used for a little bit more than just selecting open or close. The most natural use for an argument I could come up with was to select, after how many incoming messages the object should close. Of course then the name [once] wouldn't be useful anymore as we would also have a reaction to messages coming in "more than once".
So my idea for this object is like this:
[the_object_previously_known_as_once] would close after 0 messages, that is, default is closed just like you wished.
[the_object_previously_known_as_once 1] would be like the old [once]
[the_object_previously_known_as_once 10] would close after 10 in-messages, that is after it has counted down like: 9, 8, 7, 6, 5, 4, 3, 2, 1, liftoff!
That's also the name I finally chose for the new [the_object_previously_known_as_once]:
[countdown]
It's attached.
Ciao