• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
why LSSharedFileListInsertItemURL function can't work?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

why LSSharedFileListInsertItemURL function can't work?


  • Subject: why LSSharedFileListInsertItemURL function can't work?
  • From: songhf <email@hidden>
  • Date: Fri, 16 Nov 2012 14:39:39 +0800

Hi all,

In my code below i used LS functions to do something, but i can't get the result what i wanted.  Somebody can tell me  which i missed ?
thank you!

First I  generate a IconRef variable and used in LSSharedFileListInsertItemURL():

IconRef iconRef = NULL;

CFURLRef tCFURLRef = CFBundleCopyResourceURL( myCFBundleRef, CFSTR( "Application" ), CFSTR( "icns" ), NULL );
status = RegisterIconRefFromFSRef( 'aaaa', 'icns', &tFSRef, &iconRef );

LSSharedFileListItemRef item = LSSharedFileListInsertItemURL(favorite_items,
                                                                       kLSSharedFileListItemBeforeFirst, CFSTR("AAAA"), iconRef,
                                                                       (__bridge CFURLRef)url, NULL, NULL);

The result is insert a item to Finder slider, but the item icon does not showing what i specified. what's wrong?

And  the code below does not  take effective too.
    OSStatus er = LSSharedFileListItemSetProperty(
                                              item,
                                              kLSItemDisplayName,
					       CFTypeRef(CFSTR("some title")));

thanks again.
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: Looking for Direction
  • Next by Date: MacOS: Selecting from Multiple tables in the same window
  • Previous by thread: Re: Looking for Direction
  • Next by thread: MacOS: Selecting from Multiple tables in the same window
  • Index(es):
    • Date
    • Thread