Background: My application has a main window which contains a few smaller NSView objects, each of which contains several different controls, lables, images, etc. One of these views (and everything it contains) is disabled in response a given flag. When the flag is set, I automatically disable and grey-out all of the controls embedded wit...
I'm working on a Cocoa application, and I've run into a situation where I would like to have two NSView objects overlap. I have a parent NSView which contains two subviews (NSView A and NSView B), each of which can have several subviews of their own.
Is there a proper way to handle this kind of overlap? NSView B would always be "above" ...
Hi,
I have a curious problem about an App which MainView is inherited from NSOpenGlView.
I am able to draw many things in it, like a basic OpenGL tutorial.... but when I try to implement a basic trackball, it looks like the app waits until I release the mouse button before it refreshes my view... even if I call directly the "DrawRect" c...
I am developing an OS X/Cocoa application and I want behavior like this:
There is a sidebar with different options, let's say "Option A", "Option B", and "Option C".
When you click A, B, or C, it loads a corresponding GUI into the main pane. Each GUI is a different NSView subclass, and it is defined in a different NIB/XIB file. For exa...
Is their a Cocoa container class that functions like the standard template library's multimap, i.e. letting you have multiple values for an identical key? I've been trying to sift through the Cocoa documentation, but no such luck, maybe I'm just retarded?
...
I'm experiencing the same problem in this previous stackoverflow.com post.
Specifically, I seem to be able to get the "Auth" token correctly, but attempts to use it in the header when I access later pages still just return me the login page's HTML.
Following links related to this post, I've determined that you need to make a subsequen...
I know this is a common convention, but what does the "k" in variable names signify? (i.e. kMaxImageViewSize) I looked in the Apple documentation on Variable names and found no mention of it.
Thanks for answering
...
I'm working through Cocoa Programming for Mac OS X (3rd ed) and in chapter 4 I wrote this app:
int main (int argc, const char * argv[]) {
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
//create the date object
NSCalendarDate *now = [[NSCalendarDate alloc] init];
//seed random # generator
srandom(time(...
Many classes in Cocoa/Cocoa Touch have the NS prefix. What does it mean?
Thanks
...
HashTables/HashMaps are one of the most (if not the most) useful of data-structures in existence. As such, one of the first things I investigated when starting to learn programming in Cocoa was how to create, populate, and read data from a hashtable.
To my surprise: all the documentation I've been reading on Cocoa/Objective-C programmi...
Hey All,
I have built a web based WYSIWYG editor, which Im accessing programatically from my cocoa application. At the moment I'm able to run scripts and retrieve the HTML from the iFrame in the editor, but I'm unable to send text from an NSTextView to the iFrame. Any ideas?
The editor is here http://www.alexmillsdesign.com/Developer/F...
In cocoa using XCode and IB is it possible to have a scrolling view of WebViews from WebKit that double as radio buttons? How do I do this and how do I retrieve which view is selected?
...
I am trying to get key-value-observing to work for an NSMutableArray. Below is the .h file for MyObservee, the observed class:
@interface MyObservee : NSObject {
@private int someValue;
@private NSMutableArray *someArray;
}
@property (readwrite,assign) int someValue;
- (NSMutableArray *)someArray;
@end
The class MyObserver im...
How can I draw a string centred within a rect?
I've started off with: (an extract from the drawRect method of my custom view)
NSString* theString = ...
[theString drawInRect:theRect withAttributes:0];
[theString release];
Now I'm assuming I need to set up some attributes. I've had a look through Apple's Cocoa documentation, but it's ...
Long time ago, the Game Developer magazine published an article about ID Software and their DOOM game. In the article ID states that they used a NeXT Step machine for development with GNU GCC cross compiler. Quoting:
By writing in ANSI C on NeXTStep, Id
Software is able to develop and test
in a true programmer’s environment.
Th...
Hey all,
I'm wondering how to make a button or input field in Interface Builder react in such a way that on click it opens a file dialog and lets you select one or more files and puts them into a specified array/table...
Once the button is pushed and files are chosen (this seems a like quite trivial thing) I guess it will already conta...
hello,
I'm trying to find a way to link an array controller to an Array.
I know via an outlet I can fill textfields and even tableviews in the .xib file made with Interface Builder.
I was hoping it would be possible to have one easy outlet (NSArray) and put it into an Array Controller. In turn, a table will link its contentfield to the...
I want to create an NSOutlineView subclass where some of the entries look like buttons. It would look something like this:
+ Fruits
+ Organic
- Apples
- Bananas
[Add Item]
+ Non-organic
- Cherries
[Add Item]
[Add Item]
+ Vegetables
- Carrots
[Add Item]
Where all of the "[Add Item]"'s are buttons.
I have...
Is there an way, ideally backwards compatible to Mac OS X 10.3, to tell if "Voice Over" is activated in System Preferences?
...
Hello,
I'm a very new Cocoa user and running into all sorts of problems...
I'm trying to get the content of an Array and found this code to do this.
NSLog(@"array : %@",collection);
The problem is, I'm not getting any console or tracer window that shows this 'echo'
Is there another command I should use, i've tried opening all wi...