get dirty

Feb 13, 2006 at 11:26pm

get dirty

I want to get dirty with max but he won’t let me. [thispatcher] only sets
the flag… I think it should be possible using javascript, because the
manual says:

“dirty (Boolean, get/set)”

“this.patcher.dirty” only gives me an address or something. What am I
missing? …and is there also a way without using js?

T_

#24411
Feb 14, 2006 at 4:39pm

thispatcher.dirty = true //(boolean = true false), or something along
those lines

if(thispatcher.dirty)
{
// do something that you want to do here
}

else
{
// not dirty!
}

my JS is rusty and im tired, so my pseudocode might be wrong, but
that should be it.

v a d e //

http://www.vade.info
abstrakt.vade.info

I LIVE! I LIVE! I LIVE! I LIVE! I LIVE! I LIVE! I LIVE! I LIVE! I
LIVE! I LIVE! I LIVE! I LIVE!

You will not be saved by the Holy Ghost. You will not be saved by the
God Plutonium.

In fact, YOU WILL NOT BE SAVED!

#70533
Feb 14, 2006 at 4:55pm

So you like getting dirty, (sorry was to easy)

Couldn’t you use some scripting to add something to the patch.
If my memory serves me well there is some scripting to dynamically
make a patch. This would make it dirty, when you just make some hidden
toggle somewhere.

Grtz

#70534
Feb 14, 2006 at 8:24pm

That’s exactly what I would expect too, but it doesn’t work like that. I
tried the following:

function bang(){

if(this.patcher.dirty)
post(“dirty”);
else
post(“not dirty”)
}

function dirty(v)
{
this.patcher.dirty = v;
}
bang() returns only the value I set with dirty(), but doesn’t reflect the
actual state of the patcher. If it’s dirty and I use clean->thispatcher to
clean it. bang() still returns dirty.

setting the dirty flag using dirty() in javascript is not changing the dirty
state of the patcher either.

posting this.patcher.dirty to the max window gives me a: jsobject
“somevalue”

how can I get to this dirty flag??

T_

#70535
Feb 14, 2006 at 8:30pm

I’m figuring out how to know if a patcher is dirty, not make it
dirty… Have you been drinking again?;-)

T_

#70536
Feb 15, 2006 at 12:05pm

Well that was yesterday was it?

No it was Valentines day, I was drunk of love :)

Your initial post was a bit ambigous. I didn’t understand it correctly.

#70537
Feb 15, 2006 at 12:24pm

you lucky bastard :-)

well if any of you gets his head out of the clouds again and comes up with a
way to get to this dirty flag thing I’d really appreciate it if you let me
know.

T_

#70538
Feb 15, 2006 at 9:24pm

got it. it’s “this.patcher.wind.dirty” in case anyone cares.

T_

#70539

You must be logged in to reply to this topic.