Tap Forms – Organizer Database App for Mac, iPhone, and iPad › Forums › Using Tap Forms › File Attachment Field – Original Icon Reappears
- This topic has 3 replies, 2 voices, and was last updated 6 years, 2 months ago by Brendan.
-
AuthorPosts
-
September 17, 2018 at 8:17 AM #30650
Stan TAYLORParticipantA File Attachment Field is used to link the Subject of a Record to appropriate documentation.
In the instance concerned the documentation is a PDF, the attached PNG shows how this is presented.From the early years of Adobe Acrobat I progressed to AA Pro until Adobe pulled the support for v XI. The cost of using the subscription alternative was not justifiable so diffferent software has been aquired.
It seems that Tap Forms have ‘Preset Icons’ that are dependent on the File Type placed in the File Attachment Field?
Is there any means to enable the ‘Preferred Icon’ to display as shown in the second attachment below?
Thanks for your time, best wishes,
Attachments:
You must be logged in to view attached files.September 17, 2018 at 9:45 AM #30653
BrendanKeymasterHi Stan,
Actually Tap Forms asks the operating system for the icon. I don’t use predefined icons for the File Attachment field. Except on the iOS version where system icons aren’t available.
Here’s my code to get the icon. So there’s only asking the operating system using the
iconForFileType:
command:NSWorkspace *workspace = [NSWorkspace sharedWorkspace]; CFStringRef UTI = UTTypeCreatePreferredIdentifierForTag(kUTTagClassMIMEType, (__bridge CFStringRef)attachment.contentType, NULL); NSImage *fileIconImage = [workspace iconForFileType:CFBridgingRelease(UTI)]; cell.fileButton.image = fileIconImage;
September 17, 2018 at 3:29 PM #30661
Stan TAYLORParticipantThanks for the heads-up Brendan.
I can live with the situation so please do not expend any more time on this.
I am sorry to admit ‘code’ is not helpful to me.
When deleting the FileName from the File Attachment Field failed to remove the Icon the Field was removed from the Layout. Inserting a Pages File invoked an Icon change but replacing the PDF returned the AA Icon.
Perhaps it is down to the now long toothed OSX El Capitan?
When switching PDF Software some of the Icons changed as expected but the greater majority had to be ‘encouraged’ to change.Again thanks for your dedication to supporting my favourite software, long may you keep up this good work.
Very best regards.
September 18, 2018 at 1:24 AM #30666
BrendanKeymasterYa, I understand that not everyone can read code. I just put it there to show that it was just standard Apple code that I was using and not doing anything out of the ordinary to get the icon. Sorry for that.
One thing you can try is to use the Finder’s Get Info function to change the “Open With…” setting for all PDF documents. Maybe that’ll solve the problem in one go.
Thanks,
Brendan
-
AuthorPosts
You must be logged in to reply to this topic.