Path: news.mathworks.com!newsfeed-00.mathworks.com!oleane.net!oleane!nerim.net!usenet-fr.net!de-l.enfer-du-nord.net!news.mixmin.net!eweka.nl!hq-usenetpeers.eweka.nl!cyclone03.ams2.highwinds-media.com!news.highwinds-media.com!npeersf02.ams.highwinds-media.com!newsfe21.ams2.POSTED!7564ea0f!not-for-mail
Sender:  <tristram@cow.quantmodels.co.uk>
From: tristram.scott@ntlworld.com (Tristram Scott)
Subject: Re: Calling Matlab from Java
Newsgroups: comp.soft-sys.matlab
References: <h87tev$18l$1@fred.mathworks.com> <25d774c7-0b3a-4822-88c4-82269abb04f6@x38g2000yqb.googlegroups.com> <h8a5u9$mcm$1@fred.mathworks.com>
User-Agent: tin/1.7.7-20041215 ("Scalpay") (UNIX) (SunOS/5.10 (i86pc))
Lines: 36
Message-ID: <695qm.92010$Lm6.79862@newsfe21.ams2>
NNTP-Posting-Host: 82.6.102.58
X-Complaints-To: http://netreport.virginmedia.com
X-Trace: newsfe21.ams2 1252581058 82.6.102.58 (Thu, 10 Sep 2009 11:10:58 UTC)
NNTP-Posting-Date: Thu, 10 Sep 2009 11:10:58 UTC
Organization: virginmedia.com
Date: Thu, 10 Sep 2009 11:10:58 GMT
Xref: news.mathworks.com comp.soft-sys.matlab:569508


Stephan Larws <stephan.larws@iav.de> wrote:
> Rune Allnor <allnor@tele.ntnu.no> wrote in message <25d774c7-0b3a-4822-88c4-82269abb04f6@x38g2000yqb.googlegroups.com>...
>> Don't know if there are limitations, but there is at least
>> ample opportunity for trouble if you start mixing a matlab
>> GUI engine with an already existing GUI.
>> 
>> Use java for the GUI and leave the matlab engine to deal
>> with computations.
>> 
>> Rune
> 
> Hi Rune,
> 
> thank you for your fast response. Normally I would do everything like you
> said, but my problem is, that these matlab scripts are already existing and
> they include the GUI and quite a bit of other code so rewriting everything
> would be my last resort. And unfortunately GUI code and program code are
> really tangled up :(. It seems that only calling GUIs that were made with
> GUIDE are problematic. It would be nice to know if anyone has a similar
> problem.

As you say, your problem is that the code for the GUI is tangled up with
the code for the computations.  Even if you have already found a way around
this, I would urge you to spend half an hour separating the gui code from
the funcional code.  It makes life simpler for everyone.

If you do choose to use Guide to create your GUIs, make a point of adding
as few lines of code as possible to the automatically generated code that
Guide produces.  Keep you own code away from what Guide produces, and that
way you can keep Guide away from your code.  There have been many postings
on this newsgroup relating sad stories of Guide not working well across
different MATLAB releases.

-- 
Dr Tristram J. Scott               
Energy Consultant