objective-c

NSTableView requesting Data too early.

Hi. I've run into a bit of an issue with NSTableView. The problem is that the table view is requesting data too early (it immediately requests the data from the controller), as in, the data is not there when the table view asks for it. Other methods, which gather the data to be shown in the table view haven't finished executing by the ...

UIScrollView not zooming at all

Hi, I made a UIScrollView, added a UIImageView to as a subView, set the viewForZoomingInScrollView: method to return the subView, set the UIScrollView's delegate to self in my viewDidLoad, set my ViewController to be a UIScrollView delegate, set the maxZoom to 5.00 in IB, and I still am unable to scroll I'm using the iPhone simulator, p...

NSTableView requesting Data too early.

Hi. I've run into a bit of an issue with NSTableView. The problem is that the table view is requesting data too early (it immediately requests the data from the controller), as in, the data is not there when the table view asks for it. Other methods, which gather the data to be shown in the table view haven't finished executing by the ...

@class May I know the proper use of this.

Anyone can point out a documentation or a detailed discussion using @class. I've been using this but haven't really fully understood it. I want to learn more about it and fully understand it. Thank you in advance. ...

which UITabBarController event to reload a view?

I've got a window with a UITabBarcontroller at the bottom. I have 3 tabs, corresponding to their respective views. Everytime I switch to a view via tapping on the tab, i want it to reload. Which event do I need to tap into? Where would I do this? thanks! ...

CFHTTPStream segmentation faul during NSRunLoop

I'm trying to assemble a toy application to interact with http servers via CoreFoundation. I'm not using NSURLConnection because I want to be able to specify a proxy different from the one set in the OSX System Preferences. My problem is that I wasn't able to find any working example and the Apple documentation do not provide a working ...

Property (retain) object being released without ever being flagged for release.

I'm at my wits end. I'm trying to debug a crash, and finally I manage to track it down. My 'minutesLeft' variable is somehow being released. Problem is, I never set it to release, and the property is set to retain. I can't figure out what is going on! Using the zombie variable, I got the following message: * -[CFNumber intValue]...

Mapkit with multiple annotations

Hi All, I have a map displaying multiple annotations. I'd like to mimic the behavior of the Places tab on the Photos built-in app (iOS 4), where the annotations are automatically joined together or splited apart as the user changes the zoom level. How do I do that? Thanks! ...

setIntercellSpacing: error

How do you use this method properly, I get "Conversion to non-scalar type requested" upon compile. When executing the method like so: [tableView setIntercellSpacing:(NSSize)(4.0, 5.0)]; Any Ideas? thanks. ...

How would you model Location in Core Data?

I want to make an Entity for Location with properties: latitude & longitude. Then, I want to set a relationship from User to Location, from Photo to Location, etc. Should I do it without creating an inverse relationship from Location to the others? Otherwise, how would I do it like that? Thanks! Matt ...

How to change view after video played?

I would like to make an application in which, when I press a button, one video starts playing, and when it finishes or when I press "done" button it should take me to a view different from the first one where I launched the video. ...

iOS substring question...

How can I select a string from the beginning until a specified character? For example, in the following a news headline... someString = @"Los Angeles, California - Apple announces something, stock prices change." How do I select just Los Angeles, California - into a separate string? (I want to base my selection on everything before th...

How a new view in Tab bar app, that is not part of tab bar, but does not hid the tab bar.

Hi guys. I have a tab bar app, created from the template. One of the views is a tableview, and when the user touches the header I have a new tableview flip over to show some new data. When the new tableview displays, it hides the tab bar. I want the table bar to be visable and active. I cant seem to work out how to do this. Any pointer...

How to deal with screen position constants in iPhone code?

I have a requirement to fill cells with varying length wraparound text. My current routine is handling this satisfactorily, however, I am concerned about the use of a couple of constants being used. The values 10 and 260 below represent the margin and cell width expected, but they are only accurate for standard definition resolution in...

Does selectRow:inComponent:animated: cause pickerView:didSelectRow:inComponent: to fire?

I'm getting some strange behaviour, and I'm wondering if a root cause of that behaviour might be selectRow (used to set which row in the picker wheel should be viewed as selected) causing didSelectRow (which I thought was only used for user input) to fire. I certainly can't come up with any other reason for code that should only be in d...

Internal class Objective C

I am porting a project from C# to Objective-C, and I would like to know how to implement an Internal class in Objective-C (Internal meaning only visible inside of this project). For example, I have the code in C#: public abstract class AbstractBaseClass : AInterface { // methods go here } internal class InternalSubclass : Abstrac...

How to copy textField to OSX clipboard?

Hi everyone, I'm stuck here. I know how to copy and paste on the iPhone side of things but how can I copy contents from a textField to the global clipboard in OSX. I've been searching the web but there are really no examples. So let me explain in detail what I'm trying to accomplish. I have a NSTextField named helloField and I want to be...

IPhone/IPad: How to get screen width programmatically?

Hi I'm wondering if there's a way to get the width programmatically. I'm looking for something general enough to accomodate iphone 3gs, iphone 4, ipad. Also, the width should change based on if the device is portrait or landscape (for ipad). Anybody know how to do this?? I've been looking for a while... thanks! ...

iPhone SDK - Big UITableViewCell

Hello everyone, I just wanted to know what kind of UITableViewCell are on applications such as "Mail", and how to set one up. They seem to have much more length for extra text and other objects. A good sample project or some code/reference link would get me started. Thanks, Kevin ...

How do you make a view corresponding to a model subclass that holds view elements corresponding to the parent model class?

I have some UI elements that will share common parts with other UI elements. They correspond to model objects in an inheritance hierarchy. As an example let's say all Layers can be toggled on/off. All WaveLayers are Layers which additionally define a .wav filename. And there is a specific concrete subclass of WaveLayer called GroovyLaye...