New topic: Get the Icon of a Folderitem
<http://forums.realsoftware.com/viewtopic.php?t=47691> Page 1 of 1 [ 5 posts ] Previous topic | Next topic Author Message Charlie Post subject: Get the Icon of a FolderitemPosted: Wed Apr 24, 2013 10:09 am Joined: Thu Feb 28, 2013 6:21 pm Posts: 14 Hi all. How do I go about getting the icon from a folder item? It could be a document/app/file etc just need to get the Icon and display it as a picture. Many thanks Top DaveS Post subject: Re: Get the Icon of a FolderitemPosted: Wed Apr 24, 2013 11:41 am Joined: Sun Aug 05, 2007 10:46 am Posts: 4807 Location: San Diego, CA Windows? OSX Carbon? OSX Cocoa? All of the above? Makes a huge difference as to how to answer your question. I have code for OSX Carbon... but that is being deprecated.... hoping to find some Cocoa replacement code myself. _________________ Dave Sisemore iMac I7[2012], OSX Mountain Lion 10.8.3 RB2012r2.1 Note : I am not interested in any solutions that involve custom Plug-ins of any kind Top Charlie Post subject: Re: Get the Icon of a FolderitemPosted: Wed Apr 24, 2013 12:05 pm Joined: Thu Feb 28, 2013 6:21 pm Posts: 14 OSX Cocoa. Id like to see your carbon code though. Thanks Top p0wn3d Post subject: Re: Get the Icon of a FolderitemPosted: Wed Apr 24, 2013 1:01 pm Joined: Sun Oct 28, 2012 4:54 am Posts: 226 Location: Herts, UK Stumbled upon this thread on the PB forum, someway down the page is some code to Get an icon image (32 x 32 px) for a specific file type on Cocoa. May or may not give you something to go with porting to RB http://www.forums.purebasic.com/english/viewtopic.php?f=19&t=50795&start=90 _________________ Real Studio 2012 R2 SysInfo BackTrack Linux/BackBox Linux/Debian Lenny/Windows 7/Windows 8/OpenWRT/OpenBSD & Yes it's me in the Avatar Top Charlie Post subject: Re: Get the Icon of a FolderitemPosted: Thu Apr 25, 2013 10:50 am Joined: Thu Feb 28, 2013 6:21 pm Posts: 14 p0wn3d wrote:Stumbled upon this thread on the PB forum, someway down the page is some code to Get an icon image (32 x 32 px) for a specific file type on Cocoa. May or may not give you something to go with porting to RB http://www.forums.purebasic.com/english/viewtopic.php?f=19&t=50795&start=90 Hmmm - Sort of helped. Got me looking in the right direction but it seems there isn't a direct API call to get the icon in Cocoa. I must create an NSWorkspace object which has the method iconForFile. My knowlege of cocoa calls is very limited so I am a bit lost with this. I downloaded macoslib108r2 which I guess you all know of, it is in there but I got lost with it all. Still needing help if anyone can help me out... Top Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Page 1 of 1 [ 5 posts ] -- Over 1500 classes with 29000 functions in one REALbasic plug-in collection. The Monkeybread Software Realbasic Plugin v9.3. http://www.monkeybreadsoftware.de/realbasic/plugins.shtml [email protected]
