supernova: fix for small audio vector sizes
[supercollider.git] / examples / CocoaBridge / notification.scd
blob861e5f514a677db7d005df0ee7cf38a03b2c08d0
2 // blackrain
3 c = SCNSObject("NSNotificationCenter", "defaultCenter");
4 o = SCNSObject("NSObject", "init", []);
7 // SCNSObject.registerNotification(notificationName, func, obj=this);
8 o.registerNotification('MyNotification', { arg notificationName, nsNotification, nsObj;
9         var notification;
10          notification = nsNotification.asNSReturn;
11         [notificationName, notification.className, nsObj.asNSReturn.invoke("hash")].postln;
12 }, nil);
15 o.invoke("hash");
16 c.invoke("postNotificationName:object:", ["MyNotification", o], true);
18 d = SCNSObject("NSObject", "init", []);
19 d.invoke("hash");
20 c.invoke("postNotificationName:object:", ["MyNotification", d], true);
22 [o, c, d].do(_.release);
24 SCNSObject.dumpPool;
26 SCNSObject.freePool;