I have a view that consists of a table of existing objects and an Add button, which allows
the user to create a new object. When the user presses Add, the object is created in the list view
controller, so that the object will be part of that managed object context
(via the NSEntityDescription insertNewObjectForEntityForName: method)....
In my modell got an NSMutableArray that keeps track of a changing number of elements.
In my view I got a NSTextField that shows the number of elements.
The view gots unarchived from the nib file and alloc/inits the modell. Therefore it knowns about the modell and the contained array.
I established the connection as follows. In the Inter...
I'm pretty sure this is really simple, and I'm just missing something obvious. I have an app that needs to download data from a web service for display in a UITableView, and I want to display a UIAlertView if the operation takes more than X seconds to complete. So this is what I've got (simplified for brevity):
MyViewController.h
@inte...
Hello everyone,
Given the following XML file:
<?xml version="1.0" encoding="UTF-8"?>
<application name="foo">
<movie name="tc" english="tce.swf" chinese="tcc.swf" a="1" b="10" c="20" />
<movie name="tl" english="tle.swf" chinese="tlc.swf" d="30" e="40" f="50" />
</application>
How can I access the attributes ("english", "chines...
I'm attempting to piece together and run a list of tasks put together by a user. These task lists can be hundreds or thousand of items long.
From what I know, the easiest and most obvious way would be to build an array and then iterate through them:
NSArray *arrayOfTasks = .... init and fill with thousands of tasks
for (id *eachTask ...
I'm looking for the best way to change the background color of an NSView. I'd also like to be able to set the appropriate alpha mask for the NSView. Something like:
myView.backgroundColor = [NSColor colorWithCalibratedRed:0.227f green:0.251f blue:0.337 alpha:0.8];
I notice that NSWindow has this method, and I'm not a big fan of the ...
Hi , I am a newbie to the iphone app world. So I thought I try my luck with a calculator app.
Unfortunately I am running into an issue where if I press a third key in the calculator the app crashes. Sometimes I get this error EXC_BAD_ACCESS. Here is a code in my CalculatorViewController.m file.
#import "CalculatorViewController.h"
@imp...
So ... I have an image loaded into an NSBitmapImageRep object, so I am able to examine the contents of specific pixels via a two dimensional array. Now I want to apply a couple of "transformations" to the image, in preparation for some additional processing. If I was manipulating the image manually, in Photoshop, I would:
Rotate the ...
I have created package (.pkg) file using packagemaker ver 3.0.4. Is it possible to provide custom icon to the .pkg file. Can some one help me how this can be done ?
Thanks in advance.
...
I have a view which contains a few subviews:
mainView
subViewA
subViewB
SubViewC
mainView is an NSView constructed from a nib and is controlled with an NSViewController subclass. The subviews are standard views such as NSTextField and NSImageView and are configured to be non-editable. I want mainView to receive rightMouseD...
Hi.
Is there any way to quit from drawRect: without refresh the current UIView?
For example:
- (void)drawRect:(CGRect)rect {
CGContextRef context = UIGraphicsGetCurrentContext();
CGContextSetRGBStrokeColor(context, 1.0, 1.0, 1.0, 1.0);
CGContextSetLineWidth(context, 2);
CGContextMoveToPoint(context, 10.0, 30.0);
CGContextAddLineToPo...
In my ViewController I am using UIButton which triggers some action when touchedUpInside. Upto here no problem, but i also want to add another action for touchDown event. More precisely i dont have an idea how to add that action to which event, that will work the same as when App-Icon is pressed longer in springboard which causes springb...
How would you retrieve the iPhone/iPod Touch information in a cocoa app, (not an app for the devices), ie such as what iTunes does to show the information of your connected device?
Thanx!
...
I have an NSArrayController which is bound to a class in my Managed Object Context. During runtime the NSArrayController can have a number of different filter predicates applied. At certain intervals, I want to iterate through my NSArrayController's contents regardless of the filter predicate applied to it.
To do this, I set the filter...
Hi
I have a question regarding a rather advanced DataModel which I would like to use with CoreData.
Before I get into details about what I did so far, I will describe what I want to do.
I have a List of Hotel Guests that stay in one Room and have Preferences. Once ready the user should select a guest and see the data and should also b...
For some reason I get linker errors when I try and use CALayer:
"_OBJC_CLASS_$_CALayer", referenced from:
I have imported the following headers:
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import <QuartzCore/QuartzCore.h>
Code:
arrowImage = [[CALayer alloc] init];
...
I'd like to ensure that certain maintenance tasks are executed "eventually". For example, after I detect that some resources might no longer be used in a cache, I might call:
[self performSelector:@selector(cleanupCache) withObject:nil afterDelay:0.5];
However, there might be numerous places where I detect this, and I don't want to be...
I'm using CGEventTapCreate to "steal" media keys from iTunes when my app is running. The code inside of the callback that I pass to CGEventTapCreate examines the event, and if it finds that it's one of the media keys, posts an appropriate notification to the default notification center.
Now, this works fine if I post a notification for...
working on a mac os project (meaning not iPhone) requiring 10.6 and is 64bit, allows me to use properties to generate both accessor methods and instance variables in the header file. but, during debug, i'm not seeing how to look at the object's properties values after they have been populated. is there some build setting that needs to be...
For instance I have created a view with 50 sequential buttons named btn1-btn50. If I want to address these buttons and make some changes to them in a loop how can I address the controls with a string name?
...