objective-c

display real time info to user in ipad app?

I have an ipad app that is loading data remotely into core data, I was to constantly display a status update to a label but it looks like everything in my method has to be completed before the message is sent to the UILabel. How do I get around this? Sample Code: -(void) importCollections { /* code left out for brevity */ for (...

Simulate interface in java with objective-c

Hi all, I came from a java background, and I was trying to use protocol like a java interface. In java you can have an object implement an interface and pass it to a method like this: public interface MyInterface { void myMethod(); } public class MyObject implements MyInterface { void myMethod() {// operations} } public class My...

NSWindows receiving mouse events without taking focus

Hello, I am trying to create a NSWindow derived window which look likes a callout window and having teh following features: - can be placed everywhere on the screen - shouln't take the focuse of the currently focused window when bringed to front - have to reveive mouse events How should I do this? Thanks and regards, ...

low memory rescale of huge image loaded from disk iPhone/iPad

Hello, I would like to ask if someone has some cue. I load a big image from webserver using ASIHTTP framework directly to the disk. Images about 4096x4096 px. I need to present this image to user on screen, so I would need to rescale the big image from disk to some considerable resolution lets say 1024x1024 px. The problem for now is ...

Weird leak patterns iPhone Development

Hello, I'm finding some weird leaks when running my app in the device with release configuration. But if I run the same app in the device but with debug configuration the leaks are gone. I haven't changed anything in the debug or release configuration files. The debug and release configuration are as they come from the template... Is th...

Cocoa Touch - iPhone App crashes when button is pressed?

This is my first app. It doesn't crash the simulator just brings you back to the home screen. This isn't my first cocoa program (I'm not a pro at cocoa either)just my first iPhone. It crashes when you press the letsPlayButton, which runs the -(IBAction)letsPlay:(id)sender; method. Help me! Im so lost with what's wrong! .H #import <...

iPhone File Search

Hi , Anyone has an idea on File Seatch in iPhone ?,or at least , help me where i can find useful information about it .... I need to extract all executable files with their full paths.. please its urgent Thank you. ...

NSDate assign problem

I would like to assign a date from one view controller to another -(void) setCurrentDate:(NSDate newDate){ self.currentDate = newDate; [self updateView]; } While debugging I see the currentDate value out of scope and the application crashes with EXC_BAD_ACCESS. Any help will be appreciated. ...

Making Non-Interface Methods Testable in Objective-C

I'm currently writing an Objective-C class which has a relatively complex method in its interface. For the purpose of the question, I'll use the following declaration... @interface Processor : NSObject { } - (NSObject*)doSomeComplicatedProcessing:(NSObject*)param; @end So doSomeComplicatedProcessing is my complicated method. In m...

Saving Contents of OSAScriptView as a ".scpt" file into a predefined folder.

Hello there, First, I'm totally new to Obj-C please go easy on me :D I'm building an application, which basically does the same thing that AppleScript Editor does. I have used an OSAScriptView, and what I would like to do is to save the contents of this OSAScriptView as a .scpt file in a predefined folder. (like /documents/myscripts...

Intercept "location.href" in a UIWebView, Objective-C

What is the correct code to intercept location.href URL in a UIWebView? - (NSString*)actionURL { NSString *script = @"document.getElementById('action_url').name"; return [webView stringByEvaluatingJavaScriptFromString:script]; } This code doesn't work :( ...

Objective-C: Accessing Member Objects that are in an array?!? I think...

Hi, Totally new to Obj-C, so thanks for patience. :P Because I'm beginner, I will use the car example. Easier for me to understand. I have an object, Car. It has two member objects, tire and engine. Tire and engine have their own member variables too, but they are just int with various names (like pressure, treadDepth). In all these...

How can I take values from textbox and assign it to integer variable in Xcode??

how can I convert the valuesof textbox to numeric? here's what I'm doing: int el = electric.text; int wb = waterbill.text; int inet = internet.text; ...

UISplitViewController - Pushing Modal View

Hi, What is considered the best practise when pushing a modal view when using a UISplitViewController? Would you push from the RootViewController, the DetailViewController or directly from the Application Delegate? Ideally the functionality I am trying to achieve is to have the modal view controller displayed as soon as the UISplitView...

Cocoa Sync Services exception

I try to program a Cocoa application with Core Data and the Sync Services framework, it works quite well, but once I try to start the sync, i get the following exception: >[NOTE: this exception originated in the server.] can't register schema at /Users/sdk/Documents/Knoma/build/Release/Knoma.app/Contents/Resources/KnomaSchema.syncsche...

AVAudioPlayer with MPMusicPlayerController

I have music playing within my application using a MPMusicPlayerController, using iPodMusicPlayer (also tried applicationMusicPlayer). When I play a sound using AVAudioPlayer my music from my MPMusicPlayerController will stop. Is there a way to have the MPMusicPlayerController and the AVAudioPlayer play sounds simultaneously? ...

Showing the NSToolbar only if hovering over the NSPanel

I am making a desktop application and I want to show the NSToolbar of an NSPanel only if the mouse pointer is positioned over that NSPanel. Also, when the mouse pointer is not positioned over that NSPanel, the NSToolbar should be hidden. Can anyone help me with detecting the hovering over the NSPanel, and showing and hiding the NSToolba...

How to Dismiss 2 Modal View Controllers in Succession?

I have 2 view controllers presented modally. A presents B which presents C. When I dismiss C I would like to dismiss B as well. But I am not sure how to do this: Dismiss C: [self dismissModalViewControllerAnimated:YES] //[delegate dismissB] //this doesn't work either when i create a delegate pattern Now I am left with B. How can I...

Range of substring in string.

Hi, Is the a way to get the NSRange of an NSString in an NSString? ...

How do I detect if a drag operation was cancelled using NSDraggingInfo or similar?

I've created a subclass of NSImageView and implemented the informal protocol for dragging images between other instances of the same class. I am keeping a reference to the image of the view prior to the dragging operation and am able to set it back to said image given certain criteria. However, I can't seem to detect if the dragging ope...