How do I set the part of the file name that is selected in NSSavePanel? I only want the file name selected and not the file extension.
Here's what I noticed. If I setAllowedFileTypes: for the save panel then only the file name is selected but not the file extension. However if I don't set the allowed file types then the file extension i...
I have a detail view that includes three UIButtons, each of which pushes a different view on to the stack. One of the buttons is connected to a MKMapView. When that button is pushed I need to send the latitude and longitude variables from the detail view to the map view. I'm trying to add the string declaration in the IBAction:
- (IBAct...
Hi everyone,
I'm having troubles with arrays and keys... I have an array from my database:
NSArray *elementArray = [[[menuArray valueForKey:@"meals"] valueForKey:@"recipe"] valueForKey:@"elements"]
The problem here is that I would like all my elements of all my meals of all my menus in an array such that:
[elementArray objectAtIndex:0...
Hello all,
I have looked at other answers and the docs. Maybe I am missing something, or maybe I have another issue. I am trying to save a number on exiting the app, and then when the app is loaded I want to check if this value exists and take action accordingly. This is what I have tried:
To save on exiting:
- (void)applicationWillTe...
I am going to build a Mac application written in Obj-C with Xcode. For argument's sake let's say it will have 10 optional features. I need a way to enable or disable those features to create custom builds of the application. These builds would be automated (most likely through the Mac OS X Terminal) so I would need a way to state which o...
I am developing a Cocoa application which involves a chat element. One approach I've considered is using Websockets to handle client-server communication. This would be particularly desirable because chats will also be displayed on a website, and using Websockets could make the implementation very simple.
So: would it be possible to use...
I have a tableview that my app shows when it loads, I would like to somehow put a banner at the bottom that if connceted to the internet will check my server for any new image files and if there are it will replace the current one and if not it will just leave it. That way I can constantly display messages to my users - sort of like in D...
I have three classes which implement the same protocol, and have the same parent class which doesn't implement the protocol. Normally I would have the protocol as pure virtual functions in the parent class but I couldn't find an Objective-C way to do that.
I want to utilize polymorphism on these subclasses by declaring pure virtual fun...
I've declared a struct in my header file like this:
typedef struct {
NSString *department;
NSString *departmentId;
} Department;
Department currentDepartment;
This struct is in a fairly simple class. I assign the struct values in viewDidLoad. Just before leaving viewDidLoad, I see the struct values are still there. After the user c...
I just discovered MacRuby / HotCocoa and really like the sound of what they're doing.
I had essentially discounted the prospect of making Cocoa GUI applications myself because I have an aversion to spending time & effort learning yet another C-based language, Objective-C. I'm not saying it's bad, just not for me.
Is it the case now, or...
I am needing to parse an XML file for my app and I dont have any clue how to do it. I went through one XMLParser tutorial, and it worked fine but the XML file in the tutorial was very simple and my XML file is quite a bit more complex.
here is a snippet of the xml file:
<?xml version="1.0" encoding="UTF-8"?>
<digital_tpp cycle="...
I'm trying to create an vocabulary study application using Obj-C and the Cocoa frameworks. I have about two week's experience in both areas and have reached an edge of my current knowledge.
Here's where I'm stuck. When I press a checkbox, a corresponding plist is loaded into memory as an NSDictionary. I want to generate a "Label: Textf...
Hello, I am rendering a scene in which I have two spheres. I am revolving a camera around one of them. What happens is counter-intuitive. When the camera goes around the sphere the other gets in front of it when you'd expect it to be behind. So it appears as though the spheres aren't revolving around each other and the one the should go ...
how to remove my control from the actionsheet without click on actionsheet's buttons in iphone ?
...
how can i draw gradient line with quartz2d?
...
I'm having a hard time scraping together enough snippets of knowledge to implement an NSOutlineView with a static, never-changing structure defined in an NSArray. This link has been great, but it's not helping me grasp submenus. I'm thinking they're just nested NSArrays, but I have no clear idea.
Let's say we have an NSArray inside an N...
I have a very small bit of data that I would like to archive from my apps view. My question is, its far easier to save this data from the viewController, but should I really be pushing it back into my model and saving it there? BTW: I also need to do a quick load of this data when the app starts up.
...
hi,
I want to put images from my photo library in to the EAGL view for some further processing. The image that are already in our resources folder will be taken by itself but mltiple or images from photo library can't. So any one knows how to put image on EAGL view in open GLES.
Regtards viral
...
Hi,
I saw any post about Reachability but people doesn't really give the exact answer to the problem.
In my application I use the Reachability code from apple and in my appDelegate I use this:
-(BOOL)checkInternet {
Reachability *reachability = [Reachability reachabilityWithHostName:@"www.google.com"];
NetworkStatus internetStatus =...
Hi I have a function which basically tries to insert some data returned from a REST call.
- (void)syncLocalDatabase{
NSString *file = [[NSBundle mainBundle] pathForResource:@"pickuplines" ofType:@"db"];
NSMutableString *query = [[NSMutableString alloc] initWithFormat:@""];
sqlite3 *database = NULL;
char *errorMsg = NULL;
if (sqlite...