mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-11-28 01:12:03 +00:00
update PlatformWindows test (use the slider to play with the titles)
This commit is contained in:
1 parent
28772d3254
commit
a5e241afd7
1 file changed
+14
-2
@@ -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
|
||||
Reference in new issue
Block a user