Hello, I'm new here. I have a problem.
I have two window, main window, and another window call NSWindow *cargaCaracteristicasHormigon; when I would like to see them, press a bottom there, and it's no problem: -(IBAction)showCaracteristicasHormigonSheet:(id)sender{ if (piezaSeleccionada>-1) { float f; int i=0; for(Hormigon *h in armadoPrincipal.geometriaPrincipal.claseDeHormigon) { if (i==piezaSeleccionada) { f=h.fck; } i++; } [fckString setFloatValue:f]; [NSApp beginSheet:cargaCaracteristicasHormigon modalForWindow:[inPinta window] modalDelegate:nil didEndSelector:NULL contextInfo:NULL]; } } this is ok. but when I would like to get this window make a click in a view I have the follow error: 2009-12-23 00:08:10.482 Secciones[1682:a0f] *** Assertion failure in -[NSApplication _commonBeginModalSessionForWindow:relativeToWindow:modalDelegate:didEndSelector:contextInfo:], /SourceCache/AppKit/AppKit-1038.25/AppKit.subproj/NSApplication.m:3100 2009-12-23 00:08:10.483 Secciones[1682:a0f] Modal session requires modal window the code that I try is this: -(void)mouseDown:(NSEvent *)theEvent{ if (pintarRectangulo) { if (inicio) { path=[[NSBezierPath alloc] init]; puntoInicial=[theEvent locationInWindow]; [path moveToPoint:[theEvent locationInWindow]]; inicio=!inicio; }else { puntoFinal=[theEvent locationInWindow]; [path lineToPoint:NSMakePoint(puntoFinal.x, puntoInicial.y)]; [path lineToPoint:puntoFinal]; [path lineToPoint:NSMakePoint(puntoInicial.x, puntoFinal.y)]; [path lineToPoint:puntoInicial]; inicio=true; Hormigon *h=[[Hormigon alloc] initWithFck:30.0]; NSString *s=[[NSString alloc] init]; s=@"pieza"; [NSApp beginSheet:cargaCaracteristicasHormigon modalForWindow:[inPinta window] modalDelegate:nil didEndSelector:NULL contextInfo:NULL]; [armadoPrincipal.geometriaPrincipal addGeometria:path tipoDeGeometria:s claseDeHormigon:h]; pintarRectangulo=!pintarRectangulo; } }else { piezaSeleccionada=rectanguloSeleccionado; } [self setNeedsDisplay:YES]; } Could help me anybody?, Please._______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com