Forums > MaxMSP

get dirty

February 13, 2006 | 11:26 pm

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_


February 14, 2006 | 4:39 pm

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!


February 14, 2006 | 4:55 pm

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


February 14, 2006 | 8:24 pm

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_


February 14, 2006 | 8:30 pm

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

T_


February 15, 2006 | 12:05 pm

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.


February 15, 2006 | 12:24 pm

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_


February 15, 2006 | 9:24 pm

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

T_


Viewing 8 posts - 1 through 8 (of 8 total)