• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
pasteboard issues
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

pasteboard issues


  • Subject: pasteboard issues
  • From: Brian Amerige <email@hidden>
  • Date: Sat, 10 Feb 2007 23:13:30 -0500

Hi all,

I'm having some trouble with a pasteboard of mine, which I'm honestly rather surprised about because I've got several other pasteboards (in different places) working in almost identical ways, without a problem.

Basically, no matter what I try, unless I set the propertylist to a *specific* array (files), it returns as "(null)".

	Here's an example of a (null) logging sample:

- (BOOL)outlineView:(NSOutlineView *)outlineView writeItems:(NSArray *)items toPasteboard:(NSPasteboard *)pboard
{
//snip
[pboard declareTypes:[NSArray arrayWithObject:NSFilenamesPboardType] owner:nil];
NSMutableArray *files = [NSMutableArray array];


	//Some enumerator stuff that adds objects to files (snip)

	NSArray *objectsArray = [NSArray arrayWithObjects:files, items, nil];
	[pboard setPropertyList:objectsArray forType:NSFilenamesPboardType];

	NSLog(@"%@", [pboard propertyListForType:NSFilenamesPboardType]);
	return YES;
}

Additionally, if I try what I really wanted to do, (separate the objects in the objectsArray into their own propertylists) also get (null) in the logging:

static NSString *localRegistryPboardType = @"localRegistryPboardType";
- (BOOL)outlineView:(NSOutlineView *)outlineView writeItems:(NSArray *)items toPasteboard:(NSPasteboard *)pboard
{
//snip
[pboard declareTypes:[NSArray arrayWithObjects:NSFilenamesPboardType, localRegistryPboardType, nil] owner:nil];
NSMutableArray *files = [NSMutableArray array];


	//Some enumerator stuff that adds objects to files (snip)


[pboard setPropertyList:files forType:NSFilenamesPboardType]; [pboard setPropertyList:items forType: localRegistryPboardType];

	NSLog(@"%@", [pboard propertyListForType:localRegistryPboardType]);
	return YES;
}

Any guidance here would *really* be appreciated --- thanks in advance,
Brian.
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: pasteboard issues
      • From: mmalc crawford <email@hidden>
    • Re: pasteboard issues
      • From: mmalc crawford <email@hidden>
  • Prev by Date: Re: set values in coredata
  • Next by Date: Re: pasteboard issues
  • Previous by thread: Re: set values in coredata
  • Next by thread: Re: pasteboard issues
  • Index(es):
    • Date
    • Thread