Difference between revisions of "Solo: a framework to help write large Matlab programs with GUIs"

From Bcontrol
(New page: == Solo core functions – User’s guide == === Overview === The Solo core functions are a set of Matlab routines designed to assist in the building of complex user interfaces. We will ...)
(moved article)
(13 intermediate revisions by 2 users not shown)
Line 1: Line 1:
== Solo core functions – User’s guide ==
# REDIRECT [[Solo]]
=== Overview ===
The Solo core functions are a set of Matlab routines designed to assist in the building of complex user interfaces. We will principally use them in the context of writing control protocols for behavior and electrophysiology, but they could be used for other interfaces as well.
In a complex interface, one usually has many parameters that are controllable through user-interface graphics objects – for example, menus, pushbuttons, editable fields, etc. Sometimes there are so many of these that keeping track of all of them conflicts with a different, but highly desirable aspect of programming: compartmentalization. When writing a large program, keeping different parts of it separate from each other is an enormously useful way of breaking the problem down into manageable chunks. Typically, one bases the program on many small functions, each of which keeps its internal variables private and secret from the others. That way, each of the small functions can be cleanly and completely debugged, quite separately from the others.
So, how do we separate variables that might all have values determined by objects in the same graphics window? The Solo core functions are designed to address this problem.
In addition, (1) Solo core functions implement a functionality available in Exper: having variables internal to a program whose value is automatically tied to graphics interface objects. (2) Solo further enhances that functionality by using Matlab object-oriented programming to allow a syntax that is easier to read and write than the one available in Exper. (3) Solo allows passing variables by reference, in either read/write or read-only modes, a functionality otherwise unavailable in Matlab.
1 Overview 1
2 SoloParamHandles : variables by reference 3
3 Operator syntax 5
4 Subscript syntax 6
4.1 Cell subscripts 6
4.2 Matrix subscripts 7
5 GUI SoloParamHandles 8
5.1 Menus 8
5.1.1 Optional parameters common to all graphics SoloParamHandle types: ‘position’ and ‘TooltipString’. 9
5.1.2 MenuParam() shortcut function 10
5.2 Numerical edit fields 11
5.3 String edit fields 11
5.4 Display params 12
5.5 Headers 12
5.6 Subheaders 12
5.7 Toggle buttons 12
5.8 Pushbuttons 12
5.9 Sliders 13
5.10 Logarithmic sliders 13
6 SoloParamHandle callbacks 13
7 SoloParamHandle scope 15
7.1 By default, SoloParamHandles are local and persistent 16
7.2 Passing SoloParamHandles read/write and read-only 18
7.3 Global SoloParamHandles 18
7.4 Shit, I can’t find my SoloParamHandle! How can I grab it? 19
8 Saving and loading SoloParamHandles 20
9 Autosetting 20

Latest revision as of 16:05, 12 June 2007

  1. REDIRECT Solo