Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Copy/Paste Not Working in Modal Window

In my cocoa app I am displaying a NSPanel as a modal 'window' of another NSPanel using:

[modalPanel setWorksWhenModal:YES];
[[NSApplication sharedApplication] beginSheet:modalPanel modalForWindow:mainPanel modalDelegate:nil didEndSelector:nil contextInfo:nil];

This works, however the NSTextField's that show up in that modal 'window' are not allowing copy and paste.

From searching I found the following thread on Cocoabuilder which seems like pretty much the same problem, however there was no solution given in that thread either.

http://www.cocoabuilder.com/archive/message/cocoa/2007/11/6/192462

That thread says to make sure you are not stopping copy/paste by using validation, but this is not the case for me as I currently do not have any validation on any of the fields.

Is there something special I have to do to get this to work, or does anyone have any ideas of what I could check/try?

Thanks!

like image 393
kdbdallas Avatar asked Feb 23 '09 23:02

kdbdallas


People also ask

How to fix copy and paste not working on Windows 11?

Under the “Processes” section, right-click on “Windows Explorer” and select the “Restart” option. Windows 11 will take a few seconds to restart Windows Explorer. When finished, check that the copy and paste commands work. Method 4. Run a CHKDSK scan

How to copy and paste on computer?

On Windows, there are common two ways to copy and paste files: Give a right-click on the file you want to copy and paste, and choose Copy and right click again in other locations to choose Paste. This is how to copy and paste on computer. Why copy and paste on the computer?

How to fix copy/paste not working in remote desktop?

Another method to fix the "Copy/Paste Not Working" issue in Remote Desktop, is to enable the Clipboard Redirection on the remote computer. To do that: 1. On the remote computer, press Windows + R keys simultaneously on your keyboard to open a Run dialog box. 2.

What are the most common copy and paste problems?

The most common problem that leads to copy & paste issues is the cluttering and filling of the clipboard. Clipboard is the temporary storage area where a copied item is stored before passing into another location or file.


1 Answers

Is the "Edit" menu present in your application?

If you delete the edit menu, you lose the built in copy and paste functionality.

like image 171
diciu Avatar answered Sep 30 '22 10:09

diciu