Hello, if i use NSResizableWindowMask flag in my NSWindow the "resize corner glyph" is on the top right. I can resize when pointing on the lower right corner.
I use a own created NSView with it, and set it as content view with setContentView method.
I ' dont use a bottom bar.
Any idea of what i'm doing wrong ?
Thanks.
...
I need to create several windows before NSDocument is loaded, or create a window that blocks NSDocument window and top menu.
I tried several solutions - but they didn't work right.
modal window, one after another. there were some problems with Async URLConnection, and some other problems with my NSDocument content.
I created custom M...
So I have an MVC-application in Cocoa.
There are some custom views, a controller and a model. Of course, the views need to know some stuff, so they get their data from the controller. However, they do not use accessors in the controller, they use KVC with a keypath that calls right through to the model:
// In view.m
time = [timeSource v...
Is there a way construct a predicate to filter by class type?
I currently loop through the array and check to the class of each object. Maybe there is a cleaner way?
...
For example, this method from NSCalendar takes a bitmask:
- (NSDate *)dateByAddingComponents:(NSDateComponents *)comps toDate:(NSDate *)date options:(NSUInteger)opts
So options can be like:
NSUInteger options = kCFCalendarUnitYear;
or like:
NSUInteger options = kCFCalendarUnitYear | kCFCalendarUnitMonth | kCFCalendarUnitDay;
Wha...
Hi everyone,
This is my first post on stackoverflow so please be patient :-)
I have an Json Array of Arrays:
{
"response_type": "ok",
"total_results": 1,
"page": 1,
"total_pages": 1,
"sets": [
{
"id": 2075184,
"created": 1269989599,
"term_count": 5,
"has_images": false,
"terms": [
...
My model is setup so Business has many clients, Client has one business. Inverse relationship is setup in the mom file.
I have a unit test like this:
- (void)testNewClientFromBusiness
{
PTBusiness *business = [modelController newBusiness];
STAssertTrue([[business clients] count] == 0, @"is actually %d", [[business clients] coun...
Hello everybody
In my App I'm trying to get PSMTabBarControl working, but all I do - nothing...
I have copied the framework File in my Frameworks folder of my App, then included it. In my InterfaceBuilder (3.2.1) I was able to drag and drop the PSMTabBarControl to my Window and link it with the NSTabView (PSM -> tabView -> NSTabView &&...
When I store a NSString inside some NSDictionary and log that dictionary to the console like this:
NSString *someString = @"Münster";
NSDictionary *someDict = [ NSDictionary dictionaryWithObjectsAndKeys:
someString, @"thestring" ];
NSLog ( @"someDict: %@", [ someDict description ] );
The console output looks like this:
unico...
Hi, I'm just trying to work out why the following code is leaking memory and I have a funny feeling that i'm not releasing the array memory correctly. This is a C function in a wider objective-c app and I'm not native to C... i've tried just using free() on the array, but have a feeling this isn't the whole story...
Could someone have a...
Apparently, NSFileManager is unable to delete files created by mkstemp(). Here's some test code to demonstrate this:
char pathCString[] = "/tmp/temp.XXXXXX";
int fileDescriptor = mkstemp(pathCString);
if (fileDescriptor == -1) {
NSLog(@"mkstemp failed");
} else {
close(fileDescriptor);
NSURL *url = [NSURL URLWithString:[NSSt...
I have several CATextLayers. When I doubleclick one of them, I want to be able to edit it's string. Think of text as it's handled in Keynote or many other apps. Any ideas?
I thought of putting an editable textfield right in front of the layer and then dismiss it on enter, but I didn't get far. :-(
I target Mac OS X 10.5 with Objective-...
Anyone have the expertise to explain when to use NSUInteger and when to use NSInteger?
I had seen Cocoa methods returning NSInteger even in cases where the returned value will always be unsigned.
What is the fundamental reason? Is NSInteger or int strictly limited to if we want to represent negative value?
From NSObjCRuntime.h:
#if _...
Hi,
How can I check if a user enters a number in my UITextField. Basically its a mark im accepting between 0-100 and it can be a decimal....I heard i can try to convert it to a NSNumber type and see if it returns null.
Not suree Any help would be appreciated.
I have tried
if(grade.text doubleValue] == 0){
//Not a number
...
I am developing an application that needs to work on Linux, Windows and Mac OS X. To that purpose, I am using C++ with Qt.
For many reasons, on Mac OS X, I need to use CoreFoundation functions (such as CFBundleCopyBundleURL) that creates core objects that need to be released with CFRelease. But doing so generate a lots of these warnings...
Hi,
I am getting really frustrated and I cant seem to check if the user has entered a valid url or not. This is what I have tried:
NSString *str = [NSString stringWithFormat:@"%@", [myurl.text stringByAddinPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
NSURL *aurl = [NSURL URLWithString:urlStr];
if(aurl == nil){
//Invalid...
Hi all,
Is there any way how can i convert a nstimeinterval type value to a string type in xcode?
Thanks in advance
Joy
...
Hi i am confused with category and extensions in objective-c any good articles for that
Thanks in advance.
...
I could have sworn I was able to make a custom NSDatePickerCell, override the setDateValue method, and catch anytime the date was changed. It doesn't seem to work now.
Does anybody know how to catch anytime the date value of a date picker changes? Adding an observer to the keypath doesn't work either...
...
Hi folks,
I have the following situation:
There is one custom view inside of the first window that contains a NSTableView.
There is a second window which acts as a form for the current object behind the selection of the table view inside the first window.
Some more details:
I’ve implemented the setDoubleAction: behavior in the NST...