21 - (id) initWithFrame:(NSRect)frameRect frameName:(NSString *)frameName groupName:(NSString *)groupName {
22 self = [
super initWithFrame:frameRect frameName:frameName groupName:groupName];
33 [loadedString release];
37 #pragma mark Special Methods
39 -(void) setStringValue:(NSString*)value BasePath:(NSString*)base {
45 NSString *basePath = base;
47 basePath = [[NSBundle mainBundle] resourcePath];
48 if (!basePath) basePath = [[[NSBundle mainBundle] bundlePath] stringByDeletingLastPathComponent];
50 NSURL *baseURL = [NSURL fileURLWithPath:basePath];
53 NSRange htmlRange = [value rangeOfString:@"<html>"];
54 if (htmlRange.location != NSNotFound) {
55 NSRange endHtmlRange = [value rangeOfString:@"</html>"];
56 if (endHtmlRange.location != NSNotFound) {
57 NSString *stringToUse =
@"";
58 NSRange useRange = NSUnionRange(htmlRange, endHtmlRange);
59 stringToUse = [value substringWithRange:useRange];
60 [[
self mainFrame] loadHTMLString:stringToUse baseURL:baseURL];
64 [[
self mainFrame] loadHTMLString:value baseURL:baseURL];
74 -(void) setStringValue:(NSString*)value {
82 #pragma mark Protocoll Methods
85 return NSMakeSize(30.0, 30.0);
96 - (void)setFrame:(NSRect)frameRect {
97 if (frameRect.size.width < 0.0) frameRect.size.width = 0.0;
98 if (frameRect.size.height < 0.0) frameRect.size.height = 0.0;
99 [
super setFrame:frameRect];