Is it possible to focus a NSWindow by its CGWindowID? And yes, how?
I need to focus a Window of another application, but I have only its CGWindowID and I can only find sample code about retrieving the ID, but not how to focus a Window by its ID.
...
[I'm sure this is not odd at all, but I need just a bit of help]
I have two retain properties
@property (nonatomic, retain) NSArray *listContent;
@property (nonatomic, retain) NSArray *filteredListContent;
and in the viewDidLoad method I set the second equal to the first (so now the retainCount is two, I think):
self.filteredListCon...
I have a UITabBarController that loads a UINavigationController for each of its tab. The first tab is obviously my initial screen, however I don't want the tab-bar to be visible for this screen.
Maybe my approach is wrong. How can I make sure that a UINavigationController is shown as my initial screen?
...
A form is pushed onto the view. The form has several required fields. Also the form needs to be validated. I want to intercept the back button's click to check if the fields have been filled in, and validate the form. How would I intercept the button's click, and make sure it doesn't pop to the previous screen?
...
As I get closer to releasing my first public iPhone app I'm concerned about catching crashes in the field. I'm curious to hear how others have gone about this.
I'm not sure what's possible outside of the debugger. Is all lost with an EXC_BAD_ACCESS or can I still catch it and get something useful into a log? Is the program main() the sp...
Hi,
I'm working on a project for the iPad, I need to read and write to an xml file, which is also used by the counter part of the application in windows.
The problem that I have is that I've been looking around but I haven't found a way to modify an element or attribute in an xml, without having to build the whole xml again.
I saw thi...
I put "return" in quotes because I don't want to literally return it. I want to do it similar to how you pass a pointer-to-a-pointer for [NSString stringWithContentsOfFile:usedEncoding:error:].
I would like to make parseFiles:error return nil and have the error reference that was passed in contain the first or second error, depending on...
I am using Open Source toolchain to compile my iPhone apps. So I have no Interface Builder or XCode. How would I setup the layout of widgets like UIButton, UITextView, etc. Also, how would I add an event handler to those UI widgets? Please remember that I don't have Interface Builder or XCode.
...
I'm new to Objective C, and I seem to be struggling with accessing a method of an object I created. I'm checking out the documentation , but I'm not entirely sure tha tthis is a job for a delegate.
For example I have an object (1) that creates another object (2). I can access a method of the object (2) after I create it, but I can't acc...
Background: I use a ton of NSDictionary objects in my iPhone and iPad code. I'm sick of the verbose way of getting/setting keys to these state dictionaries.
So a little bit of an experiment: I just created a class I call Remap.
Remap will take any arbitrary set[VariableName]:(NSObject *) obj selector and forward that message to a funct...
Hi! I'm a newbie developer of iPhone.
Right now I'm working on an app that has the functionality of opening a pdf, and showing a specific page and letting the user to navigate through it. Like a book reader.
But now I need to access the table of contents to make a mini menu with it. Any idea how do you access that table of contents?
...
When I develop in .NET there's lots of UI controls from companies like Infragistics and Telerik that enable me to build above-and-beyond standard usability and stylish GUIs rapidly. Is there anything like that for iPhone Objective-C development?
...
Is there ever a time when the touchesBegan, touchesMoved, and touchesEnded methods would be handled inside a UIViewController vs. UIView?
I understand that they are typically used in a custom UIView but I am curious about this situation.
Thanks
...
I have noticed that some applications (BeejiveIM) that you can put the red badge on a UITab. What message must be passed to add a badge to a tab?
...
Hi, i wrote the following code :
NSData *response = [NSURLConnection sendSynchronousRequest:request returningResponse:nil error:nil];
NSString *json_string = [[NSString alloc] initWithData:response encoding:NSUTF8StringEncoding];
NSDictionary *reportDic = [jsonparser objectWithString:json_string error:nil];
NSDictionary *reporttable = ...
So, the application I'm trying to script has a scripting definition file that includes a <contents> element, which is an "implicitly specified container."
The question, how do I get at what's inside this element using Scripting Bridge? Or alternatively, how do I send the Apple Event necessary to retrieve it and then transform what I ge...
I have ported the code inside java.util.Random class in objectivec. I want to have an identical random number generator so that it synchs with the server app running on java. Now is this a safe porting and if not is there a way to mimic AtomicLong as it is found in java? Please see my code below.
static long long multiplier = 0x5DEECE...
I'm creating a static library to share using the following guide:
http://www.amateurinmotion.com/articles/2009/02/08/creating-a-static-library-for-iphone.html
In one of the functions, I return a "SomeUIView" which is a subclass of UIView and is defined in the public header, however I don't want to expose the internal instance variable o...
If I call "[NSString stringWithFormat:@"Testing \n %@",variableString]"; I get what I would expect, which is Testing, followed by a new line, then the contents of variableString.
However, if i try
NSString *testString = @"Testing \n %@"; //forgive shorthand here
[NSString stringWithFormat,testString,variableString]
the output actually ...
I would like to create an NSDictionary (or something similar) that has two keys per value. It will be for English/Spanish word look-up, where:
each value is an array containing all the conjugated verbs in English AND Spanish.
each (two) keys contains both an English infinitive (e.g. "to be", "to go") and a Spanish infinitive
This way, ...