How to delete unwanted events

Started by ScottBolton, December 01, 2015, 06:28:00 AM

Previous topic - Next topic

ScottBolton

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?

Fred Tomke

Hi, in modal forms I place the events in the private symbol list of the defun:
Code (autolisp) Select
(defun c:mytest (/ c:splash/Form1#OnTimer) ... )

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

Regards, Fred
Fred Tomke
Dipl.-Ing. (FH) Landespflege

[ landscaper - landscape developer - digital landscape and urban design]

ScottBolton

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.