pattr feature idea: initial value attribute

May 15, 2008 at 4:11am

pattr feature idea: initial value attribute

pattr’s @autorestore feature is nice in some situations, but often times I need a specific initial value when the patch opens. The pattr value changes when I’m working on the patch and I don’t want some arbitrary value to autorestore.

So I use:
[loadmess initial_value] -> [pattr @name myvar @autorestore 0]

I seem to have initialization problems that occur in very large patches, so I sometimes need to use:
[loadmess initial_value] -> [deferlow] -> [pattr @name myvar @autorestore 0]

When there are a lot of pattrs this gets tiresome. I wish I could do this:

[pattr @name myvar @value initial_value]

#37789
Jun 9, 2008 at 2:21pm

I like this idea. So much, in fact, that the @initial attribute has been added to the next version of pattr. There will also be an ‘init’ message, which you can use to reset the pattr to the initial value at any time.

@initial will override any value saved with the patch (in fact, if @initial is set, the value isn’t saved with the patch).

Enjoy it when you get it!
Jeremy

#130756
Jun 10, 2008 at 2:54am

Quote: Jeremy Bernstein wrote on Mon, 09 June 2008 07:21
—————————————————-
> I like this idea. So much, in fact, that the @initial attribute has been added to the next version of pattr. There will also be an ‘init’ message, which you can use to reset the pattr to the initial value at any time.
>
> @initial will override any value saved with the patch (in fact, if @initial is set, the value isn’t saved with the patch).
>
> Enjoy it when you get it!
> Jeremy
>
>
—————————————————-

Sounds great. I will definitely enjoy and get a lot of use out of this feature.

Thanks!

#130757

You must be logged in to reply to this topic.