Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Programmatic GUI
Date: Wed, 30 Sep 2009 18:24:02 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 5
Message-ID: <ha07o2$amv$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1254335042 10975 172.30.248.35 (30 Sep 2009 18:24:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Wed, 30 Sep 2009 18:24:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 2001972
Xref: news.mathworks.com comp.soft-sys.matlab:574034


So when one creates a GUI using GUIDE the handle structure is already created and allows the user to add in any variables he should wish and they will be passed from function to function without issue.

What is the best way to accomplish this in a programmaticaly created GUI (aka without guide). I am aware that global variables would be an option but this seems like a messy way to do things. There is also the option of nested functions that would seem to accomplish the task as well. 

I guess I'm asking what is the best or most commonly accepted practice to accomplish the task of data sharing among functions in a programmaticaly created GUI? Could I implement a handle structure, like that used in guide, that would take user created variables, and how might that be accomplished? Are there any good tutorials out there on programmaticaly created GUIs? Thanks for the reply.