I am dragging and dropping with NSView.
drag the object, which subclass NSView, I applied Mausdaun method is as follows:
@try {NSPoint location; NSSize size; NSPasteboard * pb = [NSPasteboard PasteboardWithName: @ "Cameracon Container"]; Location.x = ([self esteem] size. Width - size Wide) / 2 - 21.0; Location.y = ([self esteem] Size. High-size. High) / 2 - 7.0; NSLog (@ "MouseDown: Location- (% F,% F)", location.x, location.a); NSDictionary * iconViewDict = [[NSDictionary alloc] initWithObjectsAndKeys: [Camera no string value], @ "no camera", zero]; NSLog (@ "iconview -% @", iconVidict); NSDTA * Data = [NSKEEDAirir archivesDatauthUtject: iconVidict]; [PB declaration type: [NSArray arrayWithObject: IconDragDataType] owner: self]; [PB SetData: Data Type: IconDragDataType]; [Self Drag Image: [NSImage imageNamed: @ "camera_icon.png"] on: Location Offset: Do Ansjirosnpadit Event: A pasteboard: PB Source: Sl slide back: YES]; } @chich (nse exposition * e) {nslog (@ "camerikonview (mossdown :), error -% @", e); } Most of the time it is working fine but the problem is this - sometimes it
exception is raised: is not satisfactory Invalid parameter: TheWriteStream! = NULL in Mausdaun
method, the image went drag because of it does not disappear even when it appears on a continuous screen, selected some other window.
Can someone suggest me why this is happening and how can I solve it?
Thank you,
Mirage
< Code> Exception: Invalid parameter is not satisfactory: theWriteStream! = NULL
This type of exception comes from a case some one stream is about trying to write in a stream, and that writing it When the claim fails, it means that the condition was false; In this case, it means that it had no stream to write.
I do not see any stream-related code in the sample provided by you, so it is somewhere else in your app within a framework you are using. should the current stop -C exceptions ", then exception to run until your app is not running under the debugger, see the exception stack trace debugger for immediate viewing.
Comments
Post a Comment