<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/235558</link>
    <title>MATLAB Central Newsreader - Sharing data between GUIs without using workspace</title>
    <description>Feed for thread: Sharing data between GUIs without using workspace</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2012 by MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Fri, 05 Sep 2008 03:15:03 -0400</pubDate>
      <title>Sharing data between GUIs without using workspace</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/235558#598791</link>
      <author>M.Mohsin Siraj</author>
      <description>Guyz&lt;br&gt;
i wanna know is there any method by which i can exchange my &lt;br&gt;
variables from one GUI to other GUI?&lt;br&gt;
If i use workspace in between, After making the .exe file &lt;br&gt;
of my GUI, how will then it works??&lt;br&gt;
SO any method knidly guide me. plz</description>
    </item>
    <item>
      <pubDate>Fri, 05 Sep 2008 03:22:02 -0400</pubDate>
      <title>Re: Sharing data between GUIs without using workspace</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/235558#598793</link>
      <author>M.Mohsin Siraj</author>
      <description>&quot;M.Mohsin Siraj&quot; &amp;lt;stylismoh@mathworks.com&amp;gt; wrote in message &lt;br&gt;
&amp;lt;g9q87n$kc8$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; Guyz&lt;br&gt;
&amp;gt; i wanna know is there any method by which i can exchange &lt;br&gt;
my &lt;br&gt;
&amp;gt; variables from one GUI to other GUI?&lt;br&gt;
&amp;gt; If i use workspace in between, After making the .exe file &lt;br&gt;
&amp;gt; of my GUI, how will then it works??&lt;br&gt;
&amp;gt; SO any method knidly guide me. plz&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
I am using &quot;Guide&quot; to design the GUI...&lt;br&gt;
&lt;br&gt;
thnx n Regards,</description>
    </item>
    <item>
      <pubDate>Fri, 05 Sep 2008 04:42:04 -0400</pubDate>
      <title>Re: Sharing data between GUIs without using workspace</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/235558#598801</link>
      <author>Walter Roberson</author>
      <description>M.Mohsin Siraj wrote:&lt;br&gt;
&lt;br&gt;
&amp;gt; i wanna know is there any method by which i can exchange my &lt;br&gt;
&amp;gt; variables from one GUI to other GUI?&lt;br&gt;
&amp;gt; If i use workspace in between, After making the .exe file &lt;br&gt;
&amp;gt; of my GUI, how will then it works??&lt;br&gt;
&lt;br&gt;
Do I understand correctly that you plan to be using two&lt;br&gt;
independent .exe files and you want to communicate variables&lt;br&gt;
between them?&lt;br&gt;
&lt;br&gt;
If so then you will have to use I/O to write the values of&lt;br&gt;
the variables out from one and read (a copy of) the values&lt;br&gt;
in the other. You might be able to make the process more&lt;br&gt;
efficient by using memory mapping, but that would be just an&lt;br&gt;
optimization. I don't think you would be able to &quot;share&quot;&lt;br&gt;
variables between the two in the sense that changing the&lt;br&gt;
value of the variable in one of them would automatically&lt;br&gt;
change the value of the variable in the other (though I would&lt;br&gt;
not rule out that possibility -completely-.)&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
-- &lt;br&gt;
Q = quotation(rand);&lt;br&gt;
if isempty(Q); error('Quotation server filesystem problems')&lt;br&gt;
else sprintf('%s',Q), end</description>
    </item>
    <item>
      <pubDate>Fri, 05 Sep 2008 12:10:17 -0400</pubDate>
      <title>Re: Sharing data between GUIs without using workspace</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/235558#598867</link>
      <author>carlos lopez</author>
      <description>Walter Roberson &amp;lt;roberson@hushmail.com&amp;gt; wrote in message &amp;lt;wM2wk.67483$hx.28408@pd7urf3no&amp;gt;...&lt;br&gt;
