• 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
Internet Config & Deleting FileMappings
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Internet Config & Deleting FileMappings


  • Subject: Internet Config & Deleting FileMappings
  • From: Diggory Laycock <email@hidden>
  • Date: Wed, 10 Jul 2002 18:15:03 +0100

Internet Config & Deleting FileMappings

Hi,

I am in the process of writing a pref-pane that means you can set
InternetConfig settings from System Preferences, rather than having to
set them from Internet Explorer.

Anyway - most of it is going well, but I have recently had the following
problem:

I have a class called MFInternetConfig that wraps the Carbon IC calls.

One of the methods is shown below:
(both theICInstance and mappingsHandle are valid instVars and work
happily in other IC-related methods.)



-(BOOL)deleteMappingEntryAtPosition:(int)deletePos
{
if ((deletePos>0)||(deletePos<(numberOfMappingEntries+1))) {
int icErr;
icErr=ICDeleteMapEntry(theICInstance, mappingsHandle, deletePos);
NSLog(@"delete mapping err: %d", icErr);
if (noErr==icErr) {
NSLog(@"IC says we have deleted the entry at Pos: %d",
deletePos);
return YES;
}
} else {
NSLog(@"you are trying to delete a mappingEntry that is not
within bounds.");
}
return NO;
}


As you can see from the following Log the methods appears to execute
properly, and no errors are given by the Carbon Calls. However the
mapping never gets deleted (as you can see from the two "number of
Mappings: " lines.)

Does anyone have any clues as to why this might be happening?

Thanks, Digs.

2002-07-10 18:02:23.226 System Preferences[4820] willSelect
2002-07-10 18:02:23.263 System Preferences[4820] refreshing Mappings UI
2002-07-10 18:02:23.263 System Preferences[4820] MFInternetConfig -
enumerateMappings

2002-07-10 18:02:23.264 System Preferences[4820] number of Mappings: 437

2002-07-10 18:04:12.921 System Preferences[4820] pos of this entry: 288
2002-07-10 18:04:15.299 System Preferences[4820] pos of this entry: 401
2002-07-10 18:04:18.025 System Preferences[4820] pos of this entry: 535
2002-07-10 18:04:22.213 System Preferences[4820] removing mapping
2002-07-10 18:04:24.779 System Preferences[4820]
removeMappingSheetDidEnd: returnCode: 1
2002-07-10 18:04:24.780 System Preferences[4820] go ahead and remove
mapping at: 535
2002-07-10 18:04:24.781 System Preferences[4820] delete mapping err: 0
2002-07-10 18:04:24.781 System Preferences[4820] IC says we have deleted
the entry at Pos: 535
2002-07-10 18:04:24.781 System Preferences[4820] sucessfully removed:
2002-07-10 18:04:24.862 System Preferences[4820] refreshing Mappings UI
2002-07-10 18:04:24.863 System Preferences[4820] MFInternetConfig -
enumerateMappings

2002-07-10 18:04:24.863 System Preferences[4820] number of Mappings: 437

2002-07-10 18:04:24.890 System Preferences[4820] pos of this entry: 0

Diggory Laycock
-----------------------
http://www.diggory.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.

  • Follow-Ups:
    • Re: Internet Config & Deleting FileMappings
      • From: Dan Crevier <email@hidden>
  • Prev by Date: Re: Linking Mach-O and AIX binaries
  • Next by Date: GNU Terminal Project
  • Previous by thread: Re: NSTextView - changing font size
  • Next by thread: Re: Internet Config & Deleting FileMappings
  • Index(es):
    • Date
    • Thread