Here is what I try to do:
In a simple view-based project, I added a variable in appDelegate
NSObject* gObj;
@property(noatomic,retain) NSObject* gObj;
@synthesize gObj;
then in the testviewController.m viewDidLoad() I added such test code:
testAppDelegate* delegate=[[UIApplication sharedApplication] delegate];
NSObject* p1=[NSObj...
I have the following code which should update a value in NSUserDefaults:
- (id) createBoardWithTitle:(NSString *)pTitle withScores:(NSArray *)pScores andNames:(NSArray *)pNames andDisplayStrings:(NSArray *)pStrings orderBy:(NSString *)pOrder ofType:(NSString *)pType
{
if((self == [super init]))
{
boardEntries = [NSMutable...
I know it can be done by decoding the selector name returned from sel_getName.
But is there any other more convenient preloaded info in runtime that I can get?
...
I need html - java script / jquery charts using single file.
What do I need is as follows?
Above links are just for creating bar charts
I need to create line chart as well as pie charts & other charts.
I don't have knowledge regarding java scripts jQuery.
Inshort - I need the reports within single file.
( that is - no extra .css file ...
[Cocoa/Objective-C]
I adapted a timer routine (for current time) from this site (and it works great - thanks). It's currently attached to a button.
My question is: How do I make it start when my app starts up (and not use a button) (in other languages, I'd simply put the action listener or timer in the Form)...?
Thank for any help on...
In particular I want to guarantee that the formatting of a number uses , (commmas) for separating digits regardless of the current locale of the device.
NSNumberFormatter *numFormatter = [[NSNumberFormatter alloc] init];
[numFormatter setLocal:@"??????"]
...
Hi, i need to parse some paths of an SVG file, they are simple lines. When retrieving the data i end up with this string:
m 0,666.6479 254.28571,0
According to SVG specifications m denotes a new current point then the following 2 numbers are the position and the laters are relative positions to the first one.
So that would create ...
Hi guys,
IN a bit of a pickle. I am implementing a CoreData solution and I have two entities, Site and Post. Now Site has many Posts as Post belongs to one Site, as reflected in the model diagram.
In my entity code I have :
Site.h
@property (nonatomic, retain) NSString * name;
@property (nonatomic, retain) NSString * url;
@property (...
Single stepping through code that uses any of the NS_INLINE functions from NSGeometry.h causes the debugger to lose sync with the current instruction pointer, making debugging the routines very difficult.
I've tried #undef NS_INLINE at the top of my implementation file,#define NS_INLINE in the precompiled header, looking for pragmas, co...
What is the difference between carbon and cocoa ? For what type of applications we should use carbon and for what type of applications we should use cocoa ? Which is the best of both for developing applications in Mac OS ?
...
I can detect that the iPhone went to sleep and came back from sleep, by using the applicationWillResignActive and applicationDidBecomeActive. But how do I find out what kind of interrupt it was. I am making an audio player application, and need to keep the audio playing when the iPhone goes to sleep (which I know how to do). But I need t...
Hello,
I'm trying to make a local high scores board for my app, but with no success till now.
I searched anywhere for a local high score board code but didn't found any.
What is the best why to write such a thing?
If you can please post example code.
Thanks.
...
I'm trying to figure out whether or not the current locale uses a 12 hour or a 24 hour clock. I've been checking out NSDateFormater to no avail. Any leads?
Thanks!
...
Hi,
I want to Create a NSMutableDictionary with an Integer Mapping to an strucuter(struct).
Example:
int nVar = 1;
typedef struct
{
NSString *pstrName;
}sSampleStruct;
sSampleStruct *sObject = {@"test"};
NSMutableDictioary *pSampleMap = [[NSMutableDictioary allo] init];
[pSampleMap setObject:sObject forKey:[[nsnumber alloc] initwith...
Is there an easy way to convert an Objective-C 2.0 file to Objective-C 1? I am writing a Cocoa app, and I decided to support Tiger, which doesn't support Obj. C 2.0. I know I should have thought of it before I wrote a whole bunch of code, but is there an easy way to convert it back? Thanks!
...
Is it possible to implement a locking effect in a NSPreferencePane that we create? Similar to the lock found in other system preferences panes (such as Energy Saver, etc)
I know that I could create a keychain item and then just have the enabled boolean of the controls bound to something that depends on the user authenticating successful...
Hello,
I would like to have a list of windows which is quite simple but I need as well to :
be notified when a new window appears
be notified when an existing window dissapears
detect when positon / size of windows change
Do you have any ideas for this?
Thanks in advance
...
Hello all,
I am getting an error in Xcode that says "whatEverVariable is undeclared" This is happening inside the .m file and also outside of the class itself. I have declared the variable inside the curly braces of the .h file and am using @property and @synthesize to access the variable. However I am getting that above error in the ...
I'm making an iphone app that needs to adjust audio speed, and in the question here , it decompresses audio, so I'm concerned with it working for Itunes' Encoded/Purchased AAC Audio format. Will it work?
...
Hi folks,
I got my BS in Computer Science about seven years ago. I spent two years in neuroscience research and the next three providing what amounts to tech support.
But I love computer programming - and I have since written, as a freelancer, non-trivial commercial code in Haskell, Smalltalk, and Objective-C. I used these languages be...