bug-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

orderOut: is orderOut: is orderOut:


From: Pascal Bourguignon
Subject: orderOut: is orderOut: is orderOut:
Date: Sat, 12 Jan 2002 12:50:42 +0100 (CET)

Well,  this  is  a  problem  related  to  activate/deactivate  of  the
application and the hidding/recovering of the panels too.

With latest GNUstep from cvs and Window Maker 0.80.1.


First problem is:

   - launch a GNUstep application.

   - before the menu appears, activate another X window (an xterm for example).

   The  problem  is that  the  menu  of  the GNUstep  application  the
   appears.   It  should  not  because another  application  has  been
   activated (xterm) between the launch and the building of the menu.


More funny:

   - launch a GNUstep application.

   - wait for it to be completly launched, with its menu on the screen
     and one window.

   - launch another GNUstep application.

   - before the menu appears, activate the window of the first application.

   Now we have the menus of both GNUstep applications on the screen!

   - activate another X window (an xterm for example).

   Only the menu of the first GNUstep application disappears.


Now, the real problems:


  NSLog(@"[confirmPanel makeKeyAndOrderFront:self]\n");
  [confirmPanel makeKeyAndOrderFront:self];
  NSLog(@"if([[NSApplication 
sharedApplication]runModalForWindow:confirmPanel]){\n");
  if([[NSApplication sharedApplication]runModalForWindow:confirmPanel]){
      NSLog(@"YES --> [confirmPanel orderOut:self]\n");
      [confirmPanel orderOut:self];
      // ...
      return(YES);
  }else{
      NSLog(@"NO  --> [confirmPanel orderOut:self]\n");
      [confirmPanel orderOut:self];
      // ...
      return(NO); 
  }

confirmPanel is created with:

  confirmPanel=[[NSPanel alloc]
                        initWithContentRect:NSOffsetRect(panelFrame,20.0,50.0)
                        styleMask:NSTitledWindowMask|NSResizableWindowMask
                        backing:NSBackingStoreBuffered
                    defer:NO];
  [confirmPanel setDelegate:self];
  [confirmPanel setTitle:@"MapTree Parameters Confirmation"];
  [confirmPanel setMinSize:panelFrame.size];
And a set of:
  [[confirmPanel contentView]addSubview:subView];



    - while in the runModalForWindow:  loop, activate another X window
      (for example an xterm).

      The modal panel and the menu of the GNUstep application disappear.

    - move the  cursor without  clicking over the  main window  of the
      GNUstep application.

      The panel is made visible (makeKeyAndOrderFront:) again! (not the menu).

    - click on the  main window or the key panel  (the xterm window is
      correctly deactivated), but the  menu of the GNUstep application
      does not appear.

    - double-click on the panel content, the menu appears.


Now,  there are  cases less  frequently reproducibles,  where  one can
click  on   a  Ok   or  Cancel  button   on  the  panel   (invoking  a
[[NSApplication  sharedApplication]stopModalWithCode:1];  ), then  the
panel is orderedOut and when the application is reactivated, the panel
is show again, of course outside of any modal loop.

 
-- 
__Pascal_Bourguignon__              (o_ Software patents are endangering
()  ASCII ribbon against html email //\ the computer industry all around
/\  and Microsoft attachments.      V_/ the world http://lpf.ai.mit.edu/
1962:DO20I=1.100  2001:my($f)=`fortune`;  http://petition.eurolinux.org/

-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCS/IT d? s++:++(+++)>++ a C+++  UB+++L++++$S+X++++>$ P- L+++ E++ W++
N++ o-- K- w------ O- M++$ V PS+E++ Y++ PGP++ t+ 5? X+ R !tv b++(+)
DI+++ D++ G++ e+++ h+(++) r? y---? UF++++
------END GEEK CODE BLOCK------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]