MATLAB SIMULINK 7 - GRAPHICAL USER INTERFACE Guide de l'utilisateur Page 639

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 759
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 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
Vue de la page 638
1 2 ... 634 635 636 637 638 639 640 641 642 643 644 ... 758 759

Commentaires sur ces manuels

Pas de commentaire