hello,
I would like to start developing for macosx. I need to create a small native application to help me do some stuff. I never developed in Objective-C, have no idea about cocoa, Xcode, NIB and similar stuff.
I don't want to learn by slapping examples together though. This would probably make things done, but I would not learn anyth...
If there is a chance that an NSArray is empty, is it better to check it and set equal to nil if it's empty when it is assigned or to rather do the check when it is used?
e.g.
NSArray *myArray;
if ([anotherArray count] > 0) <-- Check when assigned
myArray = [anotherArray copy];
else
myArray = nil;
something = [myArray objectAt...
Hi,
I am not new to OpenGL, but not an expert. Many tutorials teach how to draw, 3D, 2D, projections, orthogonal, etc, but How about setting a the view? (NSOpenGLView in Cocoa, Macs).
For example I have this:
- (id) initWithFrame: (NSRect) frame
{
GLuint attribs[] = { //PF: PixelAttibutes
NSOpenGLPFANoRecovery,
...
According to the rules of memory management in a non garbage collected world, one is not supposed to retain a the calling object in a delegate. Scenario goes like this:
I have a class that inherits from UITableViewController and contains a search bar. I run expensive search operations in a secondary thread. This is all done with an NSOp...
I've subclassed NSView to create a 'container' view (which I've called TRTransitionView) which is being used to house two subviews. At the click of a button, I want to transition one subview out of the parent view and transition the other in, using the Core Animation transition type: kCATransitionPush. For the most part, I have this work...
I'm trying to limit the number of objects in an array controller, but I still want to be able to access the full array, if necessary. A simple solution I came up with was to subclass NSArrayController, and define a new method named "limitedArrangedObjects", that returns a limited number of objects from the real set of arranged objects. ...
I have a NSTableView that is displaying an array of objects I have. For each of these objects (rows) I would like to change the color of the text displayed depending on the results of a function I run on each object;
So for example all the object in the table that exist in another list (or some other requirement) I want to display them ...
I am wanting to change the text background color on a tableview's cell when it is hovered upon, similar to how AddressBook "highlights" the label of a contact's element when you mouseover the label names. However I cannot figure out how to accomplish...
detecting a mouseover on a particular NSCell and...
After detecting the cell his hov...
I'm creating an application for iPhone which needs to handle large data.
So, I would like to know which one will be better to use : C++ Vectors or ObjectiveC's NSMutableArray?
Which one will be faster to access elements, delete elements, add elements etc.
Can some one guide me please?
...
I've heard that it is a bad idea to do something like this. But I am sure there is some rule of thumb which can help to get that right.
When I iterate over an NSMutableDictionary or NSMutableArray often I need to get rid of entries. Typical case: You iterate over it, and compare the entry against something. Sometimes the result is "don'...
Are there equivalent methods for ceilf and floorf for the NSDecimalNumber type? I couldn't seem to find any.
...
i have tried to use the reachability-project published by apple to detect a reachability in an own example. i copied the most initialization, but i get this failure in the linker:
Ld build/switchViews.build/Debug-iphoneos/test.build/Objects-normal/armv6/test normal armv6
cd /Users/uid04100/Documents/TEST
setenv IPHONEOS_DEPLOYMENT_TARG...
I'm trying to learn about threading and I'm thoroughly confused. I'm sure all the answers are there in the apple docs but I just found it really hard to breakdown and digest. Maybe somebody could clear a thing or 2 up for me.
1)performSelectorOnMainThread
Does the above simply register an event in the main run loop or is it somehow a n...
In regards to XCode templates with CoreData enabled, I've read http://stackoverflow.com/questions/2729055/unclear-use-of-property-in-window-app-using-core-data which goes over the 'what' in the templates. But I am having an issue with the 'why'. By declaring the category in the implementation file, the CoreData accessors act like private...
Hi everyone,
I'm working on a cocoa app for syncing data between two folders.
It have profiles (so you can have multiple setups)
It's possible to analyze data
It's possible to sync the data
Im a little confused. First of all i cant really see where to have a model? And how many controller would you suggest? 1 WindowController or Ana...
Hey,
I'm trying to move a sprite to the mouse click location.
How can i get it's coordinates?
Thanks!
...
I'm looking for a way to determine how to know whether an application is using the GPU with Objective-C. I want to be able to determine if any applications currently running on the system have work going on on the GPU (ie: a reason why the latest MacBook Pros would switch to the discrete graphics over the Intel HD graphics).
I've tried ...
at first, sry for my english... :)
I'm using the YAJL Framework http://github.com/gabriel/yajl-objc
My file look like this:
[ [ 3753700,
{ "altitude" : 36950,
"heading" : 129.918421384319,
"latitude" : 47.554033252495699,
"longitude" : 8.2125612837369903,
"pointType" : "EXTRAPOLATED",
"speed" ...
Hello everyone,
At the moment i'm making an application where it is possible to make profiles with different settings. Which datatypes would you recommend me saving these information in?
I have a table which is showing the profile name and the version number. But for each profile there need to be stored more information.
Therefore the...
I have an iPhone app that searches a folder, collates an an array of all the audio files, and lets them be played back. The problem is that if there is a subfolder within the folder I am searching, it will just skip over it/not go into its contents.
My code is as follows:
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumen...