• 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
Re: Writing Files - Follow up
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Writing Files - Follow up


  • Subject: Re: Writing Files - Follow up
  • From: Tyson Tate <email@hidden>
  • Date: Mon, 30 Jun 2003 23:22:59 -0700

Thanks to all the excellent help. Indeed, somehow my gcc had been reverted to 2.something. I re-downloaded the dev tools and it's dumming along beautifully.

Here's what I came up with:


NSSavePanel *savePanel = [NSSavePanel savePanel];

savePanel = [NSSavePanel savePanel];
[savePanel setRequiredFileType:@"ps"];
[savePanel setTreatsFilePackagesAsDirectories:NO];
[savePanel setExtensionHidden:NO];

NSString *documentDirectory = [savePanel directory];
NSString *documentName = [savePanel filename];

pdf417param p;
FILE* f;
pdf417init(&p);

p.text = "hello";
p.options = PDF417_INVERT_BITMAP;
paintCode(&p);
if (p.error) {
pdf417free(&p);
}

if (NSOKButton == [savePanel runModalForDirectory:documentDirectory file:documentName])
{
f = fopen([[savePanel filename] fileSystemRepresentation], "wb");
// AND WRITE!!!!


Again, thanks for all the help. I'll include a thank-you in the app's About Box.

--
Tyson Tate, Editor
Entropy Magazine
"Nourishment For The Starved."
http://www.entropymag.net
_______________________________________________
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.

  • Prev by Date: Re: Strong language about Cocoa and Qt.
  • Next by Date: NSFileHandle, socket and NSNetService
  • Previous by thread: Re: Strong language about Cocoa and Qt.
  • Next by thread: NSFileHandle, socket and NSNetService
  • Index(es):
    • Date
    • Thread