Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems with adding network nodes to pasteboard #50

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

Problems with adding network nodes to pasteboard #50

marchenkoigor opened this issue Mar 15, 2012 · 2 comments

Comments

@marchenkoigor
Copy link

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
Copy link
Collaborator

Some options:

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

@marchenkoigor
Copy link
Author

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants