This question comes from this other one I asked earlier: http://stackoverflow.com/questions/3180574/calling-custom-objective-c-from-a-pyobjc-application
I want to re-use a small part of the app logic from my iPhone app in its server-side component, which runs on OSX. Based on what I was told in the other question, it looks like I need ...
Hello,
I am using the following code in my Cocoa project to call a script I made. The script is in the same folder as the project and even shows up under the "Resources" folder in XCode. The proper path is found, but it still says that the path is not accessible. Help please.
NSBundle *mainBundle=[NSBundle mainBundle];
NSString *path=[...
I made a Cocoa application that has an NSTableView, an NSTextField, and an NSButton. The user enters text into the text field and clicks the button. When the user does this, I want the text in the textfield to be placed in the NSTableView. I find that I can't even bind an IBOutlet to a cell in the NSTableView. What should be done?
...
I know of a couple of rules regarding Objective-C categories:
Category methods should not override existing methods (class or instance)
Two different categories implementing the same method for the same class will result in undefined behavior
I would like to know what happens when I override one of my own category methods i...
Let's say I have several lines of code to clarify specific settings on a given UILabel variable:
numberMarkings[selectedBoxX][selectedBoxY][selectedSquareX][selectedSquareY][selectedNoteX][selectedNoteY].text = @"derp";
numberMarkings[selectedBoxX][selectedBoxY][selectedSquareX][selectedSquareY][selectedNoteX][selectedNoteY].cente...
I'm trying to observe checkbox status and make appropriate changes in the app when checkbox status changes. In a window manager that manages the window with checkbox I have following observer setup:
- (void)awakeFromNib
{
[myCheckBox addObserver:self
forKeyPath:@"state"
options:(NSKeyValueObser...
Hi,
I'm having some difficulty understanding exactly how the responder chain works in an iPhone application.
My situation is as follows. I have two UIViewControllers that are installed on a tab bar controller. Call them view controller A and B. They are unrelated in the sense that neither of them has a reference or knows about the othe...
I'm using ABTableViewCell by atebits: http://github.com/enormego/ABTableViewCell http://blog.atebits.com/2008/12/fast-scrolling-in-tweetie-with-uitableview/
The one thing I can't figure out is how to change the height of the cell. Due to the drawing method, I don't think it responds to the normal methods that I've found for changing the...
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 <...
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...
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...
Hello,
Basically I've passed a script in the terminal through /bin/bash "[path]" or /bin/sh "[path]", and I've passed commands in a terminal through /bin/bash -c "[command]" or /bin/sh -c "[command]". Both ways work properly. But in my Cocoa App, when I try to do the exact same thing with NSTask (using /bin/bash or /bin/sh), the app see...
This is what I got so far.
- (IBAction)HUDPanelDictionaryHide:(id)sender{
extern NSPanel HUDPanelDictionary;
[HUDPanelDictionary close];
}
This obviously does NOT work.
The HUDPanelDictionary is declared in a separate .h and .m file for an .xib file. I need to close this panel from the other .h and .m file for another .xib ...
I know how to create IBOutlets in Xcode but how do you do it in Interface Builder?
...
I have a simple question, but don't seem to see the answer in a previous thread, so here goes.
I want to access image files within my bundle, and the paste this string into html in various UIWebViews.
The code below seems to return a garbage string. It does not return nil, so I assume my found.
NSString *imageString = [[NSBundle ...
In interface builder I added a menu item to the main menu. I can click on the menu and access its contents, however the title of the menu item doesn't show when running the program.
The image shows the application and its menu on top and on the bottom is the application as it appears in IB. Notice that where the menu in IB has the "Calc...
I am fairly sure that this would not be possible, but just want to check.
Is it possible to work out if a user has their iPhone/iPad password protection turned on.
We are working on an application that contains very sensitive corporate information, we would like to avoid having to ask the user their password every time they open the iP...
I've figured out how to create a new UI element where I touch and add it using [self.view addSubview:[uilabel reference]]. However, if I tap in the same place, it'll simply add another subview on top of the current one.
I am able to create a unique key for each part of the grid I'm making (and thus placing subviews). Is there any way I ...
Hi,
In Mac OSX,
I have an image with black pixel in all 4 directions.
I want to programmatically crop the image to the maximum image rect.
Should i check for the black pixel and then create the crop rect or is there any supported API is there?
...
for example:
NSString *foo = @"a";
How can I get the ASCII value of this? (I know it is really 97, but how can I get it using Objective-C?)
I guess I can convert it to char but I had no luck with that so far. Sorry for being too nooby!
...