Hello all,
I found this in my travels:
http://www.opensource.apple.com/source/IOKitUser/IOKitUser-502/ps.subproj/IOPSKeys.h
How would I get the values (as a number) of:
#define kIOPSMaxCapacityKey "Max Capacity"
and
#define kIOPSDesignCapacityKey "DesignCapacity"
I want to be able to use them throughout my app. What do I need to...
Hi,
I would like to develop an iPhone App based on an existing open-source Objective-C framework, however that framework makes extensive use of the glib library and I cannot find a way to build and include the glib library for an iPhone app (non jailbreak).
Is there any way this can be done, or is there any recommended approach to port...
Hi all, I have 2 NSArray (Mutable, actually) that I am trying to convert to a C-style double array for a c routine i am passing them to.
Here is my Objective-C routine:
NSMutableDictionary *childDictionary = [myParentDictionary objectForKey:resort_code];
latitudeArray = [childDictionary objectForKey:@"lat"];
longitudeArray = [childDic...
Hi,
I have an NSURL:
serverCall?x=a&y=b&z=c
What is the quickest and most efficient way to get the value of y?
Thanks
...
How can I do the following things in Objective C (the examples below are in pseudo-code):
interface A extends B, C
interface A
interface B
class X inplemements A, B
3.
interface A
class X implements A
class Y implements A
interface B
class Z extends Y implements B
thanks!
...
Hello. I had thought I actually had a pretty good handle on the whole view controller model, but something just doesn't seem to making much sense for me. My main issue is with adding a custom UIView subclass as a property of a UIViewController subclass.
Whenever I assign a valid instance of a UIView subclass to that property, nothing h...
Is there a way to verify / validate a remote XML (or download it first and store it locally) before processing it and store the info into CoreData or DB with iPhone SDK 3?
...
Basic question to which I'm sure there is a simple answer.
I'm trying to get the timestamp of a photo. When I try to access the NSDateComponents to retrieve a specific date element (say "day" for example), I get a EXC_BAD_ACCESS error.
First, the relevant bits of my code:
// formattedDateString is a string representing the "DateTimeO...
Given a directory [[self documentsDirectory] stringByAppendingPathComponent:@"Photos/"] how do I delete ALL FILES in this folder?
(assume a correct documents directory path)
...
Is there an easy/generic way to compare two objects to see if they are the same? By 'same' I mean identical entity name, all attributes and relationships are the same, but the internal object ID is different.
Similarly, is there an easy/generic way to find the differences?
...
hello,
I've a String who's value is the name of the Class[MyClass] which has to be instantiated, and MyClass has a method called
-(void)FunctionInClass;
i'm using the method called NSClassFromString to instantiate MyClass.I want to know
1) what does NSClassFromString return??
2) what is id?
3) How to call method -(void)Functioni...
I would like to create a helper application that has no GUI yet does have access to an app bundle. I was looking at the Xcode command line project templates, but these all just generate executable files. How can I create something like a command line tool that presents no application menu yet provides access to bundle resources in a .app...
I have two projects that include the same code:
NSButton *button = [[NSButton alloc] initWithFrame:ctrlRect];
(gdb) print (int)[button state]
$1 = 1
in the other project
$1 = 0
I am compiling both with GCC 4.2, 10.6 - no other apparent differences in compiler settings.
If I alloc/init an NSButton earlier in the app, state = 0 wh...
Hi,
I am using this code:
NSOpenPanel *openPanel = [NSOpenPanel openPanel];
[openPanel beginForDirectory:nil file:nil types:[NSImage imageFileTypes] modelessDelegate:self didEndSelector:NULL contextInfo:NULL];
This is the only code in the method. When the method is called, the open panel appears on-screen for a second then di...
I have a small C++ application which I imported Objective-C classes. It works as Objective-C++ files, .mm, but any C++ file that includes a header which may end up including some Objective-C header must be renamed to a .mm extension for the proper GCC drivers.
Is there a way to write either a purely C++ wrapper for Objective-C classes ...
Why does NSClassFromString return nil ? As per the definition it has to return class name.
How should i take care to rectify this problem. since i need to instantiate a class from string and call the method which is in the class using the instance created.
This is how my code looks like.
id myclass = [[NSClassFromString(@"Class_from_St...
I am trying to make a standard check box for my iPhone app from a UIButton with a title and image. The button image changes between an "unchecked" image and a "checked" image.
At first I tried subclassing UIButton but UIButton has no -init*** method to use in my -init method.
What is the best way to do this?
Thanks in advance.
...
I have an NSMutableDictionary.
NSMutableDictionary* plistDict = [[NSMutableDictionary alloc] initWithContentsOfFile:path];
I have to update an element in that dictionary. How i can do that ? Thanks in advance
...
How would I issue DSI Commands on iPhone? DSI Commands are used to communicate with an AFP server over TCP.
http://en.wikipedia.org/wiki/Data_Stream_Interface
Is this something that can be done via NSURLConnection? Thanks!
...
Hi All,
I am trying to store an image in the device through my program. I am able to store the image in the sandbox. After quitting the app when I run it again the address of the sandbox changes so I am not able to retrive it and use it in the next run.
Please help.
Thank You All.
...