User talk:College

From AwkwardTV
Jump to: navigation, search

College

You said on another page that you had some code to activate the keyboard in ATV.... If possible could you deposit it somewhere? I'm still trying to learn the ins & outs of plugin design and structure but I'm sure at some point that code could come in handy... :)

Thanks!

Dave


Dave - it should be something like this....My Cocoa skills ain't that great yet. But I did manage to get the TextEntry item to appear. However the problem I ran into was navigating the letters. I could move my selection left and right, but couldn't move down to the next row of letters. Mind you I didn't try very hard with the code. I was just experimenting with various controls.

#import "MyMenuController.h"

@implementation MyMenuController : BRMenuController

-(id)initWithScene:(id)scene {
	[super initWithScene:scene];
	[self setListTitle:@"Utilities"];
	[self setApplianceIcon:[NSImage imageNamed:@"ApplianceIcon.png"]];

	BRTextEntryControl *textentry = [[[BRTextEntryControl alloc] initWithScene:scene] autorelease];
	[textentry setInitialText:@"Initial Text Goes Here"];

	id item = [BRTextMenuItemLayer menuItemWithScene:scene];
	[item setTitle:@"Text Entry"];
	[item addControl:textentry];

	[[self list] addObject:item];
	
	return self;
}

@end

College - thanks a bunch! Not that my cocoa skills are anything (rudimentary at best) but if I do stumble on something I'll make sure I post it here. Dave