Exception 1066 Notification not set for this OID

Forums for specific tips, techniques and example code
Michael.Duraj
Posts: 30
Joined: Fri Jun 17, 2011 12:55 pm

Exception 1066 Notification not set for this OID

Postby Michael.Duraj » Mon Jul 22, 2024 1:11 pm

Hi Is it possible to detect if an endClassNotification(<ClassName>, false, Any_System_Event);

Will throw a Exception 1066 Notification not set for this OID ?

User avatar
BeeJay
Posts: 312
Joined: Tue Jun 30, 2009 2:42 pm
Location: Christchurch, NZ

Re: Exception 1066 Notification not set for this OID

Postby BeeJay » Mon Jul 22, 2024 4:38 pm

Depending on what you're trying to achieve could use either of the following options to avoid a 1066 from being reported to your end users:

1. If it's possible that the beginClassNotification was never executed at the time your code is calling endClassNotification, and that is a valid situation for the code path in question, then arm an exception handler immediately prior to the endClassNotification to trap the 1066 exception and return Ex_Resume_Next from the exception handler. But only do this if it is valid for the beginClassNotification not to have been executed so you don't hide a potential coding bug.

2. If this is in say the unload of a form, to avoid subsequent 1227 notification subscriber not found exceptions, and you're therefore ending all notifications which "may have been armed" during the lifetime of the form, you could code the following which will end all registered notifications for that form without getting a 1066 exception if there are currently no registered notifications:
ㅤㅤ

Code: Select all

self.endNotificationForSubscriber( self );
ㅤㅤ
Cheers,
BeeJay.

Michael.Duraj
Posts: 30
Joined: Fri Jun 17, 2011 12:55 pm

Re: Exception 1066 Notification not set for this OID

Postby Michael.Duraj » Tue Jul 23, 2024 4:42 pm

Thanks BeeJay

Had some performance issues due to an over notification in sysNotifty() and was using causeEvent() and userNotifty() turn on/off (beginClassNotification/endClassNotification) programatically.

I think causeEvent() needs an doWindowEvents(0); after the call... other than a bug I could not see


Return to “Tips and Techniques”

Who is online

Users browsing this forum: No registered users and 14 guests