From niklassaers at gmail.com Sat Sep 1 08:50:29 2007 From: niklassaers at gmail.com (Niklas Saers) Date: Sat Sep 1 08:51:06 2007 Subject: [java-dev] buffer~ in mxj~ In-Reply-To: <2FD1F13B-B105-4459-8469-DB9F44EEA0AA@topher.com> References: <1EC103BA-9EC5-40B0-BADC-7615D55E734E@gmail.com> <2FD1F13B-B105-4459-8469-DB9F44EEA0AA@topher.com> Message-ID: Hi Topher, I looked at it, but I must have been very tired. ;-) I guess I expected to find something like a constructor MSPBuffer(String bufferName) and then access it that way and then misunderstood how it worked. Thanks for pointing me back to it. :-) Cheers Nik On Sep 1, 2007, at 1:51 AM, topher lafata wrote: > did you look at the MSPBuffer java doc? > > Class MSPBuffer > > java.lang.Object > > > com.cycling74.msp.MSPBuffer > > > public class MSPBuffer > extends java.lang.Object > Provides static methods that get and set buffer data. created on 9- > April-2004 > > > _______________________________________________ > java-dev mailing list > java-dev@cycling74.com > http://www.cycling74.com/mailman/listinfo/java-dev From matteo.pennese at fastwebnet.it Sat Sep 1 10:07:30 2007 From: matteo.pennese at fastwebnet.it (matpe) Date: Sat Sep 1 10:07:32 2007 Subject: [java-dev] beginner question about Atom.intersection Message-ID: <1bde8.46d98e42@www.cycling74.com> I'm learning programming java (first steps) and I don't understand why my code doesn't produce the expected result. I'm simply trying to intersecate two lists using the Atom syntax. I suppose solution is very esay for an expert? Many thanks Matteo import com.cycling74.max.*; public class Intersect2List extends MaxObject { private Atom[] inputList1; private Atom[] inputList2; private Atom[] result; private Intersect2List() { declareTypedIO("LL","L"); declareInlets(new int[]{DataTypes.LIST, DataTypes.LIST}); createInfoOutlet(false); setInletAssist(new String[] {"list a and bang", "list b"}); setOutletAssist(new String[] {"intersection list"}); } public void list(Atom[] args) { switch (getInlet()) { case 0: inputList1 = args; break; case 1: inputList2 = args; break; } } public void listIntersect(Atom[] a) { result = a; for (int i=1;i<2;i++){ result = Atom.intersection(inputList1, inputList2); } post("vedi " +inputList1); outlet(0, result); } public void bang() { listIntersect(result); } } From c74-mailinglists at e--j.com Sat Sep 1 10:47:00 2007 From: c74-mailinglists at e--j.com (Emmanuel Jourdan) Date: Sat Sep 1 10:47:26 2007 Subject: [java-dev] beginner question about Atom.intersection In-Reply-To: <1bde8.46d98e42@www.cycling74.com> References: <1bde8.46d98e42@www.cycling74.com> Message-ID: <2626D1A1-6878-4953-B7E7-B2A51E078334@e--j.com> On 1 sept. 07, at 18:07, matpe wrote: > public void listIntersect(Atom[] a) { > result = a; > for (int i=1;i<2;i++){ > result = Atom.intersection(inputList1, inputList2); > } > post("vedi " +inputList1); > outlet(0, result); > } I didn't try but the following should work: public class Intersect2List extends MaxObject { private Atom[] inputList1; private Atom[] inputList2; private Atom[] result; private Intersect2List() { declareTypedIO("LL","L"); declareInlets(new int[]{DataTypes.LIST, DataTypes.LIST}); createInfoOutlet(false); setInletAssist(new String[] {"list a and bang", "list b"}); setOutletAssist(new String[] {"intersection list"}); } public void list(Atom[] args) { switch (getInlet()) { case 0: inputList1 = args; bang(); // trigger because it arrived in the left inlet break; case 1: inputList2 = args; break; } } public void listIntersect(Atom[] a) { result = Atom.intersection(inputList1, inputList2); outlet(0, result); } public void bang() { listIntersect(); } } Cheers, ej From matteo.pennese at fastwebnet.it Sat Sep 1 11:07:43 2007 From: matteo.pennese at fastwebnet.it (matpe) Date: Sat Sep 1 11:07:44 2007 Subject: [java-dev] Re: beginner question about Atom.intersection In-Reply-To: <2626D1A1-6878-4953-B7E7-B2A51E078334@e--j.com> Message-ID: <1bdf0.46d99c5f@www.cycling74.com> Thanks Emmanuel but it doesn't work? m From c74-mailinglists at e--j.com Sat Sep 1 11:23:18 2007 From: c74-mailinglists at e--j.com (Emmanuel Jourdan) Date: Sat Sep 1 11:23:44 2007 Subject: [java-dev] Re: beginner question about Atom.intersection In-Reply-To: <1bdf0.46d99c5f@www.cycling74.com> References: <1bdf0.46d99c5f@www.cycling74.com> Message-ID: <8EAAE0F9-19DA-4ADA-911C-1CB76579077D@e--j.com> On 1 sept. 07, at 19:07, matpe wrote: > Thanks Emmanuel > but it doesn't work? import com.cycling74.max.*; public class Intersect2List extends MaxObject { private Atom[] inputList1; private Atom[] inputList2; private Atom[] result; private Intersect2List() { declareTypedIO("LL","L"); declareInlets(new int[]{DataTypes.LIST, DataTypes.LIST}); createInfoOutlet(false); setInletAssist(new String[] {"list a and bang", "list b"}); setOutletAssist(new String[] {"intersection list"}); } public void list(Atom[] args) { switch (getInlet()) { case 0: inputList1 = args; bang(); // trigger because it arrived in the left inlet break; case 1: inputList2 = args; break; } } public void listIntersect() { result = Atom.intersection(inputList1, inputList2); outlet(0, result); } public void bang() { listIntersect(); } } This one works! ej From matteo.pennese at fastwebnet.it Sat Sep 1 11:32:18 2007 From: matteo.pennese at fastwebnet.it (matpe) Date: Sat Sep 1 11:32:28 2007 Subject: [java-dev] Re: beginner question about Atom.intersection In-Reply-To: <1bde8.46d98e42@www.cycling74.com> Message-ID: <1bdf4.46d9a222@www.cycling74.com> mmm... no result from the outlet here From c74-mailinglists at e--j.com Sat Sep 1 12:32:16 2007 From: c74-mailinglists at e--j.com (Emmanuel Jourdan) Date: Sat Sep 1 12:32:41 2007 Subject: [java-dev] Re: beginner question about Atom.intersection In-Reply-To: <1bdf4.46d9a222@www.cycling74.com> References: <1bdf4.46d9a222@www.cycling74.com> Message-ID: <80CDE81F-4527-47CC-B029-7B799E8BF86E@e--j.com> On 1 sept. 07, at 19:32, matpe wrote: > mmm... > no result from the outlet here It works fine here, try with the following archive: http://www.e--j.com/dl/intersect.zip It's worth to mention than [mxj list.intersection] does the same. ej From sbursch at sonic.net Sun Sep 2 14:10:01 2007 From: sbursch at sonic.net (Steve Bursch) Date: Sun Sep 2 14:10:03 2007 Subject: [java-dev] Max and Java multiple core support Message-ID: <1be40.46db1898@www.cycling74.com> I wrote a small Java mxj patcher to test whether multiple Java threads were being scheduled on separate CPUs with machines that had dual core hardware support. I developed and tested the mxj object and the patcher in a Windows environment. The algorithms used in the mxj object were designed to be CPU speed-independent. The mxj object and the patcher were designed in such a way that if the host machine had dual core hardware support, the test would run in 1 minute; if the host machine had only one CPU, the test would run in 2 minutes. In the Windows environment, the patcher behaved as expected: single-CPU machines took 2 minutes to run the test, while 2-CPU machines took only 1 minute. In the 2-CPU case, the patcher was effectively using both CPUs. In the dual-core Mac environment, however, the very same patcher and mxj object, with no changes to either, takes 2 minutes to run. These results are suggestive that both CPUs were not being fully utilized by the patcher. I'm at a loss to explain these results. Can anyone shed some light on this behavior? The Mac machine is a MacPro running Mac OS 10.4.10. The processors are 2 x 2.66 GHz. The machine has 4 GB of RAM. The machine is running Java for Mac OS X 10.4 Release 5. For both Windows and Mac environments, the machines are running Max 4.6.3 and Jitter 1.6.3. In the Windows environments, however, the Java version was Java 6, not Java 5. If anyone has a suggestion about what may account for the difference in behavior between the Windows and Mac environments, I'd be grateful to read it. Thanks in advance...Steve From sbursch at sonic.net Sun Sep 2 22:10:48 2007 From: sbursch at sonic.net (Steve Bursch) Date: Sun Sep 2 22:10:51 2007 Subject: [java-dev] Accessing the Max window when Max is unresponsive Message-ID: <1be46.46db8947@www.cycling74.com> I've developed an mxj object that is part of a Max/Jitter patcher. The mxj object is multi-threaded and runs fine in the Windows XP environment on machines that are multi-core or single CPU. A problem occurs in the Mac environment running the patcher. Shortly after the patcher begins execution, Max locks up and becomes unresponsive. The "spinning wheel" appears and never goes away. Other applications are accessible and run fine during this condition. I'm fairly positive that my mxj object is the culprit. Since I know that the Java version on the Mac machine is earlier than the Java version used in the Windows environment, I think it's likely the mxj object may be dependent upon a Java facility that's not present on the Mac machine. If that's true, I was hoping an indication of what is wrong would be written to the Max window prior to Max becoming unresponsive. Is there a way to force what's written to the Max window to also be written to a log file? The Max window is hidden by the patcher and cannot be brought to the fore because Max is unresponsive. Thanks in advance....Steve From matteo.pennese at fastwebnet.it Mon Sep 3 01:37:35 2007 From: matteo.pennese at fastwebnet.it (matpe) Date: Mon Sep 3 01:37:38 2007 Subject: [java-dev] Re: beginner question about Atom.intersection In-Reply-To: <1bde8.46d98e42@www.cycling74.com> Message-ID: <1be49.46dbb9be@www.cycling74.com> many thanks emmanuel. My fault is a misunderstanding about the intersection function; it reports the elements in common. My goal is to have such a result: A: 13 8 90 B: 21 16 30 result: 13 21 8 16 90 30 I'll keep to investigate. Thanks again m From matteo.pennese at fastwebnet.it Mon Sep 3 01:43:40 2007 From: matteo.pennese at fastwebnet.it (matpe) Date: Mon Sep 3 01:43:42 2007 Subject: [java-dev] Re: beginner question about Atom.intersection In-Reply-To: <1bde8.46d98e42@www.cycling74.com> Message-ID: <1be4a.46dbbb2c@www.cycling74.com> found it, list.multiplex... m From janklug at epibreren.com Wed Sep 5 01:47:35 2007 From: janklug at epibreren.com (Jan Klug) Date: Wed Sep 5 01:47:47 2007 Subject: [java-dev] free my peers Message-ID: <1bec7.46de5f13@www.cycling74.com> hi list, trying to hack my way into java (again) i modified the mxj matrixlist example to behave a bit more like the jit.matrixset. i kind of got it doing what i want (mainly the ability to set a specific matrix that may not have been there before), but i experience the same memory overflow that has been mentioned in earlier threads (that all seem to fade away without conclusion). one thing i tried is to apply a freePeer(), but am not sure if i chose the correct place to do so (should in be in notifyDeleted, or in the place where i overwrite an existing matrix [the 'set' function that i mainly used]? the problem only appears with biger matrices, say 4 char 720 576. smaller (or thinner planecount) matrices work fine, even with a bigger amount of matrices. while the size of matrices remains constant, RAM soon is filled, and matrices are written to the HD, which generally isn't a good idea (but java seems to disagree on this). any advice where i could help java with the garbage collection, or any other tip on this dirty hack is greatly welcome! jan here the modification of the matrixlist code [originally by bbn]: ----------------------------------------------------------------- import com.cycling74.max.*; import com.cycling74.jitter.*; import java.util.*; public class matrixlistMod2 extends MaxObject { private static class matrixlist_single { public String name; public ArrayList matrices; public int instanceCount; } private static ArrayList matrixlists = new ArrayList(); //local references private ArrayList matrices = null; private String name = null; public matrixlistMod2() { //no argument- matrixlist will not be public name = null; matrices = new ArrayList(); declareReadOnlyAttribute("size", "getSize"); if (matrices.size() == 0) { init(); } } public matrixlistMod2(String s) { //argument name = s; matrices = findName(name); if (matrices == null) matrices = addName(name); else { int i = findIndex(name); ((matrixlist_single)(matrixlists.get(i))).instanceCount++; } declareReadOnlyAttribute("size", "getSize"); if (matrices.size() == 0) { init(); } } public matrixlistMod2(String s, int listSize) { //argument name = s; matrices = findName(name); if (matrices == null) matrices = addName(name); else { int i = findIndex(name); ((matrixlist_single)(matrixlists.get(i))).instanceCount++; } declareReadOnlyAttribute("size", "getSize"); if (matrices.size() < listSize) { init(listSize - matrices.size()); } } private static int findIndex(String name) { int i=-1; while (++i2)||(!a[0].isString())||(!a[1].isInt())) { error("matrixlist: bad insert message"); error("usage --> insert [matrixname] [index]"); return; } doInsert(a[0].getString(), a[1].getInt()); } private void doInsert(String matrixname, int index) { JitterMatrix j = new JitterMatrix(); j.setinfo(matrixname); j.frommatrix(matrixname); matrices.add(j); } public void init () { int listSize = 100; JitterMatrix j = new JitterMatrix(); for(int i = 0; i < listSize;i++) { matrices.add(j); } } public void init (int listSize) { JitterMatrix j = new JitterMatrix(); for(int i = 0; i < listSize;i++) { matrices.add(j); } } public void set(Atom[] a) { if ((a.length>2)||(!a[0].isString())||(!a[1].isInt())) { error("matrixlist: bad set message"); error("usage --> set [matrixname] [index]"); return; } String matrixname = a[0].getString(); JitterMatrix j = new JitterMatrix(); j.setinfo(matrixname); j.frommatrix(matrixname); ((JitterMatrix)matrices.get(a[1].getInt())).freePeer(); matrices.set(a[1].getInt(), j); } public void remove(int index) { if ((index > 0)&&(index < matrices.size())) matrices.remove(index); ((JitterMatrix)matrices.get(index)).freePeer(); /*((JitterMatrix)matrices.get(index)).freePeer(); */ } public void clear() { matrices.clear(); } public void output(int i) { if ((i=0)) { JitterMatrix m = (JitterMatrix)matrices.get(i); outlet(0, "jit_matrix", m.getName()); } } } From puuukeey at comcast.net Wed Sep 5 05:56:43 2007 From: puuukeey at comcast.net (Matthew Aidekman) Date: Wed Sep 5 05:56:45 2007 Subject: [java-dev] Eclipse Weirdness Message-ID: <1bed4.46de997a@www.cycling74.com> public Sanity myMorning(Head myHead) { while(0==0){wall.slam(myHead);} return new Sanity(); } after running the above code for 3 hours this morning, I copied the attached code DIRECTLY FROM QUICKIE TO ECLIPSE and it failed in eclipse while working in quickie. eclipse 3.2.2 mac 10.4.10 max 4.6.3 2.4 GHz intel core 2 duo -------------- next part -------------- A non-text attachment was scrubbed... Name: graindrivertest001.java Type: application/octet-stream Size: 1207 bytes Desc: not available Url : http://www.cycling74.com/pipermail/java-dev/attachments/20070905/b5ac3209/graindrivertest001.obj From mattijs at smadsteck.nl Wed Sep 5 06:42:10 2007 From: mattijs at smadsteck.nl (Mattijs Kneppers) Date: Wed Sep 5 06:42:12 2007 Subject: [java-dev] Re: Eclipse Weirdness In-Reply-To: <1bed4.46de997a@www.cycling74.com> Message-ID: <1bedb.46dea422@www.cycling74.com> why not while(true) ? Mattijs -- SmadSteck - http://www.smadsteck.nl Hard- and software for interactive audiovisual sampling From puuukeey at comcast.net Wed Sep 5 07:20:35 2007 From: puuukeey at comcast.net (Matthew Aidekman) Date: Wed Sep 5 07:20:38 2007 Subject: [java-dev] Re: Eclipse Weirdness In-Reply-To: <1bedb.46dea422@www.cycling74.com> Message-ID: <1bedc.46dead23@www.cycling74.com> trouble shooting my pseudocode joke. OUT-GEEKED AGAIN! unfortunately the real problem remains.. maybe its just a bug in eclipse? From puuukeey at comcast.net Wed Sep 5 07:34:00 2007 From: puuukeey at comcast.net (Matthew Aidekman) Date: Wed Sep 5 07:34:01 2007 Subject: [java-dev] Re: Eclipse Weirdness In-Reply-To: <1bed4.46de997a@www.cycling74.com> Message-ID: <1bedd.46deb047@www.cycling74.com> ok. I think I've got eclipse and quickie generating the same results. still whats so complicated about the following code? I would expect the line runningPosition+=currScrollSpeed; not to always evaluate to -1. import com.cycling74.max.*; import com.cycling74.msp.*; public class plusequalstest extends MSPPerformer { boolean iReverseSound = true; //reverse scrollspeed float iBaseScrollSpeed = 1.f ; //scrollspeed float runningPosition = 0.f; private static final String[] INLET_ASSIST = new String[]{ "input (sig)" }; private static final String[] OUTLET_ASSIST = new String[]{ "output (sig)" }; public plusequalstest(float gain) { declareInlets(new int[]{SIGNAL}); declareOutlets(new int[]{SIGNAL}); setInletAssist(INLET_ASSIST); setOutletAssist(OUTLET_ASSIST); } public void dspsetup(MSPSignal[] ins, MSPSignal[] outs) { //If you forget the fields of MSPSignal you can select the classname above //and choose Open Class Reference For Selected Class.. from the Java menu } public void perform(MSPSignal[] ins, MSPSignal[] outs) { int i; float[] in = ins[0].vec; float[] out = outs[0].vec; float currScrollSpeed = iBaseScrollSpeed; for(i = 0; i < in.length;i++) { if(iReverseSound) currScrollSpeed= -1* currScrollSpeed; runningPosition+=currScrollSpeed; out[i] =runningPosition; } } } From ollie at icarus.nu Thu Sep 6 03:11:51 2007 From: ollie at icarus.nu (Oliver Bown) Date: Thu Sep 6 03:11:54 2007 Subject: [java-dev] Re: Eclipse Weirdness In-Reply-To: <1bedd.46deb047@www.cycling74.com> References: <1bedd.46deb047@www.cycling74.com> Message-ID: (currentTime < timeOfFirstCoffee && haveFlu) but my guess is the "if (iReverseSound)" block should be outside the loop. O On 5 Sep 2007, at 14:34, Matthew Aidekman wrote: > > ok. I think I've got eclipse and quickie generating the same > results. still whats so complicated about the following code? > > I would expect the line > runningPosition+=currScrollSpeed; not to always evaluate to -1. > > > import com.cycling74.max.*; > import com.cycling74.msp.*; > > public class plusequalstest extends MSPPerformer > { > > boolean iReverseSound = true; //reverse scrollspeed > float iBaseScrollSpeed = 1.f ; //scrollspeed > float runningPosition = 0.f; > > private static final String[] INLET_ASSIST = new String[]{ > "input (sig)" > }; > private static final String[] OUTLET_ASSIST = new String[]{ > "output (sig)" > }; > > > public plusequalstest(float gain) > { > declareInlets(new int[]{SIGNAL}); > declareOutlets(new int[]{SIGNAL}); > > setInletAssist(INLET_ASSIST); > setOutletAssist(OUTLET_ASSIST); > > } > > > public void dspsetup(MSPSignal[] ins, MSPSignal[] outs) > { > //If you forget the fields of MSPSignal you can select the > classname above > //and choose Open Class Reference For Selected Class.. from the > Java menu > } > > public void perform(MSPSignal[] ins, MSPSignal[] outs) > { > > int i; > float[] in = ins[0].vec; > float[] out = outs[0].vec; > > float currScrollSpeed = iBaseScrollSpeed; > > > for(i = 0; i < in.length;i++) > { > if(iReverseSound) > currScrollSpeed= -1* currScrollSpeed; > runningPosition+=currScrollSpeed; > > out[i] =runningPosition; > > } > } > } > > > > > _______________________________________________ > java-dev mailing list > java-dev@cycling74.com > http://www.cycling74.com/mailman/listinfo/java-dev From mattijs at smadsteck.nl Thu Sep 6 03:20:56 2007 From: mattijs at smadsteck.nl (Mattijs Kneppers) Date: Thu Sep 6 03:20:58 2007 Subject: [java-dev] Re: Re: Eclipse Weirdness In-Reply-To: Message-ID: <1bf37.46dfc678@www.cycling74.com> Quote: Ollie Bown wrote on Thu, 06 September 2007 11:11 ---------------------------------------------------- > (currentTime < timeOfFirstCoffee && haveFlu) but my guess is the "if > (iReverseSound)" block should be outside the loop. I would never format my code like this: if(iReverseSound) currScrollSpeed= -1* currScrollSpeed; runningPosition+=currScrollSpeed; but always like this: if(iReverseSound) currScrollSpeed= -1* currScrollSpeed; runningPosition+=currScrollSpeed; or like this: if(iReverseSound) { currScrollSpeed= -1* currScrollSpeed; } runningPosition+=currScrollSpeed; -- SmadSteck - http://www.smadsteck.nl Hard- and software for interactive audiovisual sampling From grimepoch at mac.com Thu Sep 6 10:12:34 2007 From: grimepoch at mac.com (Rick Burnett) Date: Thu Sep 6 10:12:37 2007 Subject: [java-dev] Re: Re: SOLUTION! Long Filename Support in Max with Java In-Reply-To: <46D53C68.5070805@gmail.com> Message-ID: <1bf50.46e026f1@www.cycling74.com> Sorry for the LONG delay, I was out of town for a bit and didn't have time to really check my email OR figure out what is going on. I will try and figure out what is happening this weekend and post and update for you if I figure it out! In any case, I will give you some detailed information. The code is kind of convoluted because it is a bunch of different things together that I barely understand. As I get it cleaned up more, I will be posting it GPL'ed for everyone. From adamjmurray at gmail.com Thu Sep 6 19:22:43 2007 From: adamjmurray at gmail.com (Adam Murray) Date: Thu Sep 6 19:22:44 2007 Subject: [java-dev] Bug/limitation: outlet() does not work in the constructor Message-ID: <1bf89.46e0a7e2@www.cycling74.com> As demonstrated in the included external and patch, any calls to outlet() inside the constructor seem to be ignored. Here is my problem. I have a custom attribute getter/setter, similar to the example external, and I really need the value to be sent out ANYTIME the attribute is set, which includes not only via max messages (that works fine), but also when using attributes to construct the object (mxj AttributeTest @myattr 2). The latter case does not work because of the limitation with outlet() in the constructor. Any suggestions for how I can send out the attribute values in this situation? I thought I might be able to use the loadbang() method, but the APIs say "Note that you do not get the loadbang message when the user creates a new instance of your object in the Patcher window, only when a Max file containing your class is loaded from disk." I also need it to work when a new instance is created. Adam Java external: [code] import com.cycling74.max.Atom; import com.cycling74.max.MaxObject; public class AttributeTest extends MaxObject { private int myattr = 0; public AttributeTest(Atom[] args) { declareIO(1, 1); declareAttribute("myattr", "getmyattr", "myattr"); outlet(0, "finished the constructor"); // doesn't do anything } public int getmyattr() { return myattr; } public void myattr(int myattr) { post("In myattr()"); this.myattr = myattr; outlet(0, myattr); // only works when receiving myattr messages via the inlet } } [/code] ********** Max patch: #P window setfont "Sans Serif" 9.; #P window linecount 1; #P message 49 51 51 196617 myattr 1; #P newex 49 102 81 196617 print mxjoutput; #P newex 49 77 145 196617 mxj AttributeTest @myattr 2; #P connect 0 0 1 0; #P connect 2 0 0 0; #P window clipboard copycount 3; From adamjmurray at gmail.com Thu Sep 6 19:26:07 2007 From: adamjmurray at gmail.com (Adam Murray) Date: Thu Sep 6 19:26:09 2007 Subject: [java-dev] Re: Bug/limitation: outlet() does not work in the constructor In-Reply-To: <1bf89.46e0a7e2@www.cycling74.com> Message-ID: <1bf8a.46e0a8af@www.cycling74.com> And off topic: why doesn't [code] [/code] work in my post? The forum FAQ seems to indicate it should. From owen at owengreen.net Fri Sep 7 03:12:12 2007 From: owen at owengreen.net (Owen Green) Date: Fri Sep 7 03:12:25 2007 Subject: [java-dev] Bug/limitation: outlet() does not work in the constructor In-Reply-To: <1bf89.46e0a7e2@www.cycling74.com> References: <1bf89.46e0a7e2@www.cycling74.com> Message-ID: <46E115EC.4030809@owengreen.net> Adam Murray wrote: > As demonstrated in the included external and patch, any calls to > outlet() inside the constructor seem to be ignored. The object doesn't, strictly speaking, exist until the constructor has completed, so this isn't surprising. I think you'll need something to run asynchronously, after the constructor has finished: new MaxQelem(new Executable() { public void execute(){ outlet(0, myattr); } }).set(); This works here - don't know how reliable it is without building some sort of delay into it though. So YMMV. -- O From c74-mailinglists at e--j.com Fri Sep 7 03:26:39 2007 From: c74-mailinglists at e--j.com (Emmanuel Jourdan) Date: Fri Sep 7 03:26:52 2007 Subject: [java-dev] Bug/limitation: outlet() does not work in the constructor In-Reply-To: <46E115EC.4030809@owengreen.net> References: <1bf89.46e0a7e2@www.cycling74.com> <46E115EC.4030809@owengreen.net> Message-ID: <4F528668-4BBC-4A44-B4CF-7D060B88AA85@e--j.com> On 7 sept. 07, at 11:12, Owen Green wrote: > The object doesn't, strictly speaking, exist until the constructor > has completed, so this isn't surprising. > > I think you'll need something to run asynchronously, after the > constructor has finished: > > new MaxQelem(new Executable() { > public void execute(){ > outlet(0, myattr); > } > }).set(); > > This works here - don't know how reliable it is without building > some sort of delay into it though. So YMMV. You could also use the loadbang() method. ej From owen at owengreen.net Fri Sep 7 03:35:52 2007 From: owen at owengreen.net (Owen Green) Date: Fri Sep 7 03:36:00 2007 Subject: [java-dev] Bug/limitation: outlet() does not work in the constructor In-Reply-To: <4F528668-4BBC-4A44-B4CF-7D060B88AA85@e--j.com> References: <1bf89.46e0a7e2@www.cycling74.com> <46E115EC.4030809@owengreen.net> <4F528668-4BBC-4A44-B4CF-7D060B88AA85@e--j.com> Message-ID: <46E11B78.8020008@owengreen.net> That was my first thought, but check the last paragraph of the OP's message :) -- O Emmanuel Jourdan wrote: > You could also use the loadbang() method. From c74-mailinglists at e--j.com Fri Sep 7 03:38:52 2007 From: c74-mailinglists at e--j.com (Emmanuel Jourdan) Date: Fri Sep 7 03:39:04 2007 Subject: [java-dev] Bug/limitation: outlet() does not work in the constructor In-Reply-To: <46E11B78.8020008@owengreen.net> References: <1bf89.46e0a7e2@www.cycling74.com> <46E115EC.4030809@owengreen.net> <4F528668-4BBC-4A44-B4CF-7D060B88AA85@e--j.com> <46E11B78.8020008@owengreen.net> Message-ID: <9FE24182-C301-43F9-ACBC-F5EC33156DC4@e--j.com> On 7 sept. 07, at 11:35, Owen Green wrote: > That was my first thought, but check the last paragraph of the OP's > message :) Well? I probably did not ;-) Then the Qelem solution seems good. Sorry. ej From adamjmurray at gmail.com Fri Sep 7 10:42:26 2007 From: adamjmurray at gmail.com (Adam Murray) Date: Fri Sep 7 10:42:27 2007 Subject: [java-dev] Re: Bug/limitation: outlet() does not work in the constructor In-Reply-To: <46E115EC.4030809@owengreen.net> Message-ID: <1bfd4.46e17f71@www.cycling74.com> Quote: owen wrote on Fri, 07 September 2007 02:12 ---------------------------------------------------- > > I think you'll need something to run asynchronously, after the > constructor has finished: > > new MaxQelem(new Executable() { > public void execute(){ > outlet(0, myattr); > } > }).set(); > > This works here - don't know how reliable it is without building some > sort of delay into it though. So YMMV. > Thanks Owen, I'll give this a shot. You mentioned reliability - I'll keep this in mind if things stop working as my patch gets more complex. If that's potentailly going to be a problem, I'd like to make a feature request to have a new overridable method in MaxObject that's like loadbang(), but will be called after the object is initialized. This would be useful for any who is patching on-the-fly with mxj externals. I'll post another message if I actually do run into any reliability problems with this MaxQelem approach. -Adam From owen at owengreen.net Fri Sep 7 11:41:20 2007 From: owen at owengreen.net (Owen Green) Date: Fri Sep 7 11:41:28 2007 Subject: [java-dev] Re: Bug/limitation: outlet() does not work in the constructor In-Reply-To: <1bfd4.46e17f71@www.cycling74.com> References: <1bfd4.46e17f71@www.cycling74.com> Message-ID: <46E18D40.1010609@owengreen.net> Adam Murray wrote: > You mentioned reliability - I'll keep this in mind if things stop > working as my patch gets more complex. It'll be an issue of whatever lag there may be between the constructor exiting and there actually being an outlet available to use - if it does stop working, try putting a Thread.sleep() for some short amount of time at the beginning of execute(). -- Owen From c.veit at inode.at Sat Sep 8 07:33:33 2007 From: c.veit at inode.at (Christian Veit) Date: Sat Sep 8 07:33:34 2007 Subject: [java-dev] could not load class ... Message-ID: <1c021.46e2a4ac@www.cycling74.com> i am new to max/msp/jitter and i am trying to create a mxj external but it doesent really works.. i use max/msp version 4.6.3 jitter 1.6.3 and java 1.6.0_02-b06.. max window says Jitter java support installed.. no error message nothing.. but if i try to write a java class there it writes error: Could not load class xyz... can anybody give me a hint what could be wrong.. i've searched the forums but i did not find anything about that.. From personalcomputermusic at gmail.com Sat Sep 8 17:27:07 2007 From: personalcomputermusic at gmail.com (f.e) Date: Sat Sep 8 17:27:12 2007 Subject: [java-dev] could not load class ... In-Reply-To: <1c021.46e2a4ac@www.cycling74.com> References: <1c021.46e2a4ac@www.cycling74.com> Message-ID: <46E32FCB.7020201@gmail.com> Your class has to be in the Java search path. By default, this is here on Windows (don't know for Mac) : C:\Program Files\Cycling '74\MaxMSP 4.6\Cycling '74\java\classes You can also modify the max.java.config.txt which is located here on Win : C:\Program Files\Cycling '74\MaxMSP 4.6\Cycling '74\java Example : ; add /Users/topher/myclasses to the dynamic classpath of MXJClassLoader; ; max.dynamic.class.dir /Users/topher/myclasses ; max.dynamic.class.dir "C:/MaxMSP/fe - all/fe - objects/JAVA/" f.e f.e chanfrault | aka | personal computer music >>>>>>> http://www.personal-computer-music.com >>>>>>> |sublime music for a desperate people| Christian Veit a ?crit : > i am new to max/msp/jitter and i am trying to create a mxj external but it doesent really works.. i use max/msp version 4.6.3 jitter 1.6.3 and java 1.6.0_02-b06.. max window says Jitter java support installed.. no error message nothing.. but if i try to write a java class there it writes error: Could not load class xyz... can anybody give me a hint what could be wrong.. i've searched the forums but i did not find anything about that.. > _______________________________________________ > java-dev mailing list > java-dev@cycling74.com > http://www.cycling74.com/mailman/listinfo/java-dev > From c.veit at inode.at Sun Sep 9 03:33:53 2007 From: c.veit at inode.at (Christian Veit) Date: Sun Sep 9 03:33:55 2007 Subject: [java-dev] Re: could not load class ... In-Reply-To: <46E32FCB.7020201@gmail.com> Message-ID: <1c055.46e3be01@www.cycling74.com> thanks for reply... but i have already tried to modify my max.java.config.txt and i have tried to copy the class file into C:\Program Files\Cycling '74\MaxMSP 4.6\Cycling '74\java\classes ... From personalcomputermusic at gmail.com Sun Sep 9 11:10:27 2007 From: personalcomputermusic at gmail.com (f.e) Date: Sun Sep 9 11:10:31 2007 Subject: [java-dev] Re: could not load class ... In-Reply-To: <1c055.46e3be01@www.cycling74.com> References: <1c055.46e3be01@www.cycling74.com> Message-ID: <46E42903.1070506@gmail.com> Well... So you're on Win. Do the other classes load well ? f.e f.e chanfrault | aka | personal computer music >>>>>>> http://www.personal-computer-music.com >>>>>>> |sublime music for a desperate people| Christian Veit a ?crit : > thanks for reply... but i have already tried to modify my max.java.config.txt and i have tried to copy the class file into C:\Program Files\Cycling '74\MaxMSP > 4.6\Cycling '74\java\classes ... > _______________________________________________ > java-dev mailing list > java-dev@cycling74.com > http://www.cycling74.com/mailman/listinfo/java-dev > From grimepoch at mac.com Mon Sep 10 14:53:17 2007 From: grimepoch at mac.com (Rick Burnett) Date: Mon Sep 10 14:53:19 2007 Subject: [java-dev] Re: Re: SOLUTION! Long Filename Support in Max with Java In-Reply-To: <1bf50.46e026f1@www.cycling74.com> Message-ID: <1c0da.46e5aebd@www.cycling74.com> Just to be safe, I re-uploaded the library so try re-downloading it. The file sizes were identical, so I am not sure what is going on. 1) The file has to exist. I created a file in a test directory with the same name you used. If the file does not exist, it will return garbage. I need to add a check and return -1 or something if the file does not exist. That will have to be a future update. Also, feeding the name back in also mangles it (meaning you cannot feed the max name through it. In the javascript it should be easy to check for the # character and surpass the check code. Here is the code I used (you'll have to touch the file in /Test/Charlotte/_perso/_samples/bush/.....) #P window setfont "Sans Serif" 9.; #P window linecount 1; #P newex 112 143 62 196617 prepend set; #P window linecount 2; #P message 112 176 415 196617 "Macintosh HD:Test/Charlotte/_perso/_samples/bush/faut-il sauver le so#100709.wav"; #P window linecount 1; #P message 112 62 398 196617 convert "/Test/Charlotte/_perso/_samples/bush/faut-il sauver le soldat bush.wav"; #P newex 112 108 105 196617 mxj convertFilename; #P connect 3 0 2 0; #P connect 0 0 3 0; #P connect 1 0 0 0; #P window clipboard copycount 4; From grimepoch at mac.com Mon Sep 10 15:21:43 2007 From: grimepoch at mac.com (Rick Burnett) Date: Mon Sep 10 15:21:45 2007 Subject: [java-dev] Re: SOLUTION! Long Filename Support in Max with Java In-Reply-To: <1b8b0.46c36336@www.cycling74.com> Message-ID: <1c0de.46e5b567@www.cycling74.com> Here is a new 'convert' method that will keep from translating files that are already in the old representation: public void convert(String s1) { //Need to make sure this string does not need to be converted if(s1.matches(".*#[0-9]+\\..*") && s1.matches(".*:.*")) { outlet(0,Atom.newAtom(s1)); } else { String s2 = getMyFullName( s1 ); outlet(0,Atom.newAtom(s2)); } } From leopold.frey at free.fr Mon Sep 10 15:40:15 2007 From: leopold.frey at free.fr (=?ISO-8859-15?Q?L=E9opold_Frey?=) Date: Mon Sep 10 15:40:17 2007 Subject: [java-dev] Re: Re: SOLUTION! Long Filename Support in Max with Java In-Reply-To: <1c0da.46e5aebd@www.cycling74.com> References: <1c0da.46e5aebd@www.cycling74.com> Message-ID: <46E5B9BF.30404@free.fr> Hi Rick, Rick Burnett a ?crit : > Just to be safe, I re-uploaded the library so try re-downloading it. The file sizes were identical, so I am not sure what is going on. > The problem still exists (I re-downloaded the library - maybe zipping it would be a solution - and modified the "convert" method). > 1) The file has to exist. I created a file in a test directory with the same name you used. If the file does not exist, it will return garbage. I need to add a check and return -1 or something if the file does not exist. That will have to be a future update. > My file exists but is on another partition, maybe that's the point. > Also, feeding the name back in also mangles it (meaning you cannot feed the max name through it. In the javascript it should be easy to check for the # character and surpass the check code. > I'm not sure I understand what you mean. I could surely easily replace those strange character by their real equivalent, for example : /Volumes/DriveName/ => DriveName,,? => DriveName:/ and folder/folder => folder ,?folder => folder/folder But I've no time to do it for now. Thanks for your work. Leo From grimepoch at mac.com Tue Sep 11 10:40:50 2007 From: grimepoch at mac.com (Rick Burnett) Date: Tue Sep 11 10:40:52 2007 Subject: [java-dev] Re: SOLUTION! Long Filename Support in Max with Java In-Reply-To: <1b8b0.46c36336@www.cycling74.com> Message-ID: <1c13a.46e6c512@www.cycling74.com> I gave you some code to prevent mangling names if they pass through twice. (Meaning if a Max filename with the #93248.... gets passed in, it will just pass it through). Are you saying you have multiple partitions on the same drive? I do not have a machine that has that case to test it. I have multiple drives and I know that works. Which OSX version are you using? From jmail at nospaces.net Thu Sep 13 14:41:07 2007 From: jmail at nospaces.net (Jonny) Date: Thu Sep 13 14:41:08 2007 Subject: [java-dev] Re: Mxj don't like accents In-Reply-To: Message-ID: <1c20c.46e9a063@www.cycling74.com> Is anything happening on this? (for v 4.6.x?) Or has anyone found a workaround? It still seems to be happening for me (Max 4.6.3 on Mac Intel) and i have a succinct patch and class that exhibits the behaviour (although my way "posts" to the message window ok, but "set"ing a message box comes out wrong). Any news? jonny From c.veit at inode.at Fri Sep 14 13:52:58 2007 From: c.veit at inode.at (Christian Veit) Date: Fri Sep 14 13:53:05 2007 Subject: [java-dev] Re: Re: could not load class ... In-Reply-To: <46E42903.1070506@gmail.com> Message-ID: <1c275.46eae698@www.cycling74.com> sorry for my late answer... yes i am on win and some classes load well for example the mxj classpath class loads well and it works without problems.. but if i try to write my own class with the mxj quickie object for example a class named firsttime it don't work.. but there is also no .class file which should be created automatically... or not? there is only the .java file in the ...Cycling'74\java\classes directory.. On the other side i have tried to use Eclipse for developing my java class.. i have a bin and a src folder in my project and i have made an entry to the bin folder in my max.java.config.txt ... Maybe you gave me the answer for my problem already and i only misunderstood it.. you said: "Your class has to be in the Java search path. By default, this is here on Windows (don't know for Mac) : C:\Program Files\Cycling '74\MaxMSP 4.6\Cycling '74\java\classes" do i have to tell java or windows to look at this directory? if yes how do i do it?? From bthrew at gmail.com Sat Sep 15 14:33:11 2007 From: bthrew at gmail.com (barry threw) Date: Sat Sep 15 14:33:18 2007 Subject: [java-dev] Accessing the Max window when Max is unresponsive In-Reply-To: <1be46.46db8947@www.cycling74.com> References: <1be46.46db8947@www.cycling74.com> Message-ID: Does it log to the system console? /application/utilities/console? b On Sep 2, 2007, at 9:10 PM, Steve Bursch wrote: > > I've developed an mxj object that is part of a Max/Jitter patcher. > The mxj object is multi-threaded and runs fine in the Windows XP > environment on machines that are multi-core or single CPU. > > A problem occurs in the Mac environment running the patcher. > Shortly after the patcher begins execution, Max locks up and > becomes unresponsive. The "spinning wheel" appears and never goes > away. Other applications are accessible and run fine during this > condition. > > I'm fairly positive that my mxj object is the culprit. Since I know > that the Java version on the Mac machine is earlier than the Java > version used in the Windows environment, I think it's likely the > mxj object may be dependent upon a Java facility that's not present > on the Mac machine. If that's true, I was hoping an indication of > what is wrong would be written to the Max window prior to Max > becoming unresponsive. > > Is there a way to force what's written to the Max window to also be > written to a log file? The Max window is hidden by the patcher and > cannot be brought to the fore because Max is unresponsive. > > Thanks in advance....Steve > > _______________________________________________ > java-dev mailing list > java-dev@cycling74.com > http://www.cycling74.com/mailman/listinfo/java-dev Barry Threw Media Art and Technology San Francisco, CA Work: 857-544-3967 Email: bthrew@gmail.com IM: captogreadmore (AIM) http:/www.barrythrew.com From sbursch at sonic.net Sun Sep 16 21:55:53 2007 From: sbursch at sonic.net (Steve Bursch) Date: Sun Sep 16 21:55:55 2007 Subject: [java-dev] Re: Accessing the Max window when Max is unresponsive In-Reply-To: Message-ID: <1c30d.46edfac9@www.cycling74.com> Please pardon my ignorance in this, but do I need to turn on logging in Max to make it log to the system console? I don't have access to the failing Mac machine just at the moment, but a search through the directories on a Windows XP machine that runs Max fails to show any Max-related files or directories with the word "console" in the name. Is the Max system console location the same on Windows as it is on the Mac? Thanks...Steve From bthrew at gmail.com Sun Sep 16 23:16:51 2007 From: bthrew at gmail.com (barry threw) Date: Sun Sep 16 23:16:56 2007 Subject: [java-dev] Re: Accessing the Max window when Max is unresponsive In-Reply-To: <1c30d.46edfac9@www.cycling74.com> References: <1c30d.46edfac9@www.cycling74.com> Message-ID: Mac system console. Not Max. b On Sep 16, 2007, at 8:55 PM, Steve Bursch wrote: > > Please pardon my ignorance in this, but do I need to turn on > logging in Max to make it log to the system console? I don't have > access to the failing Mac machine just at the moment, but a search > through the directories on a Windows XP machine that runs Max fails > to show any Max-related files or directories with the word > "console" in the name. Is the Max system console location the same > on Windows as it is on the Mac? > > Thanks...Steve > > > > _______________________________________________ > java-dev mailing list > java-dev@cycling74.com > http://www.cycling74.com/mailman/listinfo/java-dev Barry Threw Media Art and Technology San Francisco, CA Work: 857-544-3967 Email: bthrew@gmail.com IM: captogreadmore (AIM) http:/www.barrythrew.com From topher at topher.com Sun Sep 16 23:31:19 2007 From: topher at topher.com (topher lafata) Date: Sun Sep 16 23:31:24 2007 Subject: [java-dev] Re: Accessing the Max window when Max is unresponsive In-Reply-To: References: <1c30d.46edfac9@www.cycling74.com> Message-ID: <1190007082.306BF390@gf26.dngr.org> Just to chime in. It would not be too difficult to make a class which logged to a file of your choice using java io classes. From topher at topher.com Sun Sep 16 23:34:05 2007 From: topher at topher.com (topher lafata) Date: Sun Sep 16 23:34:10 2007 Subject: [java-dev] Re: Accessing the Max window when Max is unresponsive In-Reply-To: References: <1c30d.46edfac9@www.cycling74.com> Message-ID: <1190007248.23A35CEF@fd8.dngr.org> Also...os x java is much less robust with threading as related to ui stiff so if your mxj class is doing any swing or awt stuff remember to use java SwingUtilities as sun suggests for proper ui dispatch. From jmail at nospaces.net Mon Sep 17 15:56:13 2007 From: jmail at nospaces.net (Jonny) Date: Mon Sep 17 15:56:16 2007 Subject: [java-dev] Re: re: mxj class loader trouble with java.beans Message-ID: <1c373.46eef7fd@www.cycling74.com> In an old archived thread (http://www.cycling74.com/forums/index.php?t=msg&goto=42525&rid=704#msg_42525) i found, Topher came to the rescue with an issue with Java Beans. Just to say that the "setClassLoader()" fix worked for me (and that the "feature" still persists in v 4.6.3). And thanks Topher! jonny From c.veit at inode.at Sat Sep 22 05:00:41 2007 From: c.veit at inode.at (Christian Veit) Date: Sat Sep 22 05:00:53 2007 Subject: [java-dev] Re: Re: could not load class ... In-Reply-To: <1c275.46eae698@www.cycling74.com> Message-ID: <1c4b7.46f4f5d8@www.cycling74.com> could anybody give me a hint? would be fine.. From personalcomputermusic at gmail.com Sun Sep 23 11:08:08 2007 From: personalcomputermusic at gmail.com (f.e) Date: Sun Sep 23 11:08:13 2007 Subject: [java-dev] Re: Re: could not load class ... In-Reply-To: <1c4b7.46f4f5d8@www.cycling74.com> References: <1c4b7.46f4f5d8@www.cycling74.com> Message-ID: <46F69D78.6050102@gmail.com> Do the regular classes (the ones within Max) load fine ? If yes, well... i don't know If no, check you're Java install. What's your Java version ? f.e f.e chanfrault | aka | personal computer music >>>>>>> http://www.personal-computer-music.com >>>>>>> |sublime music for a desperate people| Christian Veit a ?crit : > could anybody give me a hint? would be fine.. > _______________________________________________ > java-dev mailing list > java-dev@cycling74.com > http://www.cycling74.com/mailman/listinfo/java-dev > From c.veit at inode.at Sun Sep 23 13:11:37 2007 From: c.veit at inode.at (Christian Veit) Date: Sun Sep 23 13:11:38 2007 Subject: [java-dev] Re: Re: Re: could not load class ... In-Reply-To: <46F69D78.6050102@gmail.com> Message-ID: <1c50a.46f6ba68@www.cycling74.com> Alright... i think the first problem was that i had some troubles with my jdk installation so i tried updating my jdk to the latest version... i don't know exactly what was wrong.. but now the Class was found if i copy it to the classes folder in Cycling74 directory but there was another reason why i got the could not load class error.. i had made a package in eclipse and there was my class file.. if i copy the class file to default package it works.. is there a way to say max to search all sub directorys in my bin folder to search for classes? From personalcomputermusic at gmail.com Tue Sep 25 04:08:36 2007 From: personalcomputermusic at gmail.com (f.e) Date: Tue Sep 25 04:18:48 2007 Subject: [java-dev] Re: Re: Re: could not load class ... In-Reply-To: <1c50a.46f6ba68@www.cycling74.com> References: <1c50a.46f6ba68@www.cycling74.com> Message-ID: <46F8DE24.6060701@gmail.com> fe.super must stay in his folder called fe. So move it with. f.e f.e chanfrault | aka | personal computer music >>>>>>> http://www.personal-computer-music.com >>>>>>> |sublime music for a desperate people| Christian Veit a ?crit : > Alright... i think the first problem was that i had some troubles with my jdk installation so i tried updating my jdk to the latest version... i don't know exactly what was wrong.. but now the Class was found if i copy it to the classes folder in Cycling74 directory but there was another reason why i got the could not load class error.. i had made a package in eclipse and there was my class file.. if i copy the class file to default package it works.. is there a way to say max to search all sub directorys in my bin folder to search for classes? > _______________________________________________ > java-dev mailing list > java-dev@cycling74.com > http://www.cycling74.com/mailman/listinfo/java-dev > From c.veit at inode.at Tue Sep 25 11:58:09 2007 From: c.veit at inode.at (Christian Veit) Date: Tue Sep 25 11:58:11 2007 Subject: [java-dev] Re: Re: Re: Re: could not load class ... In-Reply-To: <46F8DE24.6060701@gmail.com> Message-ID: <1c5d3.46f94c31@www.cycling74.com> thanks a lot for your replys.. but i don't really understand your last post.. can you explain it a bit more extensive please.. maybe i hadn't explained good enough, what i want to do do.. so i write it down once again: i'm using Eclipse for developing javaexternals.. my Project (PimpDaMXJ) in Eclipse has a bin folder which i have referenced at the max.java.config.txt file with: max.dynamic.class.dir F:/development/PimpDaMXJ/bin/; and i have a class in a package net.pimpdahood.mxj.max.ClassName in my project. So how can i define in the max.java.config.txt file that max should search for all classes in the subdirectorys of the defined dir?? or is it impossible to do that.. The Reason why i wan't to do that is.. if i have much more packages i don't want to make an max.dynamic.class.dir entry like F:/development/PimpDaMXJ/bin/net/pimpdahood/mxj/max/ for each package i'am using.. so it would be fine to tell max it also look inside subfolders of the defined path.. regards Christian From nick at cassiel.com Tue Sep 25 16:11:05 2007 From: nick at cassiel.com (Nick Rothwell) Date: Tue Sep 25 16:10:23 2007 Subject: [java-dev] Re: Re: Re: Re: could not load class ... In-Reply-To: <1c5d3.46f94c31@www.cycling74.com> References: <1c5d3.46f94c31@www.cycling74.com> Message-ID: <8DBAA1DB-5CA4-4F65-87C4-90C94DEA5CDE@cassiel.com> On 25 Sep 2007, at 18:58, Christian Veit wrote: > my Project (PimpDaMXJ) in Eclipse has a bin folder which i have > referenced at the max.java.config.txt file with: > max.dynamic.class.dir F:/development/PimpDaMXJ/bin/; > and i have a class in a package net.pimpdahood.mxj.max.ClassName in > my project. Fine: everything you're doing is right, as far as I can tell. With your setup, you should be able to create an object [mxj net.pimpdahood.mxj.max.ClassName] and it should work. What you're *wanting* to do is lose the package prefix from the class name, and as far as I know there's no way to do this: pointing into a class file directory is not going to work, since it'll violate the package heirarchy. Since MXJ doesn't have any kind of "import" construct, your only choices are (i) stick with the full package names in the MXJ objects (which is what I do: I quite like them being explicit and compartmentalised) or (ii) create your top-level MXJ objects without packages (which I think is rather a bad idea since it'll lead to the kind of namespace pollution currently suffered by the rest of the Max world). As a compromise, use a shorter package path for the actual MXJ wrappers. -- N. nick rothwell -- composition, systems, performance -- http:// www.cassiel.com From c.veit at inode.at Wed Sep 26 12:10:45 2007 From: c.veit at inode.at (Christian Veit) Date: Wed Sep 26 12:10:58 2007 Subject: [java-dev] Re: Re: Re: Re: Re: could not load class ... In-Reply-To: <8DBAA1DB-5CA4-4F65-87C4-90C94DEA5CDE@cassiel.com> Message-ID: <1c668.46faa0a5@www.cycling74.com> oh big thanks.. with full qualified package names it works fine.. regards Christian From c.veit at inode.at Wed Sep 26 13:28:50 2007 From: c.veit at inode.at (Christian Veit) Date: Wed Sep 26 13:28:51 2007 Subject: [java-dev] caching javaclasses? Message-ID: <1c674.46fab2f1@www.cycling74.com> here's my next newbie problem.. i have a java class written in eclipse and call it with my mxj object.. it works fine.. but after i have done some modifications in my class they aren't visible in max.. only after restarting max the changes are visible.. in the WritingMaxExternalsInJava.pdf is written: "There's no need to quit and restart Max if you want to change one line of code in the external object you're developing" that should be the regular behavior.. or not?? if i try to open the class with mxj quickie.. the class is decompiling.. and now thats the strange thing.. my changes are written in the code.. if i compile it again with mxj quickie the object is working with the modifications... so there is another thread in the java forum people there said that eclipse isn't compiling well.. but in my case it is.. so class is compiled but not refreshed.. is there any caching mechanism or maybe i only have to define something in max.java.config.txt.. From c74-mailinglists at e--j.com Wed Sep 26 14:39:16 2007 From: c74-mailinglists at e--j.com (Emmanuel Jourdan) Date: Wed Sep 26 14:39:24 2007 Subject: [java-dev] caching javaclasses? In-Reply-To: <1c674.46fab2f1@www.cycling74.com> References: <1c674.46fab2f1@www.cycling74.com> Message-ID: On 26 sept. 07, at 21:28, Christian Veit wrote: > i have a java class written in eclipse and call it with my mxj > object.. it works fine.. but after i have done some modifications > in my class they aren't visible in max.. only after restarting max > the changes are visible.. in the WritingMaxExternalsInJava.pdf is > written: "There's no need to quit and restart Max if you want to > change one line of code in the external object you're developing" > that should be the regular behavior.. or not?? if i try to open the > class with mxj quickie.. the class is decompiling.. and now thats > the strange thing.. my changes are written in the code.. if i > compile it again with mxj quickie the object is working with the > modifications... so there is another thread in the java forum > people there said that eclipse isn't compiling well.. but in my > case it is.. so class is compiled but not refreshed.. is there any > caching mechanism or maybe i only have to define something in > max.java.config.txt.. I remember having some issues with more than one class in a java file. Is that you're case? ej From c.veit at inode.at Thu Sep 27 10:36:11 2007 From: c.veit at inode.at (Christian Veit) Date: Thu Sep 27 10:36:13 2007 Subject: [java-dev] Re: caching javaclasses? In-Reply-To: Message-ID: <1c6c7.46fbdbfb@www.cycling74.com> no i have only one simple class in the java file.. regards Christian From topher at topher.com Thu Sep 27 11:19:39 2007 From: topher at topher.com (topher lafata) Date: Thu Sep 27 11:19:43 2007 Subject: [java-dev] Re: caching javaclasses? In-Reply-To: <1c6c7.46fbdbfb@www.cycling74.com> References: <1c6c7.46fbdbfb@www.cycling74.com> Message-ID: <311E7DD4-7839-45EC-B1D4-816090296C01@topher.com> try sending the zap message to your mxj instance and option drag it to create a new one or re-type the name in the box. t On Sep 27, 2007, at 09:36 AM, Christian Veit wrote: > > no i have only one simple class in the java file.. > > regards > Christian > _______________________________________________ > java-dev mailing list > java-dev@cycling74.com > http://www.cycling74.com/mailman/listinfo/java-dev From c.veit at inode.at Thu Sep 27 12:29:46 2007 From: c.veit at inode.at (Christian Veit) Date: Thu Sep 27 12:29:48 2007 Subject: [java-dev] Re: Re: caching javaclasses? In-Reply-To: <311E7DD4-7839-45EC-B1D4-816090296C01@topher.com> Message-ID: <1c6d2.46fbf69a@www.cycling74.com> > try sending the zap message to your mxj instance and option drag it > to create a new one it seems that the zap message doesn't work in my case.. > or re-type the name in the box. re-typing the name works good.. but a bit onerously.. thanks for help! From c74-mailinglists at e--j.com Thu Sep 27 13:24:43 2007 From: c74-mailinglists at e--j.com (Emmanuel Jourdan) Date: Thu Sep 27 13:24:58 2007 Subject: [java-dev] Re: Re: caching javaclasses? In-Reply-To: <1c6d2.46fbf69a@www.cycling74.com> References: <1c6d2.46fbf69a@www.cycling74.com> Message-ID: On 27 sept. 07, at 20:29, Christian Veit wrote: >> try sending the zap message to your mxj instance and option drag it >> to create a new one > > it seems that the zap message doesn't work in my case.. > >> or re-type the name in the box. > re-typing the name works good.. but a bit onerously... In fact that's how it's supposed to work, I thought you were doing that already. It's different than in JS where the autowatch makes an auto reload process, which cannot be done for the mxj object which load a java class on instantiation. ej From c.veit at inode.at Thu Sep 27 13:43:59 2007 From: c.veit at inode.at (Christian Veit) Date: Thu Sep 27 13:44:01 2007 Subject: [java-dev] Re: Re: Re: caching javaclasses? In-Reply-To: Message-ID: <1c6d6.46fc07ff@www.cycling74.com> > In fact that's how it's supposed to work, I thought you were doing > that already. It's different than in JS where the autowatch makes an > auto reload process, which cannot be done for the mxj object which > load a java class on instantiation. > alright.. yes i've tried it before also with renaming the mxj object but i think the problem was that i had called a bail() method in my constructor.. i think that was the reason why the reinstanciation hadn't worked... ch. From topher at topher.com Thu Sep 27 16:27:52 2007 From: topher at topher.com (topher lafata) Date: Thu Sep 27 16:28:02 2007 Subject: [java-dev] Re: Re: caching javaclasses? In-Reply-To: <1c6d2.46fbf69a@www.cycling74.com> References: <1c6d2.46fbf69a@www.cycling74.com> Message-ID: <976C3104-F032-40C1-85DB-E2439579BBB3@topher.com> On Sep 27, 2007, at 11:29 AM, Christian Veit wrote: > > >> try sending the zap message to your mxj instance and option drag it >> to create a new one > > it seems that the zap message doesn't work in my case.. > if you send zap and then option drag on the instance the new one you created should have the new version of the class. i forget if zap has to be enabled via max java config. t From mattijs at smadsteck.nl Sat Sep 29 10:02:56 2007 From: mattijs at smadsteck.nl (Mattijs Kneppers) Date: Sat Sep 29 10:02:59 2007 Subject: [java-dev] Re: experience with stockwatch anyone? In-Reply-To: <1c736.46fd5153@www.cycling74.com> Message-ID: <1c77c.46fe7730@www.cycling74.com> moved this topic to the Java forum, please reply to the Java list. -- SmadSteck - http://www.smadsteck.nl Hard- and software for interactive audiovisual sampling From nick at cassiel.com Sun Sep 30 02:01:11 2007 From: nick at cassiel.com (Nick Rothwell) Date: Sun Sep 30 02:00:24 2007 Subject: [java-dev] Re: Re: caching javaclasses? In-Reply-To: <1c6d2.46fbf69a@www.cycling74.com> References: <1c6d2.46fbf69a@www.cycling74.com> Message-ID: On 27 Sep 2007, at 19:29, Christian Veit wrote: >> or re-type the name in the box. > re-typing the name works good.. but a bit onerously.. You can do a bit of scripting to remove and reinstantiate the mxj object which contains your code, so that you can least reload everything from a button. (You'll need to name the upstream and downstream objects in order to reconnect them.) -- N. nick rothwell -- composition, systems, performance -- http:// www.cassiel.com From c.veit at inode.at Sun Sep 30 13:55:02 2007 From: c.veit at inode.at (Christian Veit) Date: Sun Sep 30 13:55:04 2007 Subject: [java-dev] Re: Re: Re: caching javaclasses? In-Reply-To: Message-ID: <1c7eb.46ffff15@www.cycling74.com> > You can do a bit of scripting to remove and reinstantiate the mxj > object which contains your code, so that you can least reload > everything from a button. (You'll need to name the upstream and > downstream objects in order to reconnect them.) thanks for that hint.. so i've tried at the moment to remove and reinstantiate the mxj.. it works fine.. now i should reconnect the mxj with the other objects.. should be no problem if i know the connections.. there are two possibilities i could code it into my reconnect mxj.. but the way i would like to prefer is that my reconnect mxj is watching which connections are existing to my reinstantiating mxj.. i would save the connections and remove the object.. the reconnection should only read the saved values, so i could use the reconnect mxj in many cases.. only the name of the object and the classname have to be defined the rest should be done with the reconnect mxj.. so is there a way to find out to which other objects in the patch at which inlets or outlets they are connected.. i didn't found something about that in the java-doc.. so i expect that it is impossible or not? c. From c74-mailinglists at e--j.com Sun Sep 30 14:29:44 2007 From: c74-mailinglists at e--j.com (Emmanuel Jourdan) Date: Sun Sep 30 14:29:55 2007 Subject: [java-dev] Re: Re: Re: caching javaclasses? In-Reply-To: <1c7eb.46ffff15@www.cycling74.com> References: <1c7eb.46ffff15@www.cycling74.com> Message-ID: <4A354239-E6AC-4BDA-B681-D4ED21CD9088@e--j.com> On 30 sept. 07, at 21:55, Christian Veit wrote: > so is there a way to find out to which other objects in the patch > at which inlets or outlets they are connected.. i didn't found > something about that in the java-doc.. so i expect that it is > impossible or not? AFAIK, there's no way to know that. I'd recommend the David Z. trick: delete the object, then Undo? All your connections will be back, and it recreates the object so your class will be reloaded. ej