To see if a file is hidden, I use on the URL(NSURL Class) for the file, resourceValuesForKeys and pass in the array of properties you are looking for. In the case of a hidden file, use NSURLIsHiddenKey. You should be able to make a file hidden as well by using the set counter part. Check out the NSURL class.
-Tony On May 28, 2010, at 1:10 AM, Alastair Houghton wrote: > On 27 May 2010, at 20:43, Bill Appleton wrote: > >> *1) I can't hide a file, or test if a file is hidden* >> >> I had to resort to FSGetCatalogInfo -- there is no way to do it through >> NSFileManager, etc. Right? > > chflags(), with UF_HIDDEN? And stat() to read the same? > > I don't think FSGet/SetCatalogInfo is deprecated on 64-bit though, so you > could just use that if you're more comfortable doing it that way. > >> *5)** **I **can't create a simple list* >> >> I did it the only way I could -- with a table that has one column, etc. Man >> that was painful for a simple list. Is there a better way? > > It's not *that* painful. In fact, if you use bindings and an > NSArrayController, it's pretty much done for you. > >> *6)** **I **can't get the height of some wrapped text* >> >> I had to use the layout manager and some major rocket science to get this to >> work right. I'm not saying Text Edit was great, but at least it knows how >> tall the text field is. > > NSAttributedString's -boundingRectWithSize:options: is probably helpful for > this, depending on exactly what size you're after (there's more than one > possible set of dimensions you might care about, depending on exactly what > you're doing). > > Cocoa Text is, I think, a bit daunting when you first encounter it; it's very > powerful and exposes a great deal of the underlying machinery behind text > rendering, but the flip-side of that is that it's a huge API and that alone > can be off-putting. I think once you get over that, it's actually pretty > easy to use---and if you're worried that it all seems a bit heavyweight to > "just" draw a string, remember that most of what it does is actually > necessary to get the string on the display, so all of the simpler APIs you > might have used previously were still doing all of the same work (give or > take). > > Kind regards, > > Alastair. > > -- > http://alastairs-place.net > > > > _______________________________________________ > > Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) > > 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: > http://lists.apple.com/mailman/options/cocoa-dev/tonyrom%40hotmail.com > > This email sent to tony...@hotmail.com > -Tony _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com