MATLAB SIMULINK 7 - GRAPHICAL USER INTERFACE Betriebsanweisung Seite 639

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 759
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 638
Share Data Among a GUI’s Callbacks
Share Data Among a GUI’s Callbacks
In this section...
“Share Data with Nested Functions” on page 13-11
“Share Data with UserData” on page 13-15
“Share Data with Application Data” on page 13-18
“Share Data with GUI Data” on page 13-21
The following four sections each contain complete code for example G UIs
that you can copy to code files and run. For general information about these
methods, see “Ways to Manage Data in a Programmatic GUI” on page 13-2.
Share Data with Nested Functions
You can use GUI data, application data, and the UserData property to share
data among a GUI’s callbacks. In many cases, nested functions enable you to
share data among callbacks without using the other data forms.
Nested Functions Example: Passing Data Between Components
This example uses a GUI that contains a slider and an edit text component. A
static text component instructs the user to enter a value in the edit text or
click the slider. The example initializes and maintains an error counter, as
well as the old and new values of the slider, in a nested functions environment.
13-11
Seitenansicht 638
1 2 ... 634 635 636 637 638 639 640 641 642 643 644 ... 758 759

Kommentare zu diesen Handbüchern

Keine Kommentare