mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-11-07 15:43:16 +00:00
Make CPBundle post a notification on successfull load
This commit is contained in:
1 parent
8a75c9078e
commit
57c691c2e2
1 file changed
+7
@@ -22,8 +22,12 @@
|
||||
|
||||
@import "CPDictionary.j"
|
||||
@import "CPObject.j"
|
||||
@import "CPNotification.j"
|
||||
@import "CPNotificationCenter.j"
|
||||
|
||||
|
||||
CPBundleDidLoadNotification = "CPBundleDidLoadNotification";
|
||||
|
||||
/*!
|
||||
@class CPBundle
|
||||
@ingroup foundation
|
||||
@@ -150,6 +154,9 @@ var CPBundlesForURLStrings = { };
|
||||
_bundle.addEventListener("load", function()
|
||||
{
|
||||
[_delegate bundleDidFinishLoading:self];
|
||||
// userInfo should contain a list of all classes loaded from this bundle. When writing this there
|
||||
// seems to be no efficient way to get it though.
|
||||
[[CPNotificationCenter defaultCenter] postNotificationName:CPBundleDidLoadNotification object:self userInfo:nil];
|
||||
});
|
||||
|
||||
_bundle.addEventListener("error", function()
|
||||
|
||||
Reference in new issue
Block a user