Page 2 of 3 FirstFirst 123 LastLast
Results 16 to 30 of 33
  1. #16
    frozenasasin's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    In my home
    Posts
    213
    Reputation
    -6
    Thanks
    20
    My Mood
    Bored
    Quote Originally Posted by Brinuz View Post
    Code:
    #import <Cocoa/Cocoa.h>
    
    int main(int argc, char *argv[])
    {
    	return NSApplicationMain(argc, (const char **) argv);
    }
    
    #import "UberCalculatorController.h"
    #import "UberCalculator_prefix.pch.h"
    
    @implementation MasterView
    
    - (id) initWithFrame: (CGRect) frame 
    {
    	//NSLog(@"MasterView initWithFrame");
    
    	self = [super initWithFrame: frame];
    	views = [[NSMutableArray alloc] init];
    	currentViewIndex = -1;
    
    	return self;
    }
    
    - (BOOL) canHandleSwipes 
    {
    	return TRUE;
    }
    
    - (int)swipe:(int)type withEvent:(struct __GSEvent *)event 
    {
    	//NSLog(@"MasterView swipe: %d withEvent: %@", type, event);
    	int transType = 0;
    
    	if (type == 4) 
    	{ 
    	// kUIViewSwipeLeft
    	transType = 1;
    	currentViewIndex--;
    		if (currentViewIndex < 0) 
    		{
    			currentViewIndex = [views count] - 1;
    		}
    	} 
    	else if (type == 8) 
    	{ 
    	//kUIViewSwipeRight
    		transType = 2;
    		currentViewIndex++;
    
    		if (currentViewIndex == [views count]) 
    		{
    			currentViewIndex = 0;
    		}
    	}
    
    	//NSLog(@"transition to view %d", currentViewIndex);
    	if (transType != 0) 
    	{
    		[self transition:transType toView: [views objectAtIndex: currentViewIndex]]; 
    	}
    
    	// transition to current view
    	return [ super swipe:type withEvent:event ];
    }
    
    - (void) addView: (id) fp8 
    {
    	[views addObject: fp8]; 
    	if (currentViewIndex == -1) 
    	{
    		[super addSubview: fp8];
    		currentViewIndex = 0;
    	}
    }
    
    - (void) dealloc 
    {
    	[views release];
    	[super dealloc];
    }
    @end
    
    @implementation CalculatorApp
    
    - (void) handleCommand: (NSString *) command
    {
    	//NSLog(@"CalculatorApp handleCommand: [%@]", command);
    
    	// pass the commands down the chain
    	[engine sendCommand: command];
    
    	// then update all the views...
    	[self updateViews];
    }
    
    - (void) updateViews 
    {
    	[basicCalculatorView updateView];
    }
    
    - (void) applicationDidFinishLaunching: (id) fp8 
    {
    	engine = [[CalculatorEngine alloc] init];
    
    
    	struct CGRect frame = [UIHardware fullScreenApplicationContentRect];
    	frame.origin.x = frame.origin.y = 0.0f;
    	mainWindow = [[UIWindow alloc] initWithContentRect: frame];
    
    	masterView = [[MasterView alloc] initWithFrame: frame];
    
    
    	basicCalculatorView = [[BasicCalculatorView alloc] initWithFrame: frame withController: self withEngine: engine withType: 0];
    	[masterView addView: basicCalculatorView];
    
    	sciCalculatorView = [[BasicCalculatorView alloc] initWithFrame: frame withController: self withEngine: engine withType: 1];
    	[masterView addView: sciCalculatorView];
    
    
    	navView = [[UINavigationBar alloc] initWithFrame: CGRectMake(0.0f, 0.0f, 320.0f, 48.0f)];
    	[navView showButtonsWithLeftTitle: @"Decimal" rightTitle: @"Hex" leftBack: YES];
    	[navView setPrompt: @"Caclulator2"];
    	[navView setBarStyle: 0];
    	[navView enableAnimation];
    	//[masterView addView: navView];
    
    	diagView = [[UITouchDiagnosticsLayer alloc] initWithFrame: frame];
    	[diagView setDisplayChargeMap: true];
    	[diagView setDisplayHitRects: true];
    	[diagView setDisplayTouchEvents: true];
    	[diagView setTrackTouchEvents: true];
    	//[masterView addView: diagView];
    
    
    	[mainWindow orderFront: self];
    	[mainWindow makeKey: self];
    	[mainWindow _setHidden: NO]; 
    	[mainWindow setContentView: masterView]; 
    }
    
    - (void)acceleratedInX:(float)xx Y:(float)yy Z:(float)zz 
    {
    	NSLog(@"accelerated x=%g, y=%g, z=%g", xx, yy, zz);
    }
    
    @end
    looks better
    That doesnt work
    SOTW 44 Entry

  2. #17
    'Bruno's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Portugal
    Posts
    2,883
    Reputation
    290
    Thanks
    1,036
    My Mood
    Busy
    Quote Originally Posted by frozenasasin View Post

    That doesnt work
    its the same code as you posted, but it is just "cleaner" and easier to look at.

    edit:
    dude i just builded it and had no errors...
    Last edited by 'Bruno; 06-13-2010 at 08:12 AM.
    Light travels faster than sound. That's why most people seem bright until you hear them speak.

  3. The Following User Says Thank You to 'Bruno For This Useful Post:

    mwb1234 (06-13-2010)

  4. #18
    frozenasasin's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    In my home
    Posts
    213
    Reputation
    -6
    Thanks
    20
    My Mood
    Bored
    oh okay :-)
    SOTW 44 Entry

  5. #19
    serpentine's Avatar
    Join Date
    Aug 2008
    Gender
    male
    Location
    In your moms bed
    Posts
    1,623
    Reputation
    22
    Thanks
    176
    What? lolololol!
    [IMG]https://i306.photobucke*****m/albums/nn265/chugsweet23/Reverb.png[/IMG]


    Bans: 1337

    .:Gifts:.

    Johhny 3 Tears: [x] [x]

  6. #20
    mwb1234's Avatar
    Join Date
    May 2009
    Gender
    male
    Posts
    460
    Reputation
    7
    Thanks
    65
    Have we just wasted a bunch of time, only to find out this works? Whatever no harm done

  7. #21
    serpentine's Avatar
    Join Date
    Aug 2008
    Gender
    male
    Location
    In your moms bed
    Posts
    1,623
    Reputation
    22
    Thanks
    176
    How can he get that error and now, he's like all fine? /facepalm
    [IMG]https://i306.photobucke*****m/albums/nn265/chugsweet23/Reverb.png[/IMG]


    Bans: 1337

    .:Gifts:.

    Johhny 3 Tears: [x] [x]

  8. #22
    'Bruno's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Portugal
    Posts
    2,883
    Reputation
    290
    Thanks
    1,036
    My Mood
    Busy
    Light travels faster than sound. That's why most people seem bright until you hear them speak.

  9. #23
    serpentine's Avatar
    Join Date
    Aug 2008
    Gender
    male
    Location
    In your moms bed
    Posts
    1,623
    Reputation
    22
    Thanks
    176
    ROFLMFAO IRL!
    Last edited by serpentine; 06-13-2010 at 11:42 AM.
    [IMG]https://i306.photobucke*****m/albums/nn265/chugsweet23/Reverb.png[/IMG]


    Bans: 1337

    .:Gifts:.

    Johhny 3 Tears: [x] [x]

  10. #24
    Void's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Inline.
    Posts
    3,198
    Reputation
    205
    Thanks
    1,445
    My Mood
    Mellow
    Try to stay on topic guys.

  11. The Following User Says Thank You to Void For This Useful Post:

    Hell_Demon (06-13-2010)

  12. #25
    serpentine's Avatar
    Join Date
    Aug 2008
    Gender
    male
    Location
    In your moms bed
    Posts
    1,623
    Reputation
    22
    Thanks
    176
    Where's HD? He's already failing as minion. >.<
    [IMG]https://i306.photobucke*****m/albums/nn265/chugsweet23/Reverb.png[/IMG]


    Bans: 1337

    .:Gifts:.

    Johhny 3 Tears: [x] [x]

  13. #26
    'Bruno's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Portugal
    Posts
    2,883
    Reputation
    290
    Thanks
    1,036
    My Mood
    Busy
    Quote Originally Posted by Void View Post
    Try to stay on topic guys.
    i guess its just already answered david :\
    hell should close it when he comes ^^
    Light travels faster than sound. That's why most people seem bright until you hear them speak.

  14. #27
    mwb1234's Avatar
    Join Date
    May 2009
    Gender
    male
    Posts
    460
    Reputation
    7
    Thanks
    65
    Quote Originally Posted by serpentine View Post
    Where's HD? He's already failing as minion. >.<
    You Mr Noob better shut up, Hell is almost always on... Literally, whenever I log on Messenger, he is on... Respect him, or you better fear the BanHammer!

    Quote Originally Posted by Void View Post
    Try to stay on topic guys.
    Good Point:

    Is this error resolved or not? Please answer so I can help.

  15. #28
    frozenasasin's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    In my home
    Posts
    213
    Reputation
    -6
    Thanks
    20
    My Mood
    Bored
    It does NOT work. ive tried it a million times but thanks for your effort on trying to help me! :-)
    SOTW 44 Entry

  16. #29
    'Bruno's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Portugal
    Posts
    2,883
    Reputation
    290
    Thanks
    1,036
    My Mood
    Busy
    Quote Originally Posted by frozenasasin View Post
    It does NOT work. ive tried it a million times but thanks for your effort on trying to help me! :-)
    dude i just c&p what you gave and compiled it without problems..

    plus i realized that you have 6 errors but showing only 3.. -.-
    Light travels faster than sound. That's why most people seem bright until you hear them speak.

  17. #30
    Melodia's Avatar
    Join Date
    Dec 2009
    Gender
    female
    Posts
    2,608
    Reputation
    276
    Thanks
    1,662
    My Mood
    Dead
    Pheraps your IDE is just acting Fuzzy, Happens sometimes with MiCrapSoft VStudio.

    So ; Start a new xCode project and paste it in ?

    You certainly just added a parameter than shouldn't be there to the compiler or something dumb like that, Just do what meh says =).

    ( Psst; Mel's Warranty does not cover.... Zombie Bites =). ... Okay Out of topic...)
    Love You All~

Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

  1. Replies: 16
    Last Post: 09-14-2010, 07:32 PM
  2. Hellbreath Int Error?
    By RebornAce in forum General
    Replies: 10
    Last Post: 03-06-2009, 09:04 PM
  3. NOt about D/C, I get an error code before I even start
    By JewCrew162534 in forum Combat Arms Hacks & Cheats
    Replies: 3
    Last Post: 12-24-2008, 08:49 AM
  4. K Warrock error :(
    By i eat trees in forum WarRock - International Hacks
    Replies: 2
    Last Post: 01-26-2006, 08:40 PM