Solution technique à la première personne

  • Note officielle de TMW

Une note technique a été écrite à ce sujet:
Why does the Callback function of a uicontrol object still exist after deleting the object in GUIDE using MATLAB 7.0.4 (R14SP2)?

Bon en gros la réponse c’est:

To work around this issue, you can delete the Callback functions manually.

La suite c’est :

The Callback code is not deleted automatically so that it may be reused for other uicontrols. For example, suppose I have a huge code for a callback function that is called when a PushButton is pressed. Now, suppose I wish to replace the Pushbutton with a checkbox, but have the same implementation of the callback. In such cases, I can assign the callback function to the new uicontrol. Automatically deleting Callback functions could cause valuable code to be deleted.

Lorsque je lis donc ce dernier paragraphe ,là pour le coup je comprends mieux pour quoi en effet ce n’est pas supprimé dans le .m … ça a du sens finalement.

Laisser un commentaire