why LSSharedFileListInsertItemURL function can't work?
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