How to delete unwanted events

Started by ScottBolton · 2015-12-01 14:28 UTC · 2 replies · SMF topic #2339

In my Splash exercise I create a c:splash/Form1#OnTimer event. Once my splash screen has disappeared that function is still available - how do I remove it?
Hi, in modal forms I place the events in the private symbol list of the defun:
(defun c:mytest (/ c:splash/Form1#OnTimer) ... )

In modeless forms you can set the symbols to nil manually.
(setq c:splash/Form1#OnTimer nil)

Regards, Fred
Hi Fred.  I'd tried both methods but get the message ; error: no function definition: C:SPLASH/FORM1#ONTIMER.

My modeless code is:

(dcl-Project-Load "splash.odcl" nil)
(dcl-Form-Show splash/Form1)
(dcl-Form-StartTimer splash/Form1 5000)
(defun c:splash/Form1#OnTimer ()
  (dcl-Project-Unload "splash" T)
  (princ)
  )

Presumably I'm setting c:splash/Form1#OnTimer to nil before the 5 seconds has elapsed.