Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: icon of file



Thanks Tim that sounds great
errrrrrr.......... only thing is I can't get it to work :-(

on awake from nib theObject

set iconImage to call method "iconForFile:" of (call method
"sharedWorkspace" of class "NSWorkspace") with parameter
"/Users/p/Desktop/Photo Library - 0715.tif"
set loadImage to load image iconImage
set image of image view "icon" of window 1 to loadImage

end awake from nib

returns NSReceiverEvaluationScriptError 4(1)

I'm probably doing something dumb
any further clue would be appreciated
thanks

Peter

P.S. the path to the file is good and my image view works ok

On Friday, August 22, 2003, at 10:17 AM, Tim Bumgarner wrote:

> Hi Peter,
>
> set iconImage to call method "iconForFile:" of (call method
> "sharedWorkspace" of class "NSWorkspace") with parameter
> "/Some/Full/POSIX/Path/Here/To/Your/File"
>
> This should do the trick, even tested it myself ;-)
>
> Tim
>
> On Friday, August 22, 2003, at 04:02 AM, peter wrote:
>
>> Hi
>> I have made several posts both here and elsewhere regarding
>> obtaining the icon image of a file ( outside of my app bundle) to
>> display in an image view in my AS app.
>> I have learned that "Icon" in finder on OSX is not yet supported.
>> So far, nobody seems to know a workaround for this.
>> Surely call method "icon" or some other Obj C method can help me
>> achieve this?
>>
>> Sorry to keep asking the same question.............
>> thanks
>>
>> Peter
>> _______________________________________________
>> applescript-studio mailing list | email@hidden
>> Help/Unsubscribe/Archives:
>> http://www.lists.apple.com/mailman/listinfo/applescript-studio
>> Do not post admin requests to the list. They will be ignored.
_______________________________________________
applescript-studio mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-studio
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: icon of file (From: Tim Bumgarner <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.