Problems with adding network nodes to pasteboard #50

Open
marchenkoigor opened this Issue Mar 15, 2012 · 2 comments

Comments

Projects
None yet
2 participants
@marchenkoigor

I recently found some exception in iMedia during drag of image from flicker.
Error log and exceptions are:

2012-03-15 15:55:24.854 iMedia2[72932:c03] Property list invalid for format: 100 (property lists cannot contain objects of type 'CFURL')
2012-03-15 15:55:24.854 iMedia2[72932:c03] Could not write property list with invalid format to the pasteboard.  The object contains non-property list types: NSURL
2012-03-15 15:55:24.856 iMedia2[72932:c03] (
    0   CoreFoundation                      0x9021db67 __raiseError + 231
    1   libobjc.A.dylib                     0x921f6149 objc_exception_throw + 155
    2   AppKit                              0x936c6c68 +[NSPasteboard _convertPropertyListToData:] + 450
    3   AppKit                              0x936c6f10 -[NSPasteboard setPropertyList:forType:] + 44
    4   iMedia                              0x00050335 -[IMBObjectViewController writeItemsAtIndexes:toPasteboard:] + 2085
    5   iMedia                              0x00051184 -[IMBObjectViewController tableView:writeRowsWithIndexes:toPasteboard:] + 132
    6   AppKit                              0x93795a10 -[NSTableView _sendDataSourceWriteDragDataWithIndexes:toPasteboard:] + 100
    7   AppKit                              0x9379627d -[NSTableView _performClassicDragOfIndexes:hitRow:event:] + 196
    8   AppKit                              0x932db597 -[NSTableView _performDragFromMouseDown:] + 591
    9   AppKit                              0x932d9c9d -[NSTableView mouseDown:] + 757
    10  iMedia                              0x00079002 -[IMBTableView mouseDown:] + 1122
    11  AppKit                              0x9323cca5 -[NSWindow sendEvent:] + 7533
    12  AppKit                              0x931d50e7 -[NSApplication sendEvent:] + 4788
    13  AppKit                              0x931666d5 -[NSApplication run] + 1007
    14  AppKit                              0x933fa261 NSApplicationMain + 1054
    15  iMedia2                             0x00004ed3 main + 179
    16  iMedia2                             0x00002945 start + 53
)

Problem occurs when we are trying to write metadata of object into pastboard at IMBObjectViewController.m

  • (NSUInteger) writeItemsAtIndexes:(NSIndexSet_)inIndexes toPasteboard:(NSPasteboard_)inPasteboard function
    {
    ...
    // Keep all 3 items in sync, so the arrays are of the same length.
    [fileTypes addObject:type];
    [titles addObject:object.name];
    [metadatas addObject:object.metadata];
    ...
    wasSet = [inPasteboard setPropertyList:metadatas forType:kIMBPublicMetadataListPasteboardType];
    ...
    }
@mikeabdullah

This comment has been minimized.

Show comment
Hide comment
@mikeabdullah

mikeabdullah Mar 16, 2012

Collaborator

Some options:

  • Pre-process metadata dictionaries to remove/convert URLs
  • Have a more defined system for deciding which properties go onto the pasteboard
Collaborator

mikeabdullah commented Mar 16, 2012

Some options:

  • Pre-process metadata dictionaries to remove/convert URLs
  • Have a more defined system for deciding which properties go onto the pasteboard
@marchenkoigor

This comment has been minimized.

Show comment
Hide comment
@marchenkoigor

marchenkoigor Mar 16, 2012

Main problem is CFURL which, as I understood, coming from flickerAPI and i think best solution will be to add some sort of converter inside of IMBFlickrNode when we receive any metadata.

Main problem is CFURL which, as I understood, coming from flickerAPI and i think best solution will be to add some sort of converter inside of IMBFlickrNode when we receive any metadata.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment