bug-gnustep
[Top][All Lists]
Advanced

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

[bug #31311] saving .nib file from .gorm seems to work, but it does not


From: Lucas Schnorr
Subject: [bug #31311] saving .nib file from .gorm seems to work, but it does not
Date: Tue, 12 Oct 2010 11:44:23 +0000
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.10) Gecko/20100915 Ubuntu/10.04 (lucid) Firefox/3.6.10

URL:
  <http://savannah.gnu.org/bugs/?31311>

                 Summary: saving .nib file from .gorm seems to work, but it
does not
                 Project: GNUstep
            Submitted by: schnorr
            Submitted on: Tue 12 Oct 2010 11:44:22 AM GMT
                Category: Gorm
                Severity: 3 - Normal
              Item Group: Bug
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

Using Gorm 1.2.12

I tried to convert a gorm project (one window only) into a .nib directory
using "save as" in the menu and selection "Cocoa nib" as file type. It turns
out that for a given .gorm file, everything works smoothly after clicking ok,
but the .nib file is not created.

I used gdb to track down the reason of such unexpected behavior, and it seems
it is coming from the implementation of the method - - (NSArray *)
[GormNibWrapperBuilder openItems], implemented in file
./Plugins/Nib/GormNibWrapperBuilder.m:300.

There is a loop using the enumerate:
 while((obj = [en nextObject]) != nil)
    {
      if([obj isVisible])
  {
    NSNumber *windowOid = NSMapGet(oids, obj);
    [openItems addObject: windowOid];
  }
    }

The problem is that NSMapGet returns a nil, causing an exception that is
silently catched somewhere when adding the nil pointer to the openItems array.
I did not figure out why NSMapGet returned null, but here is what I have with
a breakpoint just after the NSMapGet:

Breakpoint 1, -[GormNibWrapperBuilder openItems] (self=0x9bdb10, 
    _cmd=0x7fffee7c4500) at GormNibWrapperBuilder.m:315
315               [openItems addObject: windowOid];
(gdb) p windowOid
$2 = (struct NSNumber *) 0x0
(gdb) po [obj class]
GormNSWindow
(gdb) p [obj isVisible]
$4 = 1 '\001'
(gdb) po oids
<NSConcreteMapTable: 0x8e31a0>

Commenting the line that adds windowOid to openItems
solves the problem, but some functionality is lost 
by doing so.

I attached the .gorm file that causes such behavior.



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Tue 12 Oct 2010 11:44:22 AM GMT  Name: TimeInterval.gorm.tar.gz  Size:
4kB   By: schnorr

<http://savannah.gnu.org/bugs/download.php?file_id=21665>

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?31311>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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