[Top][All Lists]

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

Re: GWorkspace Dragndrop Question

From: cehardin
Subject: Re: GWorkspace Dragndrop Question
Date: Sat, 21 Jun 2003 23:43:29 -1000

Ok, I think I got it...

GNUstep doest like to use:
NSArray* files = [pasteboard propertyListForType:NSFilenamesPboardType],

(but Cocoa does)

Instead I used a :

NSData* pbData = [pasteboard dataForType:NSFilenamesPboardType]
and then did a
NSArray* files = [NSUnarchiver unarchiveObjectWithData: pbData]

to get the filenames and it seems to work fine...

Now I wonder if this will work in Cocoa... This method of doing this seems to be depreciated in Cocoa.


On Saturday, June 21, 2003, at 11:19  PM, address@hidden wrote:

Hello Enrico,

I'm making a pure OpenStep, in both Cocoa & GNUstep. But I'm having a problem with drag events from GWorkspace.

When my app is running in OS X, I can retrieve the filenames being dragged (we both know how that is done) from the Finder with no problem at all.

However in GNUstep, when I'm getting doing my draggingUpdated and looking for what files GWorkspace is passing I can't get a valid NSArray of NSStrings from [pasteboard propertyListForType: NSFilenamesPboardType, I get a nil.

Before I do that I do check to see if you are passing a NSFilenamesPboardType and indeed you are. However, when (Gnustep version) NSProperty tries to deserialize it it chokes and return nil. Gnustep consoles out a "Bad serialized data"

Any idea why this is happening? I imagine I am writing the first app that tries to accept dragged files from GWorkspace so maybe you are doing something odd in your D&D, or maybe this is a gnustep bug? I would greatly appreciate it if you could check this out on your end. I'm gonna take a stab at the GWorkspace sources myself but you know them way better than I do, of course, so you may already be aware of what type of problem is going on.

I'm also gonna post this in gnustep-dev in case it is a gnustep bug that somewhere there can shed some light on.



Gnustep-dev mailing list

reply via email to

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