Search Results

Search found 3 results on 1 pages for 'woodster'.

Page 1/1 | 1 

  • Drag String data from My Cocoa App to Third-Party Cocoa App

    - by Woodster
    Hello, I want to drag a row from my tableview and drop it into any other NSTextField in Mac OS X 10.6, and have a string of text be dropped. Drag and drop already works within my app (between a NSTableView and an NSBrowser), but I have had no success putting any data on the pasteboard that can accepted by apps other than the source application. Here's the code I tried, which I thought would be enough to get hte word "hello" to be 'pasted' when I drop into some other NSTextField: -(BOOL) tableView:(NSTableView *)tableView writeRowsWithIndexes:(NSIndexSet *)rowIndexes toPasteboard:(NSPasteboard *)pboard { [pboard declareTypes:[NSArray arrayWithObject:NSStringPboardType] owner:self]; [pboard setString:@"hello" forType:NSStringPboardType]; return YES; } //-- I never get the cursor that shows me the drop will be accepted, and it just doesn't work. Things I've tried: Using the 10.5 version of the Pasteboard identifier, NSStringPBoardType Using the 10.6 version, NSPasteboardTypeString. Setting the owner = nil, since I'm not providing the data lazily. Using the keyed archiver: [pboard setData:[NSKeyedArchiver archivedRootObject:@"Hello!!"]] None of the above have worked. I think I have the concepts correct: "Encode data, tell the pasteboard what you've got, then give it the data", but since other apps don't recognize it, I suspect I'm not telling the pasteboard the correct datatype. Where am I going wrong? Thanks, Woody

    Read the article

  • Add a Contextual Menu to WebView

    - by Woodster
    An easy one, I think: I want to add a contextual menu to a WebView. In IB, I added a NSMenu to the NIB, connected it to the WebView's menu outlet, launched and expected to be able to control-click in the WebView and see the pop-up menu. The only item I saw on the contextual menu is "reload". I can do the same steps but connect the Menu to some other view and it works as expected. Why doesn't the menu work the same when connect to the webview's menu outlet? Thanks

    Read the article

  • Create ABPerson Records in a Shared CardDAV (10.6/Server Hosted) AddressBook

    - by Woodster
    Hello, My app presently reads and writes to the local Mac OS X 10.6 client addressbook using the AddressBook.framework. It works fine. 10.6 Server introduced AddressBook Server, which 10.6 clients can connect to by setting up a CardDAV Account. User and Group records can be stored in that account, which is synchronized to the 10.6 server and made available to other clients who access the same CardDAV account. Mail.app is able to autocomplete the email addresses from accounts that are in the local datastore as well as the remote CardDAV datastore. ABPeoplePicker can see both. But, programatically, I'm not getting any CardDAV-based data returned from my queries against the shared AddressBook. I'm not sure if I need to ask it for a different AddressBook, or if I need to modify my fetch-request to indicate that I want it to be able to use the shared data too. My goal is to adapt the current code so that it can read/write to the CardDAV account too, instead of just the local addressbook. Thoughts?

    Read the article

1