Hi,
I am building a core data iphone app, and having trouble with retrieving one-many relationship data. Please bear with me while I explain.
I have used the data model designer to setup an entity called "Item" that contains many entities called "Comment". I then retrieve multiple entities and display them in a UITableView. I fetch the...
I am a newbie in Objective-c and I would like to implement fluent interface pattern in my OC class. Here is my updated and simplified case from my project:
// .h file
@interface MyLogger : NSObject {
...
}
- (MyLogger*) indent:(BOOL)indent;
- (MyLogger*) debug:(NSString*)message, ...;
- (id) warning:(NSString*)message, ...;
....
@end...
Ok, I'm very new to Obj-C and Cocoa, but I'm sure my bindings here are correct. I've been googling, searching stack overflow and have checked my values again and again.
So, here are my bindings:
They connect to this class:
@interface TMMaddMangaWindowDelegate : NSWindowController {
...
}
...
@property (copy) NSMutableArray* mangaLi...
I have this class:
Header:
@interface vcMain : NSWindowController {
IBOutlet NSView *scroll;
}
@property (retain) IBOutlet NSView *scroll;
-(IBAction)test:(id)sender;
@end
Source:
@implementation vcMain
@synthesize scroll;
-(IBAction)test:(id)sender {
vItem *item = [[vItem alloc] initWithNibName:@"vItem" bundle:nil];
...
I have a Class that runs the following method (a getter):
// the interface
@interface MyClass : NSObject{
NSNumber *myFloatValue;
}
- (double)myFloatValue;
- (void)setMyFloatValue:(float)floatInput;
@end
// the implementation
@implementation
- (MyClass *)init{
if (self = [super init]){
myFloatValue = [[NSNumber alloc]...
Hi,
I am having a trouble try to display a NSWindow with out using Interface Builder. The initialization of the window was quite confusing since I am more familiar with iPhone (which does not have an NSWindow equivalent). So I searched Google for some code and I eventually found this:
NSRect windowRect = NSMakeRect(10.0f, 10.0f, 800.0f...
Hello,
When the user changes screen, I want to hide the current ADBannerView . Is there a "right" way to do that? If I move it offscreen for instance, is it fine: I was wondering if it could keep serving ads while not being displayed and then I would break some Apple Agreement.
Is it also OK to cover an Ad with a modal view?
Thanks!
...
Hi,
What view would be the best view for displaying text from the console? In particular output of a C program? For example if I used system("gcc foo.c"); in my program and then wanted to display the output of that what view would a I use and how would I display it? Also, how would I get input too?
...
I am having trouble assigning a NSString to the text of a NSScrollView. I have tried the following:
NSString *medium = codeView.text;
That didn't work so then I tried:
NSString *medium = [codeView text];
This still doesn't work and it gives me the warning:
NSScrollview may not respond to
'-text'
Or in the case of ...
I have a CIImage I need to convert from color to Black and White within my Cocoa / objective C program. Peter H. previously pointed me to this link (http://www.codingadventures.com/2008/06/threshold-filter-in-glsl/) as a potential solution ... but I am having trouble compiling the kernel routine there (see separate thread, if interested...
I am following Stanford's iPhone Development course in iTunes U and I'm having problem with one of their assignments (Paparazzi, if anyone is familiar).
What I'm trying to do is basically to create this view as the first 'screen' upon application launch:
And this is the code that I have in the app delegate:
- (BOOL)application:(UIAp...
Is there any real difference between:
id value;
BOOL compare1 = [value isMemberOfClass:[SomeClass class]];
BOOL compare2 = [value class] == [SomeClass class];
to check if value is a SomeClass object?
...
This might be my lack of understanding of the call stack when using Core Animation, but something confuses me a little about who/what is calling drawInContext.
Lets say I have
@interface PlayerLayer : CALayer
{
int Foo;
}
and I initialize Foo in init to be something like
-(void) init
{
if( self = [super init] )
{
Foo =...
Is it possible to write an app to behave like the photo picker does in the Photos app? Namely allowing users to select multiple images and greying out or putting a green tick on the selected ones?
I've tried UIImagePickerController, but that appears to just dim the image when it's touched.
...
Hello,
More or less everything is in teh title, I am looking for a way to get from a cocoa application, pid_t of the running dock.app
Thanks in advance for your help,
regard,
...
I know all instances of NSString are inmutable. If you assign a new value to a string new memory is addressed and the old string will be lost.
But if you use NSMutableString the string will always keep his same address in memory, no matter what you do.
I wonder how this exactly works. With methods like replaceCharactersInRange I can e...
Within my Mac app I've setup two NSSplitViews to create a Mail-style interface (with the first ScrollView used to create a vertical separator, and the second nested within the first, to create the horizontal separator). To illustrate the interface, I've created the following diagram:
To illustrate the setup further, here's an annotate...
So I'm using Apple's PictureSharing/PictureSharingBrowser samples to send and receive data. This uses an NSFileHandle on the server side to send a picture using NSFileHandle's writeData method.
NSFileHandle * incomingConnection = [[aNotification userInfo] objectForKey:NSFileHandleNotificationFileHandleItem];
[[aNotification object] acc...
Hi,
Sorry about this silly question. I'm trying to learn objc and I'm unable to do a simple sum between 2 int values... In fact problem is before the sum.
I have an object that have an instance variable defined as a NSNumber and it's defined as a property as follows:
@interface MyObj : NSObject {
NSNumber *count;
}
@property (readw...
For any application that I have on my Mac, is there a way to tell if it was compiled with GC enabled, or if it's doing manual memory management?
...