• 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
Newbie Pasteboard question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Newbie Pasteboard question


  • Subject: Newbie Pasteboard question
  • From: Björn Carlström <email@hidden>
  • Date: Thu, 30 Oct 2003 22:07:55 +0100

Hi

I'm using NSTable view to drag a few items into another view.

I use this code to place the items in a plist on the pasteboard

- (BOOL)outlineView:(NSOutlineView *)olv writeItems:(NSArray*)items
toPasteboard:(NSPasteboard*)pboard
{
[pboard declareTypes:[NSArray arrayWithObjects:SCResourceType, nil]
owner:nil];
NSString* theString = [items description];
[pboard setPropertyList: theString forType: SCResourceType];
return YES;
}

When I retrieve the items after the drag is complete everything works
fine as long as the items doesn't contain any spaces or foreign
(swedish in my case) characters. What is going on? Aren't propertyLists
in unicode? If I retrieve the items as a string every character looks
okay. It's only if I put the plist in a NSArray that my problem occurs.

By the way, is there a way to put a reference to an object on the
pasteboard? Would it be safe to assume that the address of an object is
intact after a drag?

Many thanks in advance

Bjvrn Carlstrvm
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Newbie Pasteboard question
      • From: Fritz Anderson <email@hidden>
  • Prev by Date: Custom background drawing in NSScrollView
  • Next by Date: Re: Can anyone tell me what these errors mean? (PDF files attached)
  • Previous by thread: Custom background drawing in NSScrollView
  • Next by thread: Re: Newbie Pasteboard question
  • Index(es):
    • Date
    • Thread