NSString *NumberToSave = Number.text;
NSString *PassToSave = Password.text;
NSString *PassVerify = VerifyPassword.text;
// Save Settings
NSUserDefaults *standardUserDefaults = [NSUserDefaults standardUserDefaults];
NSString *tmpNum = [standardUserDefaults stringForKey:@"Number"];
if (tmpNum) {
}else{
...
I have 3 entities. Folder, Feed & FeedItem
I need to fetch Folders which have feeds and feeds which have unread FeedItems
NSPredicate * predicate = [NSPredicate predicateWithFormat:@" feeds.@count > 0 AND feeds.feedItems.unread == 0 "];
I get this error
'NSInvalidArgumentException', reason: 'to-many key not allowed here'
How do I c...
I'm trying to use a horizontal slider in my mac app, by default the slide values is floating point number, because i need to display the value again as text in a label(binding using user defaults), so is there a way to make slider to output integer rather than floating point number?
...
In the Implementation Overview section of the NSPersistentDocument Core Data Tutorial it says:
…
One issue with creating the new top-level object in the nib file is that when you use bindings an object retains other objects to which it is bound. This means that bindings must be broken to ensure there are no retain cycles when a ...
I've added a custom subclass of NSWindowController to my Cocoa project, and added an instance of my subclass to my application's nib. I expected to see my override of the -initWithCoder: method called when the nib was loaded, but it was not. To debug, I added a regular -init method and set a breakpoint on it — and sure enough I hit the b...
Hi - relatively new programmer here.
Look at the two classes defined below. I'd like to be able to call the following:
[instanceOfSecondClass transitionToPage: [instanceOfFirstClass nextPage]];
However, that doesn't seem to work (because I'm trying to return a class, not an instance of a class.)
@implementation FirstClass
- (id)next...
Hi,
I'm learning about Cocoa bindings. I'm having two completely different objects, each with an iVar that I want to sync with a user interface item. But since they're two different objects and I can only have on "content" outlet with one NSObjectController, do I need another one?
...
Hello,
I've found no clear answer so far, but maybe I've searched the wrong way.
My Question is, can Core Data to be used as a Persitence Storage for a Server Project? Where are Core Data's Limits, how much Data can be handled with Core Data and SQLite? SQLite should handle a lot of Data very well according to their website. I know of a...
Hi,
i've been experiencing a weird bug for days.
In my program i use a sheet attached to the main window and at random it hangs without displaying the sheet itself.
Here's the trace:
#0 0x95af0266 in mach_msg_trap
#1 0x95af7a5c in mach_msg
#2 0x951e6e7e in CFRunLoopRunSpecific
#3 0x951e7aa8 in CFRunLoopRunInMode
#4 0x944e00ce in ...
I'm writing a PDFViewer for a 3rd party PDF library. I have a subclass of NSScrollView and a subclass of NSView. The problem is the NSScrollView will scroll up and down when I resize window.
here is the relevant code:
whenever windows is resized, my subclass of NSScrollView receive this message:
-(void)handleFrameChange:(NSNotificatio...
What I am trying to do is improve on the "A Sheet for Creating a New Employee" example from the NSPersistentDocument Core Data Tutorial. One feature that I want to add is conditionally enabling the "Create" button only when the new object being edited by the sheet is actually valid for insertion.
The problem is, how do you handle the ed...
Horizontal gradient is working fine . Is there any property to get vertical color gradient from horizontal gradient.
I have seen the related question regarding this where they have explained using rotating the frames...
so, is there any simpler way to achieve vertical gradient..
...
I'm extracting strings from a text that represent dates. They look like this:
Monday August 16, 2010 05:28 AM EST
I'm trying to parse them with a NSDateFormatter. I've set its format to:
[dateFormatter setDateFormat:@"EEEE MMMM d, YYYY h:mm a z"];
However, this doesn't work. For the example I gave above, if I convert the string to a ...
Hi I want to run an OpenGlView in a second window. I can open this window "simualtion", but there is nothing to see, which I created in the Interface Builder. I think the problem is that I created a completely new window. I try this way, because I want to close the old window and open the new one with one and same method, because I want ...
I had Carbon code which prints image as tiles in . But now for 64 bit i want to change that into carbon.
I have a CGContext which i need to print and which holds the new tile every time.
I cant find a suitable workflow.
Any help would appreciated
...
Okay of course i checked the API and there is nothing - at least under this class name.
What i mean is the widget referred to as a bottom bar in the Apple Human Interface Guidline.
Do i have to draw this myself from a NSView, if so how do i get the texture drawn?
P.S.: I added Toolbar to the tags because it is the closest generic key...
Cocoa isn't rendering the blue scroll button unless my scroll view is 4 rows long.
Does anyone know how to show the scroll bar button when the scroll view is only two rows?
Thanks!
...
As I have a complex domain model (DDD) where I need to create a few hundred forms in the user interface, I'm looking for a generator, preferably embedding the apple layout rules, and data binding. This is crucial to get a uniform application appearance.
I would prefer the generating to be of run-time instances (introspection), not stat...
I'm working on a Cocoa application that requires several sliders that will control the values for several "channels" of data. I would like to create the the app so that all of the channel data is stored as integers in a single array. Each slider would then be bound to a single element in the array. Is this possible at all? If so do I nee...
I need to determine an object's property (passed by name) type in order to perform deserialization from XML. I have some general pseudo-code (however I am unsure of how to perform these comparisons in Objective-C):
id object = [[[Record alloc] init] autorelease];
NSString *element = @"date";
NSString *data = @"2010-10-16";
objc_proper...