objective-c

Objective-C grammar file for antlr and JCC

I am looking objective-c file for antlr and java compiler compiler. I have tried the objectivec grammar file from antlr site http://www.antlr.org/grammar/1212699960054/ObjectiveC2ansi.g but it is look like it broken. it failed in any source file. ...

Generated Custom Managed Object Class does not build

I have built an data model in Xcode and I have generated a custom managed object class from one of the entities in the model. I am not sure why but I don't think the custom class is building properly. For example if I just type some random stuff in the middle of a class declaration like: @class MyOtherClass; @interface MyClass : NSM...

How do I make an array of SystemSoundIDs? Using AudioToolbox framework

I'm used to creating sounds like this: NSString *explosionsoundpath = [[NSBundle mainBundle] pathForResource:@"explosion" ofType:@"caf"]; CFURLRef explosionurl = (CFURLRef ) [NSURL fileURLWithPath:explosionsoundpath]; AudioServicesCreateSystemSoundID (explosionurl, &explosion1a); AudioServicesCreateSystemSoundID (explosionurl, &explosio...

NSFetchedResultsController and BAD_ACCESS

Hi all, I have a UITableViewController that is fed by a NSFetchedResultsController. Everything worked fine, until I added if (self.fetchedResultsController != nil) { return self.fetchedResultsController; } to the beginning of my -(NSFetchedResultsController *)fetchedResultsController { method. The error I get is: Prog...

Reload a UITableView within a UIView

Hello, I am using MGTwitterEngine, and I have everthing working fairly smoothly. I am using it for an iPad program, and currently I have a UIView with a UITableView inside. I want to reload the table, but because I am using a UIViewController, I can't figure out how to target it. I understand the widely used method is: - (void)viewWill...

UITableView Sectioned Row Question

Hello, I have a sectioned UITableView using dictionaries adapting code from a tutorial (I don't have a link on me at the moment but I can dig it up if you really need it). Anyway I'm trying to have it delete an item from the list when I get this error (warning: its long) Terminating app due to uncaught exception 'NSInternalInconsiste...

Problem with info view on iPhone app

I am currently using this code to bring up an info view for an iPhone app. -(IBAction)showInfo:(id)sender { InfoView *info = [[InfoView alloc] initWithNibName:nil bundle:[NSBundle mainBundle]]; info.modalTransitionStyle = UIModalTransitionStylePartialCurl; [self presentModalViewController:info animated:YES]; [info release]; } And thi...

Objective C: Communicating between classes

I'm writing an iPhone program that has a login view controller that allows the user to login. I have a method I use within that controller that checks the authentication of the username and password. I'm using the keychain to store the username and password, but I'm wondering how I go about communicating outside of the class that the use...

iPhone storage in tmp directory

Hi everybody, I have a question from this stackoverflow question about iPhone storage. Like I already tried to answer, we can cache data in tmp directory. But a comment says that the data can be deleted when OS whimp. I don't understand exactly the problem that the comment says. I want to ask if the process of OS deleting tmp director...

Display a uiview object in a window

hi am trying to display a uiview class object in the window but the thing is that its not being displayed don't know for what reason am not able to sort out please do help me out, here's my code @interface Myview : UIViewController { UIView *move_view; UIButton *btn; } @end #import "Myview.h" @implementation My...

Localization of views

Hello, I am trying to make my app localized. I have followed this procedure http://www.switchonthecode.com/tutorials/a-simple-localization-example-for-the-iphone. And have deleted all localization and done it over again. I've seen other tutorials with exactly the same procedure. My view to localize is named InfoView.xib. I have: ...

regarding facebook post

is there any way to send image on Facebook and twitter through xcode currently i am sending test through following code NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObjectsAndKeys: @"", @"subject",msg, @"message", nil]; FBRequest *req = [FBRequest requestWithDelegate:self];...

Output of the Program ?

#include<stdio.h> int fun(int, int); typedef int (*pf) (int, int); int proc(pf, int, int); int main() { printf("%d\n", proc(fun, 6, 6)); return 0; } int fun(int a, int b) { return (a==b); } int proc(pf p, int a, int b) { return ((*p)(a, b)); } // direct link of program : http://codepad.org/fBIPiHGT ...

[iphone] video plays but no picture - just sound?!

Edit: if you come across this and want to know how I eventually solved it I gave up on that code below eventually and did this: -(void)playMovieAtURL:(NSURL*)theURL{ mediaPlayer = [[MPMoviePlayerViewController alloc] initWithContentURL:theURL]; [self presentMoviePlayerViewControllerAnimated:mediaPlayer]; mediaPlayer.view.ba...

Getting notified when a VPN connection disconnects

How can I, within my Cocoa app, get a notification when the currently running VPN connection disconnects? I'm running Snow Leopard. ...

Method Parameter NSUInteger and call using IndexPath.row gives warning to use a type cast

I am surprised that the following calls result in type-cast warning: I have a class MyClass with the following method: - (id) initWithData:(NSUInteger)mNumber; when I call this method using (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { MyClass *lClass = [[MyClass alloc] initWithData:i...

UILabel background color

I am trying to change the UILabel background color with this code - (void)viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; m_ShopName.text = m_CurrShop.m_Name; m_ShopAddress.layer.backgroundColor = [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:0.0].CGColor; } but nothing happend? help!! ...

cellForRowAtIndexPath doesnt get called

hello all, I build UIView with few labels and one UITableview. the problem is that when i load the view the method - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath never get called. the code: -(void)viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; m_ShopSalesTable ...

dismissModalView crash iphone app, but not with debugger on

Hi all, I have an iphone app with a modal view. The app crashes when the modal view get dismissed. As soon as the modal disappear at the bottom of the screen, and consequently the original view is shown behind, then the app crashes with no entry in console view. I have tried to switch debugger on and I discovered that the app just run ...

how to set new plot data for bar chart using core-plot?

I am new to objective-c and xcode. It would be very thankful if someone can point how to set new plot data for bar chart using core-plot. I need to set data like : y-axis and x-axis : as (10,1), (5,2), (20,3), (15,4) and the output should come as : --------------------- 30 25 20 # 15 # # 10 # # # 5 # # # # 1 2 3 ...