Post

Replies

Boosts

Views

Activity

Reply to macOS - NSPasteboard not functioning as it used to??
TyngJJ ClipboardViewer does not provide an option for viewing the NSPasteboard that is presented to a Service using the above entry point... So it is not helpful in this circumstance. With further research what I currently see is this: On macOS a user can make a text selection in a given application and then use 1 of four 'direct' means of invoking a second application to act on that text selection. (I use 'direct' here to mean that the selection is not saved to the file system in some fashion and then this file is acted on by the second application) The 4 mechanisms are: drag the text to a window managed by the second application drag the text to the dock icon of the second application invoke a 'Service' by using one of the various menus which are available for 'Services' (the service is provided by second application) invoke a keyboard shortcut associated with the second application It used to be that these means would all yield the same RTFData. This is no longer true. The 2 drag mechanisms still yield the expected RTFData The 'Service' and keyboard shortcut do NOT yield an RTFData (they do yield an NSPasteboardTypeString product) Please note that the keyboard shortcut is a user interface convenience which in fact utilizes the 'Service'... The upshot here is that what has changed is the 'pboard' in the standard service entry point: (void) xyzService:(NSPasteboard *)pboard userData:(NSString *)userData error:(NSString **)error; { This NSPasteboard no longer behaves as it did in the past! Can someone please point me to where this change in functionality is documented! Thanks!
Oct ’20
Reply to macOS - NSPasteboard not functioning as it used to??
Apologies for the formatting above.... Didn't see this until just now... In any case should be: // this is a standard service entry point (void) xyzService:(NSPasteboard *)pboard userData:(NSString *)userData error:(NSString **)error; { ... NSData *rtfData=[pboard dataForType:NSPasteboardTypeRTF];    if (rtfData!=nil) { ... } ... }
Oct ’20
Reply to Mac App Store Sandbox Test -> App is Damaged..
Folks; Some further data because I just know you were all waiting on the edge of your seats! So I defer the receipt validation which normally occured during main.m. When a SKReceiptRefreshRequest is issued it errors out with a strange error: Error Domain=SKErrorDomain Code=0 "(null)" UserInfo={NSUnderlyingError=0x600000d2a250 {Error Domain=com.apple.commerce.client Code=500 "(null)" It 'feels' like something has changed recently in Catalina... This all used to work! I'm stuck here - I have a bug fix to get into the App Store but the only way I can see to do that is to remove all the receipt handling because it no longer works. This stinks! Can someone please point me to some useful information? Please! Steve
Sep ’20
Reply to How to Deploy a Large Database
Feedback from other sources has illuminated the following strategy: -Split the database into two databases: ReadOnly and UserModifiable Use the ReadOnly directly from within the mainBundle. UserModifiable is copied to .applicationSupport and then used from there. Duplication is then reduced to the initial database for userModifiable...(in my case this is relatively small!) This strategy also addresses concern with backup (contents of .applicationSupport)
Jul ’20
Reply to NSPrintOperation PDFOperationWithView
If anyone is still following along...Thanks go to janabanan for staying with this thread!!Here's simplified code which produces a .pdf file which retains the links embedded in the NSAttributedString which is displayed in 'sourceTextView'. This .pdf file is also appropriately paginated.[savePanel beginSheetModalForWindow:self.windowController.window completionHandler:^(NSInteger result){ if (result == NSFileHandlingPanelOKButton) { NSPrintInfo *printInfo = [NSPrintInfo sharedPrintInfo]; [printInfo setHorizontalPagination:NSFitPagination]; [printInfo setVerticallyCentered:NO]; [printInfo setHorizontallyCentered:NO]; [printInfo setLeftMargin:67.0]; [printInfo setRightMargin:67.0]; [printInfo setTopMargin:72.0]; [printInfo setBottomMargin:72.0]; [printInfo dictionary] [NSPrintJobDisposition] = NSPrintSaveJob; [printInfo dictionary] [NSPrintJobSavingURL] = [savePanel URL]; NSPrintOperation *op = [NSPrintOperation printOperationWithView:self.windowController.sourceSourceTextView printInfo:printInfo]; [op setShowsPrintPanel:NO]; [op setShowsProgressPanel:NO]; [op runOperation]; } [savePanel orderOut:self];}];
Mar ’20