- (IBAction)newSearchWindow:(id)sender
{
- NSDocumentController *controller = [NSDocumentController sharedDocumentController];
- CheatDocument *doc = [controller makeUntitledDocumentOfType:@"Cheat Document"];
+ NSError *error = nil;
+ NSDocumentController *controller = [NSDocumentController sharedDocumentController];
+ CheatDocument *doc = [controller makeUntitledDocumentOfType:@"Cheat Document" error:&error];
if ( !doc ) {
- ChazLog( @"nil document" );
+ ChazLog( @"nil document, error=%@", error);
}
[doc setMode:TCSearchMode];
[controller addDocument:doc];
- (IBAction)newBlankCheatWindow:(id)sender
{
+ NSError *error = nil;
NSDocumentController *controller = [NSDocumentController sharedDocumentController];
- CheatDocument *doc = [controller makeUntitledDocumentOfType:@"Cheat Document"];
+ CheatDocument *doc = [controller makeUntitledDocumentOfType:@"Cheat Document" error:&error];
if ( !doc ) {
- ChazLog( @"nil document" );
+ ChazLog( @"nil document, error=%@", error);
}
[doc setMode:TCCheatMode];
[controller addDocument:doc];
- (NSArray *)selectedRows
{
- return [[self selectedRowEnumerator] allObjects];
+ return [[self selectedRowIndexes] allObjects];
}
FILE *file;
// look for debug file
- file = fopen( [filepath lossyCString], "r+" );
+ file = fopen( [filepath cStringUsingEncoding:NSUTF8StringEncoding], "r+" );
if ( !file ) {
// there is no debug file or we don't have permissions
fclose( file );
- _gDebugFile = fopen( [filepath lossyCString], "w" );
+ _gDebugFile = fopen( [filepath cStringUsingEncoding:NSUTF8StringEncoding], "w" );
ChazDebug( @"Debug log found (obviously). Entering debug mode." );
}
fprintf( output, "[%s] %s\n", [[[NSDate date] descriptionWithCalendarFormat:@"%Y-%m-%d %H:%M:%S.%F"
timeZone:nil
- locale:nil] lossyCString], [string lossyCString] );
+ locale:nil] cStringUsingEncoding:NSUTF8StringEncoding], [string cStringUsingEncoding:NSUTF8StringEncoding] );
fflush( output );
[string release];
}
// see if the version information for this app is in another file
- if ( appRedirect = [appDictionary objectForKey:@"Redirect"] ) {
+ if ( (appRedirect = [appDictionary objectForKey:@"Redirect"]) ) {
// recursively follow the redirection
[[ChazUpdate alloc] initWithURL:appRedirect name:_name verbose:_verbose];
[self kill];
- (BOOL)isLoadedFromFile
{
- return ([self fileName] != nil);
+ return ([self fileURL] != nil);
}
lastRow = [_cheatData variableCount]-1;
[tableView reloadData];
- if ( MacOSXVersion() >= 0x1030 ) {
- [tableView selectRowIndexes:[NSIndexSet indexSetWithIndex:lastRow] byExtendingSelection:NO];
- }
- else {
- [tableView selectRow:lastRow byExtendingSelection:NO];
- }
+ [tableView selectRowIndexes:[NSIndexSet indexSetWithIndex:lastRow] byExtendingSelection:NO];
[tableView scrollRowToVisible:lastRow];
[self setDocumentChanged];
// reselect the last item if the selection is now invalid
len = [_cheatData variableCount] - 1;
if ( [tableView selectedRow] > len ) {
- if ( MacOSXVersion() >= 0x1030 ) {
+
[tableView selectRowIndexes:[NSIndexSet indexSetWithIndex:len] byExtendingSelection:NO];
- }
- else {
- [tableView selectRow:len byExtendingSelection:NO];
- }
}
[tableView reloadData];
- (id)performDefaultImplementation
{
NSDocumentController *controller = [NSDocumentController sharedDocumentController];
- CheatDocument *doc = [controller makeUntitledDocumentOfType:@"Cheat Document"];
+ CheatDocument *doc = [controller makeUntitledDocumentOfType:@"Cheat Document" error:nil];
if ( !doc ) {
ChazLog( @"nil document" );
}
[_cheater setTarget:selectThis];
}
// otherwise, select the global target
- else if ( selectThis = [CheatDocument globalTarget] ) {
+ else if ( (selectThis = [CheatDocument globalTarget]) ) {
ChazLog( @"setting global target" );
[_cheater setTarget:selectThis];
}
_status = TCIdleStatus;
panel = [NSSavePanel savePanel];
- [panel setRequiredFileType:@"dump"];
+ [panel setAllowedFileTypes:[NSArray arrayWithObjects: @"dump", nil]];
[panel setExtensionHidden:NO];
[panel setCanSelectHiddenExtension:YES];
- if ( MacOSXVersion() >= 0x1030 ) {
- [panel setMessage:@"Dump files are huge! Exercise patience while saving."];
- }
-
+ [panel setMessage:@"Dump files are huge! Exercise patience while saving."];
[panel beginSheetForDirectory:nil
file:[NSString stringWithFormat:[NSString stringWithFormat:@"%@.dump", [_process name]]]
modalForWindow:ibWindow
- (IBAction)ibSetRemoteCheater:(id)sender
{
- ChazLog( @"Selected %@", sender );
+ int timeout=5;
+ ChazLog( @"Selected %@", sender );
if ( ![self shouldConnectWithServer:sender] ) {
return;
_resolvingService = [[sender representedObject] retain];
[_resolvingService setDelegate:self];
- [_resolvingService resolve];
+ [_resolvingService resolveWithTimeout:timeout];
}
- (void)netServiceDidResolveAddress:(NSNetService *)sender
[self switchToCheatMode];
int rowIndex = [_cheatData variableCount]-1;
- if ( MacOSXVersion() >= 0x1030 ) {
- [ibCheatVariableTable selectRowIndexes:[NSIndexSet indexSetWithIndex:rowIndex] byExtendingSelection:NO];
- }
- else {
- [ibCheatVariableTable selectRow:rowIndex byExtendingSelection:NO];
- }
+ [ibCheatVariableTable selectRowIndexes:[NSIndexSet indexSetWithIndex:rowIndex] byExtendingSelection:NO];
// start editing the last added variable
if ( [[NSUserDefaults standardUserDefaults] boolForKey:TCAutoStartEditingVarsPref] ) {
if ( top > 1 ) {
- // edit multiple
- if ( MacOSXVersion() >= 0x1030 ) {
- [ibCheatVariableTable selectRowIndexes:[NSIndexSet indexSetWithIndexesInRange:NSMakeRange(rowIndex-top+1,top-1)]
- byExtendingSelection:YES];
- }
- else {
- for ( i = 1; i < top; i++ ) {
- [ibCheatVariableTable selectRow:rowIndex-i byExtendingSelection:YES];
- }
- }
+ [ibCheatVariableTable selectRowIndexes:[NSIndexSet indexSetWithIndexesInRange:NSMakeRange(rowIndex-top+1,top-1)] byExtendingSelection:YES];
[ibCheatVariableTable scrollRowToVisible:rowIndex];
[self ibRunEditVariablesSheet:nil];
}
[self switchToCheatMode];
int row = [_cheatData variableCount]-1;
- if ( MacOSXVersion() >= 0x1030 ) {
- [ibCheatVariableTable selectRowIndexes:[NSIndexSet indexSetWithIndex:row] byExtendingSelection:NO];
- }
- else {
- [ibCheatVariableTable selectRow:row byExtendingSelection:NO];
- }
+ [ibCheatVariableTable selectRowIndexes:[NSIndexSet indexSetWithIndex:row] byExtendingSelection:NO];
// start editing new variable
if ( [[NSUserDefaults standardUserDefaults] boolForKey:TCAutoStartEditingVarsPref] ) {
[ibCheatVariableTable editColumn:[ibCheatVariableTable columnWithIdentifier:@"address"] row:row withEvent:nil select:YES];
+++ /dev/null
-{
- IBClasses = (
- {
- ACTIONS = {ibEmailButton = id; ibWebsiteButton = id; };
- CLASS = AboutBoxController;
- LANGUAGE = ObjC;
- OUTLETS = {
- ibDateText = NSTextField;
- ibEmailButton = NSButton;
- ibNameVersionText = NSTextField;
- ibWebsiteButton = NSButton;
- };
- SUPERCLASS = NSWindowController;
- },
- {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }
- );
- IBVersion = 1;
-}
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>IBDocumentLocation</key>
- <string>124 93 356 241 0 0 1280 938 </string>
- <key>IBFramework Version</key>
- <string>364.0</string>
- <key>IBGroupedObjects</key>
- <dict>
- <key>3</key>
- <array>
- <string>93</string>
- <string>91</string>
- </array>
- <key>7</key>
- <array>
- <string>77</string>
- <string>80</string>
- <string>87</string>
- </array>
- <key>8</key>
- <array>
- <string>89</string>
- <string>81</string>
- </array>
- </dict>
- <key>IBLastGroupID</key>
- <string>9</string>
- <key>IBOpenObjects</key>
- <array>
- <integer>85</integer>
- </array>
- <key>IBSystem Version</key>
- <string>7U16</string>
-</dict>
-</plist>
+++ /dev/null
-{
- IBClasses = (
- {
- ACTIONS = {copy = id; cut = id; delete = id; paste = id; };
- CLASS = BetterTableView;
- LANGUAGE = ObjC;
- SUPERCLASS = NSTableView;
- },
- {
- ACTIONS = {
- ibAddCheatVariable = id;
- ibAddSearchVariable = id;
- ibCancelDump = id;
- ibCancelSearch = id;
- ibCheat = id;
- ibClearSearch = id;
- ibDumpMemory = id;
- ibEndCustomServerSheet = id;
- ibEndEditVariablesSheet = id;
- ibEndPasswordSheet = id;
- ibEndPropertiesSheet = id;
- ibPauseTarget = id;
- ibRedo = id;
- ibResumeTarget = id;
- ibRunCustomServerSheet = id;
- ibRunEditVariablesSheet = id;
- ibRunPasswordSheet = id;
- ibRunPropertiesSheet = id;
- ibSearch = id;
- ibSetCheatRepeats = id;
- ibSetCustomCheater = id;
- ibSetIntegerSign = id;
- ibSetLocalCheater = id;
- ibSetNoCheater = id;
- ibSetOperator = id;
- ibSetProcess = id;
- ibSetRemoteCheater = id;
- ibSetRepeatInterval = id;
- ibSetValueUsed = id;
- ibSetVariableEnabled = id;
- ibSetVariableType = id;
- ibStopCheat = id;
- ibToggleSearchCheat = id;
- ibUndo = id;
- };
- CLASS = CheatDocument;
- LANGUAGE = ObjC;
- OUTLETS = {
- ibCheatButton = NSButton;
- ibCheatContentView = NSView;
- ibCheatInfoField = NSTextField;
- ibCheatInfoText = NSTextField;
- ibCheatRepeatAuxText = NSTextField;
- ibCheatRepeatButton = NSButton;
- ibCheatRepeatField = NSTextField;
- ibCheatVariableTable = BetterTableView;
- ibCustomServerSheet = NSWindow;
- ibEditVariablesSheet = NSWindow;
- ibNewValueField = NSTextField;
- ibPasswordField = NSTextField;
- ibPasswordSheet = NSWindow;
- ibPlaceView = NSView;
- ibPortField = NSTextField;
- ibProcessPopup = NSPopUpButton;
- ibPropertiesSheet = NSWindow;
- ibSearchButton = NSButton;
- ibSearchClearButton = NSButton;
- ibSearchContentView = NSView;
- ibSearchIntegerSignMatrix = NSMatrix;
- ibSearchOperatorPopup = NSPopUpButton;
- ibSearchTypePopup = NSPopUpButton;
- ibSearchValueField = NSTextField;
- ibSearchValueUsedMatrix = NSMatrix;
- ibSearchVariableButton = NSButton;
- ibSearchVariableTable = VariableTable;
- ibServerField = NSTextField;
- ibServerPopup = NSPopUpButton;
- ibStatusBar = NSProgressIndicator;
- ibStatusText = StatusTextField;
- ibWindow = NSWindow;
- ibWindowTitleField = NSTextField;
- };
- SUPERCLASS = NSDocument;
- },
- {
- ACTIONS = {fadeToCheatMode = id; fadeToSessionMode = id; };
- CLASS = FirstResponder;
- LANGUAGE = ObjC;
- SUPERCLASS = NSObject;
- },
- {CLASS = NSObject; LANGUAGE = ObjC; },
- {CLASS = StatusTextField; LANGUAGE = ObjC; SUPERCLASS = NSTextField; },
- {CLASS = VariableTable; LANGUAGE = ObjC; SUPERCLASS = BetterTableView; }
- );
- IBVersion = 1;
-}
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>IBDocumentLocation</key>
- <string>540 85 356 394 0 0 1280 938 </string>
- <key>IBEditorPositions</key>
- <dict>
- <key>24</key>
- <string>420 519 440 253 0 0 1280 938 </string>
- <key>45</key>
- <string>420 519 440 253 0 0 1280 938 </string>
- </dict>
- <key>IBFramework Version</key>
- <string>437.0</string>
- <key>IBOpenObjects</key>
- <array>
- <integer>122</integer>
- <integer>757</integer>
- <integer>643</integer>
- <integer>45</integer>
- <integer>5</integer>
- <integer>24</integer>
- <integer>483</integer>
- </array>
- <key>IBSystem Version</key>
- <string>8B15</string>
-</dict>
-</plist>
+++ /dev/null
-{
- IBClasses = (
- {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
- {
- CLASS = HelpController;
- LANGUAGE = ObjC;
- OUTLETS = {helpWindow = NSWindow; webView = WebView; };
- SUPERCLASS = NSWindowController;
- }
- );
- IBVersion = 1;
-}
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>IBDocumentLocation</key>
- <string>69 61 356 241 0 0 1280 1002 </string>
- <key>IBFramework Version</key>
- <string>364.0</string>
- <key>IBOpenObjects</key>
- <array>
- <integer>18</integer>
- </array>
- <key>IBSystem Version</key>
- <string>7U16</string>
-</dict>
-</plist>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>IBClasses</key>
- <array>
- <dict>
- <key>ACTIONS</key>
- <dict>
- <key>ibAddCheatVariable</key>
- <string>id</string>
- <key>ibAddSearchVariable</key>
- <string>id</string>
- <key>ibCancelDump</key>
- <string>id</string>
- <key>ibCancelSearch</key>
- <string>id</string>
- <key>ibCheat</key>
- <string>id</string>
- <key>ibClearSearch</key>
- <string>id</string>
- <key>ibDumpMemory</key>
- <string>id</string>
- <key>ibEndCustomServerSheet</key>
- <string>id</string>
- <key>ibEndEditVariablesSheet</key>
- <string>id</string>
- <key>ibEndPasswordSheet</key>
- <string>id</string>
- <key>ibEndPropertiesSheet</key>
- <string>id</string>
- <key>ibPauseTarget</key>
- <string>id</string>
- <key>ibRedo</key>
- <string>id</string>
- <key>ibResumeTarget</key>
- <string>id</string>
- <key>ibRunCustomServerSheet</key>
- <string>id</string>
- <key>ibRunEditVariablesSheet</key>
- <string>id</string>
- <key>ibRunPasswordSheet</key>
- <string>id</string>
- <key>ibRunPropertiesSheet</key>
- <string>id</string>
- <key>ibSearch</key>
- <string>id</string>
- <key>ibSetCheatRepeats</key>
- <string>id</string>
- <key>ibSetCustomCheater</key>
- <string>id</string>
- <key>ibSetIntegerSign</key>
- <string>id</string>
- <key>ibSetLocalCheater</key>
- <string>id</string>
- <key>ibSetNoCheater</key>
- <string>id</string>
- <key>ibSetOperator</key>
- <string>id</string>
- <key>ibSetProcess</key>
- <string>id</string>
- <key>ibSetRemoteCheater</key>
- <string>id</string>
- <key>ibSetRepeatInterval</key>
- <string>id</string>
- <key>ibSetValueUsed</key>
- <string>id</string>
- <key>ibSetVariableEnabled</key>
- <string>id</string>
- <key>ibSetVariableType</key>
- <string>id</string>
- <key>ibStopCheat</key>
- <string>id</string>
- <key>ibToggleSearchCheat</key>
- <string>id</string>
- <key>ibUndo</key>
- <string>id</string>
- </dict>
- <key>CLASS</key>
- <string>CheatDocument</string>
- <key>LANGUAGE</key>
- <string>ObjC</string>
- <key>OUTLETS</key>
- <dict>
- <key>ibCheatButton</key>
- <string>NSButton</string>
- <key>ibCheatContentView</key>
- <string>NSView</string>
- <key>ibCheatInfoField</key>
- <string>NSTextField</string>
- <key>ibCheatInfoText</key>
- <string>NSTextField</string>
- <key>ibCheatRepeatAuxText</key>
- <string>NSTextField</string>
- <key>ibCheatRepeatButton</key>
- <string>NSButton</string>
- <key>ibCheatRepeatField</key>
- <string>NSTextField</string>
- <key>ibCheatVariableTable</key>
- <string>BetterTableView</string>
- <key>ibCustomServerSheet</key>
- <string>NSWindow</string>
- <key>ibEditVariablesSheet</key>
- <string>NSWindow</string>
- <key>ibNewValueField</key>
- <string>NSTextField</string>
- <key>ibPasswordField</key>
- <string>NSTextField</string>
- <key>ibPasswordSheet</key>
- <string>NSWindow</string>
- <key>ibPlaceView</key>
- <string>NSView</string>
- <key>ibPortField</key>
- <string>NSTextField</string>
- <key>ibProcessPopup</key>
- <string>NSPopUpButton</string>
- <key>ibPropertiesSheet</key>
- <string>NSWindow</string>
- <key>ibSearchButton</key>
- <string>NSButton</string>
- <key>ibSearchClearButton</key>
- <string>NSButton</string>
- <key>ibSearchContentView</key>
- <string>NSView</string>
- <key>ibSearchIntegerSignMatrix</key>
- <string>NSMatrix</string>
- <key>ibSearchOperatorPopup</key>
- <string>NSPopUpButton</string>
- <key>ibSearchTypePopup</key>
- <string>NSPopUpButton</string>
- <key>ibSearchValueField</key>
- <string>NSTextField</string>
- <key>ibSearchValueUsedMatrix</key>
- <string>NSMatrix</string>
- <key>ibSearchVariableButton</key>
- <string>NSButton</string>
- <key>ibSearchVariableTable</key>
- <string>VariableTable</string>
- <key>ibServerField</key>
- <string>NSTextField</string>
- <key>ibServerPopup</key>
- <string>NSPopUpButton</string>
- <key>ibStatusBar</key>
- <string>NSProgressIndicator</string>
- <key>ibStatusText</key>
- <string>StatusTextField</string>
- <key>ibWindow</key>
- <string>NSWindow</string>
- <key>ibWindowTitleField</key>
- <string>NSTextField</string>
- </dict>
- <key>SUPERCLASS</key>
- <string>NSDocument</string>
- </dict>
- <dict>
- <key>CLASS</key>
- <string>BetterTableView</string>
- <key>LANGUAGE</key>
- <string>ObjC</string>
- <key>SUPERCLASS</key>
- <string>NSTableView</string>
- </dict>
- <dict>
- <key>CLASS</key>
- <string>NSMenu</string>
- <key>LANGUAGE</key>
- <string>ObjC</string>
- <key>SUPERCLASS</key>
- <string>NSObject</string>
- </dict>
- <dict>
- <key>CLASS</key>
- <string>StatusTextField</string>
- <key>LANGUAGE</key>
- <string>ObjC</string>
- <key>SUPERCLASS</key>
- <string>NSTextField</string>
- </dict>
- <dict>
- <key>ACTIONS</key>
- <dict>
- <key>ibAddCheatVariable</key>
- <string>id</string>
- <key>ibCancelSearch</key>
- <string>id</string>
- <key>ibClearSearch</key>
- <string>id</string>
- <key>ibDumpMemory</key>
- <string>id</string>
- <key>ibPauseTarget</key>
- <string>id</string>
- <key>ibRedo</key>
- <string>id</string>
- <key>ibRunEditVariablesSheet</key>
- <string>id</string>
- <key>ibRunPropertiesSheet</key>
- <string>id</string>
- <key>ibToggleSearchCheat</key>
- <string>id</string>
- <key>ibUndo</key>
- <string>id</string>
- </dict>
- <key>CLASS</key>
- <string>FirstResponder</string>
- <key>LANGUAGE</key>
- <string>ObjC</string>
- <key>SUPERCLASS</key>
- <string>NSObject</string>
- </dict>
- <dict>
- <key>CLASS</key>
- <string>NSObject</string>
- <key>LANGUAGE</key>
- <string>ObjC</string>
- </dict>
- <dict>
- <key>CLASS</key>
- <string>VariableTable</string>
- <key>LANGUAGE</key>
- <string>ObjC</string>
- <key>SUPERCLASS</key>
- <string>BetterTableView</string>
- </dict>
- <dict>
- <key>ACTIONS</key>
- <dict>
- <key>checkForUpdate</key>
- <string>id</string>
- <key>launchEmailMenu</key>
- <string>id</string>
- <key>launchHelpFile</key>
- <string>id</string>
- <key>launchWebsiteMenu</key>
- <string>id</string>
- <key>newBlankCheatWindow</key>
- <string>id</string>
- <key>newSearchWindow</key>
- <string>id</string>
- <key>showAboutBoxWindow</key>
- <string>id</string>
- <key>showPreferenceWindow</key>
- <string>id</string>
- </dict>
- <key>CLASS</key>
- <string>AppController</string>
- <key>LANGUAGE</key>
- <string>ObjC</string>
- <key>SUPERCLASS</key>
- <string>NSApplication</string>
- </dict>
- </array>
- <key>IBVersion</key>
- <string>1</string>
-</dict>
-</plist>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>IBFramework Version</key>
- <string>677</string>
- <key>IBLastKnownRelativeProjectPath</key>
- <string>../The Cheat.xcodeproj</string>
- <key>IBOldestOS</key>
- <integer>5</integer>
- <key>IBOpenObjects</key>
- <array>
- <integer>370</integer>
- </array>
- <key>IBSystem Version</key>
- <string>9J61</string>
- <key>targetFramework</key>
- <string>IBCocoaFramework</string>
-</dict>
-</plist>
+++ /dev/null
-{
- IBClasses = (
- {
- ACTIONS = {copy = id; cut = id; delete = id; paste = id; };
- CLASS = BetterTableView;
- LANGUAGE = ObjC;
- SUPERCLASS = NSTableView;
- },
- {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
- {
- ACTIONS = {
- ibDisplayValuesButton = id;
- ibSetAskForSave = id;
- ibSetFadeSmoothly = id;
- ibSetResultsDisplayed = id;
- ibSetValueUpdate = id;
- ibStartEditingVarsButton = id;
- ibSwitchVariablesButton = id;
- ibWindowOrderButton = id;
- };
- CLASS = GeneralPrefs;
- LANGUAGE = ObjC;
- OUTLETS = {
- ibAskForSaveButton = NSButton;
- ibDisplayValuesButton = NSButton;
- ibFadeSmoothlyButton = NSButton;
- ibResultsDisplayedField = NSTextField;
- ibStartEditingVarsButton = NSButton;
- ibSwitchVariablesButton = NSButton;
- ibValueUpdateField = NSTextField;
- ibWindowOrderButton = NSButton;
- };
- SUPERCLASS = NSObject;
- },
- {CLASS = NSObject; LANGUAGE = ObjC; },
- {
- CLASS = PreferenceController;
- LANGUAGE = ObjC;
- OUTLETS = {ibGeneralView = NSView; ibServerView = NSView; ibUpdateCheckView = NSView; };
- SUPERCLASS = NSWindowController;
- },
- {
- ACTIONS = {ibSetBroadcast = id; ibSetListenPort = id; ibStartServer = id; };
- CLASS = ServerPrefs;
- LANGUAGE = ObjC;
- OUTLETS = {
- ibDefaultPortText = NSTextField;
- ibNameField = NSTextField;
- ibPortField = NSTextField;
- ibSessionTable = NSTableView;
- ibStartButton = NSButton;
- ibStatusField = StatusTextField;
- };
- SUPERCLASS = NSObject;
- },
- {CLASS = StatusTextField; LANGUAGE = ObjC; SUPERCLASS = NSTextField; },
- {
- ACTIONS = {ibAutoCheckButton = id; ibCheckNowButton = id; };
- CLASS = UpdatePrefs;
- LANGUAGE = ObjC;
- OUTLETS = {ibAutoCheckButton = NSButton; };
- SUPERCLASS = NSObject;
- }
- );
- IBVersion = 1;
-}
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>IBDocumentLocation</key>
- <string>333 104 431 282 0 0 1280 938 </string>
- <key>IBEditorPositions</key>
- <dict>
- <key>441</key>
- <string>325 550 476 321 0 0 1280 938 </string>
- <key>463</key>
- <string>402 570 476 210 0 0 1280 938 </string>
- <key>478</key>
- <string>402 433 476 420 0 0 1280 938 </string>
- </dict>
- <key>IBFramework Version</key>
- <string>437.0</string>
- <key>IBLockedObjects</key>
- <array/>
- <key>IBOpenObjects</key>
- <array>
- <integer>441</integer>
- </array>
- <key>IBSystem Version</key>
- <string>8A428</string>
-</dict>
-</plist>
<string>icon.icns</string>
<key>CFBundleIdentifier</key>
<string>com.brokenzipper.TheCheat</string>
- <key>SecTaskAccess</key>
- <string>allowed</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
- <string>1.2.5</string>
+ <string>1.2.6</string>
<key>CFBundleSignature</key>
<string>chœt</string>
<key>CFBundleURLTypes</key>
</dict>
</array>
<key>CFBundleVersion</key>
- <string>1.2.5</string>
+ <string>1.2.6</string>
<key>NSAppleScriptEnabled</key>
<string>YES</string>
<key>NSMainNibFile</key>
<string>MainMenu</string>
<key>NSPrincipalClass</key>
<string>AppController</string>
+ <key>SecTaskAccess</key>
+ <string>allowed</string>
</dict>
</plist>
TCArray variables;
TCArray values;
- if ( searchContext = [_searchResults lastObject] ) {
+ if ( (searchContext = [_searchResults lastObject]) ) {
[_savedResults addObject:searchContext];
[_searchResults removeLastObject];
[self stopWatchingVariables];
- if ( searchContext = [_searchResults lastObject] ) {
+ if ( (searchContext = [_searchResults lastObject]) ) {
if ( _shouldCopy ) {
variables = TCArrayCopyElements( searchContext->addresses, _returnLimit );
values = TCArrayCopyElements( searchContext->values, _returnLimit );
[self stopWatchingVariables];
- if ( searchContext = [_savedResults lastObject] ) {
+ if ( (searchContext = [_savedResults lastObject]) ) {
[_searchResults addObject:searchContext];
[_savedResults removeLastObject];
return;
}
- if ( context = [_searchResults lastObject] ) {
+ if ( (context = [_searchResults lastObject]) ) {
TCArray addresses = context->addresses;
TCArray values = context->values;
// check the index & count
addr.sin_family = AF_INET;
addr.sin_port = htons( (short)port );
addr.sin_addr.s_addr = INADDR_ANY;
- memset( &(addr.sin_zero), NULL, 8 );
+ // Use 0 replace NULL
+ memset( &(addr.sin_zero), 0, 8 );
err = bind( _sockfd, (struct sockaddr *)(&addr), sizeof(addr) );
if ( err == -1 ) {
if ( err == -1 ) {
return @"";
}
- return [NSString stringWithCString:host];
+ return [NSString stringWithCString:host encoding:NSUTF8StringEncoding];
}
- (int)localPort
{
int err;
struct sockaddr_in addr;
- int len = sizeof(addr);
+ unsigned int len = sizeof(addr);
err = getpeername( _sockfd, (struct sockaddr *)(&addr), &len );
if ( err == -1 ) {
return @"Unknown";
}
- return [NSString stringWithCString:inet_ntoa(addr.sin_addr)];
+ return [NSString stringWithCString:inet_ntoa(addr.sin_addr) encoding:NSUTF8StringEncoding];
}
- (int)remotePort
{
int err;
struct sockaddr_in addr;
- int len = sizeof(addr);
+ unsigned int len = sizeof(addr);
err = getpeername( _sockfd, (struct sockaddr *)(&addr), &len );
if ( err == -1 ) {
struct sockaddr_in addr;
// resolve the host
- h = gethostbyname( [host lossyCString] );
+ h = gethostbyname( [host cStringUsingEncoding:NSUTF8StringEncoding] );
if ( h == NULL ) {
// host not found
return nil;
addr.sin_family = AF_INET;
addr.sin_port = htons( (short)port );
memcpy( &(addr.sin_addr), h->h_addr, sizeof(struct in_addr) );
- memset( &(addr.sin_zero), NULL, 8 );
+ // Use 0 replace NULL
+ memset( &(addr.sin_zero), 0, 8 );
return [NSData dataWithBytes:&addr length:sizeof(addr)];
}
MySocket *newSocket;
int newsockfd;
struct sockaddr addr;
- int addrlen = sizeof(addr);
+ unsigned int addrlen = sizeof(addr);
newsockfd = accept( _sockfd, &addr, &addrlen );
if ( newsockfd >= 0 ) {
[_writeLock lock];
if ( [_writeQueue count] > 0 ) {
int buflen = 0;
- int len = sizeof(buflen);
+ unsigned int len = sizeof(buflen);
int err;
err = getsockopt( _sockfd, SOL_SOCKET, SO_SNDBUF, &buflen, &len );
// write data
NSMutableData *buffer;
unsigned packetLen = *len;
- if ( buffer = _unclaimedData ) {
+ if ( (buffer = _unclaimedData) ) {
// claim the bytes
int unclaimedLen = [_unclaimedData length];
if ( unclaimedLen > packetLen ) {
NSWindow *window = [self window];
[self switchToView:ibGeneralView];
[window setTitle:@"General"];
- if ( MacOSXVersion() >= 0x1030 ) {
- [_toolbar setSelectedItemIdentifier:@"General"];
- }
+ [_toolbar setSelectedItemIdentifier:@"General"];
}
- (void)chooseServer:(id)object
NSWindow *window = [self window];
[self switchToView:ibServerView];
[window setTitle:@"Server"];
- if ( MacOSXVersion() >= 0x1030 ) {
- [_toolbar setSelectedItemIdentifier:@"Server"];
- }
+ [_toolbar setSelectedItemIdentifier:@"Server"];
}
- (void)chooseUpdate:(id)object
NSWindow *window = [self window];
[self switchToView:ibUpdateCheckView];
[window setTitle:@"Update Check"];
- if ( MacOSXVersion() >= 0x1030 ) {
- [_toolbar setSelectedItemIdentifier:@"Update Check"];
- }
+ [_toolbar setSelectedItemIdentifier:@"Update Check"];
}
- (void)switchToView:(NSView *)view
// reselect the last item if the selection is now invalid
len = [[NSApp cheatServer] childCount] - 1;
if ( [aTableView selectedRow] > len ) {
- [aTableView selectRow:len byExtendingSelection:NO];
+ [aTableView selectRowIndexes:[NSIndexSet indexSetWithIndex:len] byExtendingSelection:NO];
}
[aTableView reloadData];
}
archiveVersion = 1;
classes = {
};
- objectVersion = 45;
+ objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
/* Begin PBXProject section */
29B97313FDCFA39411CA2CEA /* Project object */ = {
isa = PBXProject;
+ attributes = {
+ LastUpgradeCheck = 0420;
+ };
buildConfigurationList = 779E59840EB52C64000C6482 /* Build configuration list for PBXProject "The Cheat" */;
- compatibilityVersion = "Xcode 3.1";
+ compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 1;
knownRegions = (
Japanese,
French,
German,
+ "zh-Hans",
);
mainGroup = 29B97314FDCFA39411CA2CEA /* The Cheat */;
projectDirPath = "";
779E59810EB52C64000C6482 /* Development */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ CODE_SIGN_IDENTITY = "";
COPY_PHASE_STRIP = NO;
DEAD_CODE_STRIPPING = YES;
DEBUGGING_SYMBOLS = YES;
FRAMEWORK_SEARCH_PATHS = "";
GCC_AUTO_VECTORIZATION = YES;
GCC_DYNAMIC_NO_PIC = NO;
- GCC_ENABLE_FIX_AND_CONTINUE = YES;
- GCC_ENABLE_OBJC_EXCEPTIONS = NO;
+ GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_ENABLE_TRIGRAPHS = NO;
GCC_FAST_OBJC_DISPATCH = YES;
GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
GCC_WARN_UNKNOWN_PRAGMAS = NO;
HEADER_SEARCH_PATHS = "";
INFOPLIST_FILE = Info.plist;
- INSTALL_PATH = "$(HOME)/Applications";
+ INSTALL_PATH = /Applications;
LIBRARY_SEARCH_PATHS = "";
- MACOSX_DEPLOYMENT_TARGET = 10.2;
+ MACOSX_DEPLOYMENT_TARGET = 10.7;
OTHER_CFLAGS = "-D_DEBUG";
OTHER_LDFLAGS = (
"-sectcreate",
Info.plist,
);
PRODUCT_NAME = "The Cheat";
+ SDKROOT = macosx;
SECTORDER_FLAGS = "";
WARNING_CFLAGS = (
"-Wmost",
779E59820EB52C64000C6482 /* Deployment */ = {
isa = XCBuildConfiguration;
buildSettings = {
- ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+ ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
CODE_SIGN_IDENTITY = "";
COPY_PHASE_STRIP = YES;
DEAD_CODE_STRIPPING = YES;
FRAMEWORK_SEARCH_PATHS = "";
GCC_AUTO_VECTORIZATION = YES;
GCC_DYNAMIC_NO_PIC = YES;
- GCC_ENABLE_FIX_AND_CONTINUE = NO;
- GCC_ENABLE_OBJC_EXCEPTIONS = NO;
+ GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_ENABLE_TRIGRAPHS = NO;
GCC_FAST_OBJC_DISPATCH = YES;
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
GCC_WARN_UNKNOWN_PRAGMAS = NO;
HEADER_SEARCH_PATHS = "";
INFOPLIST_FILE = Info.plist;
- INSTALL_PATH = "$(HOME)/Applications";
+ INSTALL_PATH = /Applications;
LIBRARY_SEARCH_PATHS = "";
- MACOSX_DEPLOYMENT_TARGET = 10.2;
+ MACOSX_DEPLOYMENT_TARGET = 10.7;
OTHER_CFLAGS = "";
OTHER_LDFLAGS = (
"-sectcreate",
Info.plist,
);
PRODUCT_NAME = "The Cheat";
- PROVISIONING_PROFILE = "";
- SDKROOT = macosx10.3.9;
- "SDKROOT[arch=i386]" = macosx10.4;
- "SDKROOT[arch=ppc]" = macosx10.3.9;
+ SDKROOT = macosx;
SECTORDER_FLAGS = "";
WARNING_CFLAGS = (
"-Wmost",
779E59830EB52C64000C6482 /* Default */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ CODE_SIGN_IDENTITY = "";
COPY_PHASE_STRIP = YES;
DEAD_CODE_STRIPPING = YES;
FRAMEWORK_SEARCH_PATHS = "";
GCC_AUTO_VECTORIZATION = YES;
GCC_DYNAMIC_NO_PIC = YES;
- GCC_ENABLE_OBJC_EXCEPTIONS = NO;
+ GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_ENABLE_TRIGRAPHS = NO;
GCC_FAST_OBJC_DISPATCH = YES;
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
GCC_WARN_UNKNOWN_PRAGMAS = NO;
HEADER_SEARCH_PATHS = "";
INFOPLIST_FILE = Info.plist;
- INSTALL_PATH = "$(HOME)/Applications";
+ INSTALL_PATH = /Applications;
LIBRARY_SEARCH_PATHS = "";
+ MACOSX_DEPLOYMENT_TARGET = 10.7;
OTHER_CFLAGS = "";
OTHER_LDFLAGS = "";
PRODUCT_NAME = "The Cheat";
+ SDKROOT = macosx;
SECTORDER_FLAGS = "";
WARNING_CFLAGS = (
"-Wmost",
- (id)initWithTarget:(id)target selector:(SEL)selector context:(id)context delegate:(id)delegate
{
- if ( self = [self _initWithContext:context delegate:delegate] ) {
+ if ( (self = [self _initWithContext:context delegate:delegate]) ) {
// set initial values
[self setTarget:target selector:selector];
}
- (id)initWithFunction:(int (*)(ThreadedTask *, unsigned))function context:(id)context delegate:(id)delegate
{
- if ( self = [self _initWithContext:context delegate:delegate] ) {
+ if ( (self = [self _initWithContext:context delegate:delegate]) ) {
// set initial values
[self setFunction:function];
}
NSScanner *scanner = [NSScanner scannerWithString:string];
TCAddress address;
-#if MAC_OS_X_VERSION_10_5 <= MAC_OS_X_VERSION_MAX_ALLOWED
if ( [scanner scanHexLongLong:(unsigned long long *)(&address)] ) {
-#else
- if ( [scanner scanHexInt:(unsigned *)(&address)] ) {
-#endif
[self setAddress:address];
return YES;
}
switch ( _type ) {
case TCDouble: return [NSString stringWithFormat:@"%.1lf", *(double *)[self value]];
case TCFloat: return [NSString stringWithFormat:@"%.1f", *(float *)[self value]];
- case TCString: return [NSString stringWithCString:[self value] length:[self valueSize]];
+ case TCString: return [[[NSString alloc] initWithBytes:[self value] length:[self valueSize] encoding:NSUTF8StringEncoding] autorelease];
}
if ( _integerSign == TCUnsigned ) {
switch ( _type ) {
}
case TCString:
{
- char *str = (char *)[string lossyCString];
+ char *str = (char *)[string cStringUsingEncoding:NSUTF8StringEncoding];
unsigned len = strlen( str );
[self setValue:str size:len];
break;
_enabled = enabled;
}
-
-#if MAC_OS_X_VERSION_10_5 <= MAC_OS_X_VERSION_MAX_ALLOWED
- (NSInteger)tag
-#else
-- (int)tag
-#endif
{
return _tag;
}
-#if MAC_OS_X_VERSION_10_5 <= MAC_OS_X_VERSION_MAX_ALLOWED
+
- (void)setTag:(NSInteger)tag
-#else
-- (void)setTag:(int)tag
-#endif
{
_tag = tag;
}
TrackerScroller *scroller = [[TrackerScroller alloc] initWithFrame:[oldScroller frame]];
[scroller setControlSize:[oldScroller controlSize]];
- [scroller setFloatValue:[oldScroller floatValue] knobProportion:[oldScroller knobProportion]];
+ [scroller setDoubleValue:[oldScroller floatValue]];
+ [scroller setKnobProportion:[oldScroller knobProportion]];
[scroller setControlTint:[oldScroller controlTint]];
// set the new scroller
ChazDebugSetup();
ChazMapLogToDebug();
-
-#ifdef __ppc__
- // PPC machines whose operating system is below leopard do not need authorization
- SInt32 osxMajorVersion;
- Gestalt(gestaltSystemVersionMinor, &osxMajorVersion);
- if (osxMajorVersion < 5)
- {
- [pool release];
- return NSApplicationMain(argc, (const char **) argv);
- }
-#endif
-
+
if (amIWorthy())
{
#ifndef _DEBUG