I have a class that updates two .plist files in the app documents directory via an NSURLConnection. The class acts as its own delegate for NSURLConnection. It works properly when I ask for a single file, but fails when I try to update two files. Does it look like I should start a new thread for each of the getNewDatabase messages?
- ...
Hi All,
Anyone please let me know some links or examples for Unit testing user interface code.
Is there a complete example app on that.
Thanks in Advance,
Bhanu
...
How would I make the name of the app appear here ( like with a normal app )…
… when the app is an LSUIElement.
My Problem is that when the App is LSUIElement the name is not by default displayed in the menu bar like an normal app. Basically all I want LSUIElement to do is to hide the dock icon not the name in the menu bar.
For those...
Hi folks,
I've got a store that is synchronized externally and a store that is unique to the application instance, so in order to cleanly differentiate the two I want to have some join entities between them and then resolve through to the entities between using Fetched Properties, as "discussed" in the Core Data Programming Guide:
deve...
I was hoping to make a list of some of the differences in terms between java and objective c to abate my confusion. It makes explaining my difficulties easier when I know what things are called.
For example:
null - nil
this - self
map - dictionary (not even quite sure about this one)
What I'm looking for are similar comparisons or c...
Hi,
I have installed the latest MacPython (2.6.2) on my Leopard OS X and started an XCode PyObjC project.
When I finalized the app, I built the release version and sent it to a friend of mine to try if it runs with out of the box. It did not, because it expects the latest Python, as on my computer.
No matter what I tried, I could not...
I'm writing a Cocoa app for Leopard that, given a directory of text files, will scan through them, looking for a search pattern (let's pretend they're source files and I just want to find C comments). It will then present the results to the user.
While I think I could certainly do this with Cocoa, it feels like it's really meant to be h...
I'm trying to implement a color picker in my Cocoa app. (Yes, I know about NSColorPanel. I don't like it very much. The point of rolling my own is that I think I can do better.)
Here's a picture of the current state of my picker.
The wells surrounding the color wheel are NSColorWell subclasses. They are instantiated programmatically ...
Hi,
I have an NSTableView hooked up to Core Data. Here is what I want to do.
The table has two columns. When I finish editing the first column, and press tab to go to the next column, I want to programmatically populate the second column based on the first column's data. Is there a delegate method that can help me with this?
Thanks
...
I've created all of my Managed Objects after mapping out all entities/attributes/relationships in the data model. Now I have the problem of needing to add additional attributes/relationships I haven't thought of when I first designed one of my entities/classes. Is there a way to modify my existing NSManagedObject class with Core Data sho...
How do I work out how much large an area drawing an NSString will occupy, i.e. by using:
[string drawAtPoint:p withAttributes:nil];
I ideally need to work this out before its drawn so I can space out the "areas" in which the strings are drawn appropriately.
...
Hey there,
I'm desperatley trying to connect controls of NSViews which will reside in a NSCollectionView using outlets. The collection view is feeded using an NSArrayController.
I created the NSView in a seperate NIB file and in the implementation of NSCollectionViewItem I overwrote copyWithZone to load it:
-(id)copyWithZone:(NSZo...
With the below code I'm creating a fetch request. The problem I'm having is getting the fetch request data and doing something with it like putting it into a variable (like I'm trying to do below with the firstManagedObject variable). I.e., I don't understand what to do with my "result" NSArray that I've created (shown in below code) t...
Is there a shortcut method much like NSHomeDirectory() and NSTemporaryDirectory to get to the resources folder within your project?
Is the /resources/ folder the best place to be storing a file?
...
We are writing a Quick Look generator to create custom thumbnails for PDF files - not a preview of the document, but something else. These thumbnails display text that in Finder is currently partially covered with a "PDF" string (Type tag? Type badge? I don't know what it's called officially) and the turned corner effect, as can be seen ...
Hi I would like to pause the execution of a function in an cocoa project. I dont want to use sleep() because the function needs to resume after user interaction. I also want to avoid doing this with multiple calls to sleep.
Thanks for your responses. Ok I started the code while waiting for some answers. I then realized that sleep or...
Hi
I have a UIImageView object that is just a plain black rectangle.
This is what i use to select a button in the view.
Problem is, I have 49 of these buttons in my view, and all of them can be selected at the same time.
What I use for adding a subview to a button is:
UIImageView* selectedSquareView = [[UIImageView alloc] initWithFra...
I'm slightly confused in one aspect of Core Data. That is, when do I use the rudimentary alloc/init routine vs created an object with core data and saving it into the current managed object context.
I know that's a rather vague question, so let me give you an example.
I have an application I'm currently working on that iterates through...
Exactly as the title says, why does Core Data create instances of NSManagedObject with properties for each entity's attribute, but no accompanying instance variable? The problem is, I would like to use some of my 'Entities' in a typical alloc/init style fashion in some parts of my code. Not using Core Data's fetching/context to create/st...
I have the following method which is spawned by a call for a new thread (using NSThread):
- (void) updateFMLs {
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
NSArray *temp = [[NSArray alloc] initWithArray:someArrayFromAnotherProcess];
[self performSelectorOnMainThread:@selector(doneLoading:) withObject:temp...