update PlatformWindows test (use the slider to play with the titles)

This commit is contained in:
Antoine Mercadal committed 2011-08-31 19:17:41 +02:00
1 parent 28772d3254
commit a5e241afd7
1 file changed
+14 -2
+14 -2
View File
@@ -39,9 +39,16 @@
// [platformWindow orderFront:self];//console.log(CPStringFromRect([theWindow contentRectForFrameRect:[theWindow frame]]));
[platformWindow setContentRect:[theWindow contentRectForFrameRect:[theWindow frame]]];
// [theWindow setTitle:@"My Custom Title"];
//[platformWindow orderFront:self];
// seriously, this test file is dirty :)
var slider = [[theWindow contentView] subviews][0];
[slider setTarget:self];
[slider setAction:@selector(randomTitle:)];
[slider setContinuous:NO];
window.setTimeout(function(){
[theWindow orderOut:self];
[theWindow setPlatformWindow:platformWindow];
@@ -75,4 +82,9 @@ window.setTimeout(function(){
[platformWindow orderFront:self];
}
- (IBAction)randomTitle:(id)aSender
{
[theWindow setTitle:@"Window random number " + Math.random(1000)]
}
@end