&lt;br&gt;
&amp;gt; I don't think you would be able to &quot;share&quot;&lt;br&gt;
&amp;gt; variables between the two in the sense that changing the&lt;br&gt;
&amp;gt; value of the variable in one of them would automatically&lt;br&gt;
&amp;gt; change the value of the variable in the other (though I would&lt;br&gt;
&amp;gt; not rule out that possibility -completely-.)&lt;br&gt;
It depends on the underlying OS. I am aware that such mechanism exist at least in LINUX, and one example is the one which allows changing the language environment and it might affect immediately all the (properly coded) applications.&lt;br&gt;
BTW: I do not interpret the request from the user that he plans to connect two different exe applications. IMHO he plans to connect two windows opened by the same application. But I might be wrong..&lt;br&gt;
Regards&lt;br&gt;
Carlos</description>
    </item>
    <item>
      <pubDate>Fri, 05 Sep 2008 15:17:02 -0400</pubDate>
      <title>Re: Sharing data between GUIs without using workspace</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/235558#598906</link>
      <author>Jeremy Smith</author>
      <description>If you're using one GUI which spawns other GUIs then yes, you can use the base workspace.  When I created my GUI I was surprised to find that there is a base workspace but it worked just as if I were in Matlab.  I designed my GUI programmatically so I'm not sure if GUIDE will have any other difficulties.</description>
    </item>
    <item>
      <pubDate>Fri, 05 Sep 2008 16:41:32 -0400</pubDate>
      <title>Re: Sharing data between GUIs without using workspace</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/235558#598921</link>
      <author>Walter Roberson</author>
      <description>carlos lopez wrote:&lt;br&gt;
&amp;gt; Walter Roberson &amp;lt;roberson@hushmail.com&amp;gt; wrote in message &amp;lt;wM2wk.67483$hx.28408@pd7urf3no&amp;gt;...&lt;br&gt;
&lt;br&gt;
&amp;gt;&amp;gt; I don't think you would be able to &quot;share&quot;&lt;br&gt;
&amp;gt;&amp;gt; variables between the two in the sense that changing the&lt;br&gt;
&amp;gt;&amp;gt; value of the variable in one of them would automatically&lt;br&gt;
&amp;gt;&amp;gt; change the value of the variable in the other (though I would&lt;br&gt;
&amp;gt;&amp;gt; not rule out that possibility -completely-.)&lt;br&gt;
&lt;br&gt;
&amp;gt; It depends on the underlying OS. I am aware that such mechanism exist at &lt;br&gt;
&amp;gt; least in LINUX, and one example is the one which allows changing the language &lt;br&gt;
&amp;gt; environment and it might affect immediately all the (properly coded) applications.&lt;br&gt;
&lt;br&gt;
In computer languages such as C, you can have pointer variables that can point&lt;br&gt;
into a shared memory (or memory mapped) block of memory; if multiple processes&lt;br&gt;
share the block, then a change by one of the processes of the content of the&lt;br&gt;
block will affect the other processes &quot;automatically&quot; (provided that in C&lt;br&gt;
or C++ you declared the variables to be 'volatile' so that the compilers do&lt;br&gt;
not rely on a copy of the value they have stuffed into a register and do&lt;br&gt;
not make optimizations that depend upon the value of the variable being&lt;br&gt;
a constant within a loop.)&lt;br&gt;
&lt;br&gt;
But in Matlab, there are no user-level pointers and no commands that I know of&lt;br&gt;
to place variables within shared areas (you would have to disable copy-on-write&lt;br&gt;
for such variables, of course.) You might perhaps be able to do it at the&lt;br&gt;
mex level by requesting an array header and setting its data pointer as&lt;br&gt;
you wanted into the shared area, but that would have problems at least as great&lt;br&gt;
as those that occur when you malloc() space for a variable in C. I believe that&lt;br&gt;
I've read postings from people who say that you can do that if you are careful;&lt;br&gt;
I have never looked at the details myself. I suspect the Matlab routines are not&lt;br&gt;
designed with the expectation that they might be dealing with volatile memory.&lt;br&gt;
&lt;br&gt;
-- &lt;br&gt;
Q = quotation(rand);&lt;br&gt;
if isempty(Q); error('Quotation server filesystem problems')&lt;br&gt;
else sprintf('%s',Q), end</description>
    </item>
  </channel>
</rss>

