bug-gnustep
[Top][All Lists]
Advanced

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

[patch #6286] NSBezierPath encode/decode improperly implemented


From: Christopher Wojno
Subject: [patch #6286] NSBezierPath encode/decode improperly implemented
Date: Tue, 27 Nov 2007 06:43:30 +0000
User-agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.8.1.9) Gecko/20071117 Firefox/2.0.0.9

URL:
  <http://savannah.gnu.org/patch/?6286>

                 Summary: NSBezierPath encode/decode improperly implemented
                 Project: GNUstep
            Submitted by: wojno
            Submitted on: Tuesday 11/27/2007 at 06:43
                Category: AppKit
                Priority: 7 - High
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

NSBezierPath, as implemnted, will yield the following error message on
archive/unarchive:

Exception: Uncaught exception NSInvalidArgumentException, reason:
-[NSKeyedArchiver encodeValueOfObjCType:at:]: this archiver cannot e encode
structs
Abort (core dumped)

Upon inspection of the source, I discovered @encode(NSBezierPathElement)
(which compiles to a struct) was used instead of @encode(enum
NSBezierPathElement) (enum is an Obj-C primitive) and made the corrections.
While I was there, I fixed the NSPoint elements to use the encode/decodePoint
as well. No doubt, these would have also caused the Exception to occur.

Tested very quickly. NSBezierPath can now be archived and unarchived.



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Tuesday 11/27/2007 at 06:43  Name:
gnustep-gui-nsbezierpath-encode-fix.patch  Size: 3kB   By: wojno

<http://savannah.gnu.org/patch/download.php?file_id=14490>

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/patch/?6286>

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





reply via email to

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