• 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
File Extensions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

File Extensions


  • Subject: File Extensions
  • From: Patrick Tescher <email@hidden>
  • Date: Tue, 07 May 2002 10:54:56 -0700

I am currently trying to make a browser for a High School that will only
open certain types of files. This is because the built in security in Mac OS
X is not enough to stop people from playing games and messing up the Macs.
Currently I am working off the Simple Browser example file, but I am very
new to cocoa programming and I don9t know exactly to go about it. So far I
have added a couple lines that looks like this (there is one of these for
all the allowed file types):

if ([[[NSFileManager defaultManager] displayNameAtPath: nodePath]
isEqualToString: @"doc"])
{
[[NSWorkspace sharedWorkspace] openFile: nodePath];
}

Everything above is based on the example files and/or the documentation. If
anyone knows a good way to limit the open command to only those files with
certain file extensions it would be very helpful. Thanks in advance,

~PatMan
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: File Extensions
      • From: Sherm Pendley <email@hidden>
  • Prev by Date: Re: [ot] how to look at .app contents?
  • Next by Date: Re: PB 2 Comments & Feature Request
  • Previous by thread: Re: dock menu says "Application not responding" when my app is launch ed at Startup
  • Next by thread: Re: File Extensions
  • Index(es):
    • Date
    • Thread