I'm trying to make a Card class that duplicates the behavior of Dashboard widgets in that you can put controls or images or whatever on two sides of the card and flip between them.
Layer backed views have a transform property, but altering that doesn't do what I would expect it to do (rotating the layer around the y axis folds it off ...
Is there a way to find the application name of the current active window at a given time on Mac OS X using Python?
...
Is it posible to use table view to show just one row of a big amount of elements? What I'm looking for is for some kind of horizontal list, like we have in XCode preferences or Aperture image list.
It would behave just like a one columnt table view, but instead of showing the elements vertically, it should be horizontally.
Can you poin...
I'd like to create some directories of data for some unit tests and I'd like these directories to be in the default temporary directory for the user.
I could just create a subdir under /tmp I suppose, but I don't want to make an assumption about how somebody has set up their own machine.
I'm planning on writing the test data on the fly...
I have a nib that I load the usual way
[NSBundle loadNibNamed:@"AuthorizationWindow" owner:self];
and I see the window show on the screen briefly, and using NSLog() I can confirm that -awakeFromNib is called, but I can't figure out why the window does not stay on the screen. I had it working correctly for a bit, but now I'm not sure wh...
I'm curious if this is a situation any other folks have found themselves in. I have an NSDictionary (stored in a plist) that I'm basically using as an associative array (strings as keys and values). I want to use the array of keys as part of my application, but I'd like them to be in a specific order (not really an order that I can wri...
Hi,
The last GUI programming I have done was with Visual Basic, which included objects like Winsock and Inet to easily connect to the internet and retrieve the source from webpages.
I just got started into XCode, and was wondering if there is a similar component. I see that there is a Webkit option in the Library, but I have no idea ho...
When writing an abstract class, or a class that doesn't get instantiated directly... do you tend to write a dealloc method in the abstract class and release where appropriate, and then allow for children to call [super dealloc] and then worry about only instance variables they add which aren't part of the super class?
How do you folks m...
I had a straight forward approach of turning Key/Value pairs of an XML excerpt into an NSDictionary when I started a simple iPhone application. The problem is, I need to turn those NSDictionary's instances that once populated my UITableView's into custom classes because they require behavior and additional complexity. The problem here is...
I have an Obj-C method similar to this:
-(void)getUserDefaults:(BOOL *)refreshDefaults
{
PostAppDelegate *appDelegate = [[UIApplication sharedApplication] delegate];
if (refreshDefaults) {
[appDelegate retrieveDefaults];
}
}
When I call it like this I get no warning:
[self getUserDefaults:NO];
When I call it like ...
The data model for my Core Data document-based app (10.5 only) is in a
framework, so automatic schema upgrades using a Core Data mapping
model don't appear to work. It appears that the Core Data machinery
doesn't find the appropriate data models or mapping model when they
are not in the app's main bundle. So, instead of using the automat...
It seems like more and more OS X apps these days are doing all kinds of fancy drawing stuff for custom controls. Apps like Twitterific, Things, EventBox, Versions just to name a few....
So basically I'm looking for any information on how to get started doing this kind of thing. Not sure if it is just done by subclassing controls and usi...
My problem is the following. I have a method which simply takes an XML excerpt and an XPath. It then should create me an array of objects for that XML excerpt. Meaning if I get passed the following XML:
<user>
<name>Bob</name>
<age>50</age>
</user>
My method will instantiate an instance of the class User and use key-value-coding t...
I have an object which straight forward instance variables. Some are NSString, some are unsigned ints, etc. I was under the impression Key-Value coding was scriptable in that I could write code such as the following:
id key, value;
key = [[attributes objectAtIndex:j] name];
value = [[attributes objectAtIndex:j] stringValue...
So I finally dusted off my Objective-C/Cocoa books.. turns out they are nearly 7 years old! With Objective-C 2.0 now having garbage collection, how important are the chapters on Memory Management?
How much of a difference has Garbage Collection made?
...
The madness of file extensions and MIME types and creator codes and magic numbers to determine file types is a huge mess. Coming from a background of Cocoa programming, I supposed I'm spoiled: in Tiger, OS X added a system called Uniform Type Identifiers (UTIs) that makes the entire process sane.
Given that I'm doing a bunch of web deve...
i'm having a hard time with Xcode; for some reason, it just won't let me pass a variable from one view controller class to another. It should work, i was basically just copying/pasting from my other classes (it works on all of them... except this one). I've been at it all night long, tried everything i could think of and still it remains...
I have a relationship in a Core Data model that feels like it wants an association class. Specifically, I have a Person object, and a Location object. There is a many-to-many relation between these two classes, which has some properties, such as how many hours this person wishes to work at this location per week.
How do I model this u...
Here's a small test program I wrote:
#import <Foundation/Foundation.h>
int main(int argc, char **argv) {
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
NSArray *arr = [NSArray array];
printf("Arr isMemberOfClass NSArray: %d\n", [arr isMemberOfClass:[NSArray class]]);
printf("Arr isKindOfClass NSArray: %d...
I've reached a point were I can't keep procrastinating the writing of the graphics part of an iPhone app.
What has kept me from digging into it so far has being that it feels hard to figure out how to realize my idea of having "glowing", "sparkling" effects on some lamps. I used to be good at such things back in the days of the Amiga sc...