HI,
Due to formatting issues, I'm converting floats to NSNumber in my iPhone app. Although it generates proper strings it crashes program after releasing the object.
I wrote simple program as console app for Mac OS X and same problem occurs. Can anybody advise how to solve that? Here is the code sample. All 3 messages are written to l...
Can anyone explain me these pointers with a suitable example ... and when these pointers are used?
...
Hi,
What is causing the leaks in this code? I really cannot understand it.
On thes lines:
1: NSMutableArray * days = [[NSMutableArray alloc]init];
2: [dic setObject:days forKey:key];
3: [days addObject:value];
The whole method:
-(void) addValueToDictionary: (NSMutableDictionary *) dic withValue: (NSNumber *) value forKey: (NSString *) ...
I have the application which allows the users to play songs. I want to allow the user to listen to a maximum of three songs before forcing the user to log in. The user should be able to listen to these three songs during the course of the day, but if they still haven't logged in they should no longer be able to listen to these songs.
Ho...
Ok, this is really stumping me:
I create a modal sheet on a window as
-(IBAction) login: (id) sender {
[NSApp beginSheet:loginWindow
modalForWindow:window
modalDelegate:nil
didEndSelector:nil
contextInfo:nil];
}
and try to remove it with
-(IBAction) loginWindowCancelPressed: (id) sender {
debugLog(@"cancel")...
The iPhone has the UITableView for displaying lists and information, what is the best way to display the same type of lists using Cocoa for an OSX application? I'm trying to convert one of my iPhone apps to the desktop using Cocoa, but having a hard time finding the same type of list view.
Thanks for any help in advance!
...
I'm trying to clarify some of Obj-C classes composition issues. I have 3 classes: Car, Control, and Wheels.
Car class initializes Control and Wheels classes. I was going to create a simple test iPhone application containing a UISlider and UILabel. When UISlider value is changed, a message must be sent (I was going to send it from Contr...
I'm trying to add some UnitTests to a bunch of Cocoa Legacy code.
I created a Unit Test Bundle, and added all source and frameworks needed, but the build fails with this message:
2010-08-26 16:07:18.074 otest-x86_64[64675:903] The test bundle at
/Users/giordano/application/build/Release/UnitTest.octest
could not be loaded because its...
I want to be able to load data from my API server in the background of my iPhone app. How do I achieve this?
...
Here is a code fragment
#import "MyCustomView.h"
@implementation MyCustomView
-(void) drawRect:(CGRect)rect {
NSLog(@"Help");
CGContextRef myContext = [[NSGraphicsContext // 1
currentContext]graphicsPort];
....
Then at 1, I encountered this error message:
NSGraphicsContext undeclared (first...
I'm a newcomer to the iPhone world. (Previously, I've developed for android.)
I've got this code in one of my Android apps:
String body = "<Item type='Customer' id= '"+id+"' action='delete'/>";
What's the same in Objective-C?
...
I'm trying to build open_cv on the iphone. I'm a pre-compiled version of it from http://github.com/niw/iphone_opencv_test and am seeing the following build errors...
"_cvCvtColor", referenced from:
+[PFFaceDetection CreateIplImageFromUIImage:] in PFFaceDetection.o
"_OBJC_CLASS_$_PFImageEffects", referenced from:
ob...
Hello I turned on garbage collection (objective-c 2.0) and the image for the status item disappeared when I restarted my application. I am manually memory managing the image and status item. This application works normal when garbage collection is off. Is there a way to make the garbage collection not collect specific variables or sho...
Hey All,
I have problem with the way I treat the memory management in iphone..please please help me..I am running out of ideas..I tried to play with the below method but it started leaks when I am trying to allocate the strings for the objects (for example allocation for sid,first_name etc)..I can't figure out how to do..and this is the...
I've got some threads doing heavy work while my main thread handles the UI stuff. The threads callback to the main thread at times to update a progress bar.
All in all, it's not that stable. I've fixed problems relating to the logic, but one in particular persists. I've got some code that acts like a stop button, meaning that the thread...
I'm trying to pick up Objective-C but ran into a roadblock experimenting with the object syntax. When I try to call a method from a class I've defined, though, I'm getting this as output.
11:29:19 $ /Users/rsmith/Projects/Objective-C/Expedition/a.out; exit
Loading command-line wrapper...load successful!
2010-08-26 11:29:19.070 a.out[161...
Hi, is it possible to make text scroll horizontally and wrap when finished? Automatically scrolling like a NYSE ticker.
And is there a method that could get called on the re-wrap, so I could, for example, refresh the news feed?
I heard you can do this in Three20 but I'm not sure of the class / implementation.
Cheers!
...
Hi all,
Does anyone have a tutorial of how to use this Json framework. It basically allows parsing and generating of json but I have no idea how to use it!
I need to build up a Json request send it to the webservice and then parse the response.
...
Further to this question: http://stackoverflow.com/questions/3576724/nsrunloop-is-receiving-a-strange-selector-possible-race-condition-tomfoolery - where it was discovered that a UIGestureRecognizer was being deallocated and then receiving a message, I printed out the address of one of my GRs in order to see if it was the one being repor...
I'm new to developing in iOS and succesfully ran through a tutorial on how to create and connect outlets in a Mac OSX Cocoa App. However, when I try to follow the same process for my iPhone app, I keep hitting walls... (Apologies for the lengthy example- please bear with)
Project A:
In XCode:
Create new Mac OSX Cocoa Application
Cre...