Add methods needed to add resources

This commit is contained in:
Gregory John Casamento 2023-10-23 07:37:12 -04:00
parent 01e46d5c6a
commit 839883b74e
2 changed files with 31 additions and 0 deletions

View file

@ -954,6 +954,35 @@
[cm removeClassNamed: className];
}
// Add resources...
- (void) addResource: (NSDictionary *)dict
{
NSString *type = [dict objectForKey: @"type"];
}
- (void) deleteResource: (NSDictionary *)dict
{
NSString *type = [dict objectForKey: @"type"];
}
- (void) handleResourceNotificaton: (NSNotification *)notification
{
NSDictionary *dict = [notification userInfo];
NSString *name = [notification name];
if ([name isEqualToString: @"PBAddedResourceNotification"])
{
[self addResource: dict];
}
else if ([name isEqualToString: @"PBDeletedResourceNotification"])
{
[self deleteResource: dict];
}
}
// Handle exception...
- (void) exceptionWhileLoadingModel: (NSString *)errorMessage
{
NSRunAlertPanel(_(@"Exception"),

View file

@ -23,8 +23,10 @@
#define INCLUDED_GormServer_h
@protocol GormServer
- (void) addClass: (NSDictionary *)dict;
- (void) deleteClass: (NSString *)className;
@end
#endif