new MaxPatcher() not working in Max 5
Hello,
I'm having some problems with an mxj object in Max 5, which
is working fine in 4.6.3. Under Max 5, new patcher windows do not appear to be made correctly:
public void bang()
{
MaxPatcher p = new MaxPatcher(50,50,200,200);
p.getWindow().setVisible(true);
p.getWindow().setTitle("TEST PATCH");
}
Will give a window as expected under Max 4.6.3, but nothing under Max 5 - p.getWindow().isVisible() remains false, even after calling p.getWindow().setVisible(true);
This is on a Powerbook G4, Mac OS X 10.4.11, Max 5.0.1.
As a follow up, I tried similar code in a js object, which I believe should be:
function bang()
{
p = new Patcher(50, 50, 200, 200);
p.wind.visible = 1;
p.wind.title="TEST PATCH";
post(p.wind.visible);
}
but this gives no window in Max 5, or Max 4.6.3 or Max 4.5.6 (and the visible setting remains false) - am I missing something in the JavaScript version?
Further to this, I get the same behaviour with Max 5.0.1 under Windows XP Pro, SP2, Java 6 (1.6.0_03) - can anyone else confirm this? Any workarounds? It is a show-stopper for a project I am currently working on.
(and the same problem with JavaScript in both Max 5 and Max 4.6)
TIA,
rp.
just ran into this this morning on my machine
sad sad sad sad sad. any workarounds?
10.4.11
2.4GHz Intel Core 2 Duo
some ram
max 5.0.1
compiled in eclipes?
macbook pro
HEY DUDES
MaxPatcher p = new MaxPatcher(50,50,200,200);
MaxBox b11 = p.newDefault(20,20,"toggle",null);
MaxBox b21 = p.newDefault(50,20,"toggle",null);
MaxBox b31 = p.newDefault(80,20,"toggle",null);
p.send("front", new Atom[]{});
p.getWindow().setTitle("TEST PATCH");
Aha! That's great Matthew - the missing ingredient is bringing it to the front. This is also true for the javascript version, adding p.front() to the js bang function in my previous example will now make the patcher window appear in 4.6.3 and in 5.0.1.
Thanks for that.
rp