I was just coding up some more stuff for the preferences window in my app, and I run it, I get this following error:
2010-09-09 20:01:08.099 YM2612[12060:80f] An uncaught exception was raised
2010-09-09 20:01:08.102 YM2612[12060:80f] Cannot create BOOL from object <_NSControllerObjectProxy: 0x34cd30> of class _NSControllerObjectProxy
2...
Hi, I'm trying to to paste something to the generalPasteboard but I keep getting some warnings because I'm using 10.6 coding in my 10.5 app. Can someone please fix this code to make it compile for 10.5 or earlier versions of OS X. Thanks
NSString *areacode = @"774";
NSPasteboard *pasteboard = [NSPasteboard generalPasteboard];
[...
I have a Cocoa Application that uses a main default window, and another window nib I created. When the program starts, I want it to load the window nib and show it in front of the default 'MainMenu' nib window. How can I do this? I've tried the following code, but the window is still displayed behind the default window:
InfoWindowCon...
I have a button that sits on top of an NSScrollView, not within. When the scrollview scrolls, the button get's clipped with part of the button going along with the scrolling and the other part staying positioned.
To better describe the issue here's a video of the issue:
http://dl.dropbox.com/u/170068/ScrollTest.mov
The planned goal wa...
Hello,
I am looking for a way to force any window (even the ones where I am not the owner) to redraw. It has to work for all window (cocoa, carbon , ...)
Do you have any pointer to achieve this?
Thanks in advance for your help,
Regards,
...
Hi,
I have used NSWindowController in projects several times, and feel like I have a (very)rough grasp of the concepts behind this important class. What I would like to do with this post is to clarify/correct my own understandings, and hopefully help other learners get that first step into understanding. It's the at-a-glance concepts, o...
How can I wait the end of an ftp transfer on my iPhone app, if I have to do many ftp transfers in sequence?
I call the same method to make the transfers, changing the name of file.
[Ftp receiveFtp:file1];
[Ftp receiveFtp:file2];
[Ftp receiveFtp:file3];
Here, for example, I should wait the end of the first method before calling the sec...
Hi all,
I have following requirements:
Obtain action associated with NSButton using : - (SEL)action
Call the obtained action.
Can we perform 2nd pt. Generally we invoke an action like this- [self abc:nil] just thinking if we can invoke the method obtained from 2nd pt. in same way!
Thanks,
Miraaj
...
Hey all! I read an article from http://deusty.blogspot.com/2006/11/sending-http-get-and-post-from-cocoa.html , but I quite didn't get some things. I tried to establish NSURLConnection with it and some how it won't receive data at all? If you are interested here is the site I am trying to login www.lockerz.com .
http://pastebin.com/8fP9T...
I've been trying to create multiple custom views generating xibs and connecting controllers to them.
i have tried things like
[window AddSubView:view0]
and
[window setContentView:view0]
but i still don't get the new view displayed.
i think I'm doing it wrong since creating the xib file.
what is the right way from creating the xib ...
I have written a program that connects to a server on a given IP using the NSStream protocol outlined in Apple's stream programming guide. The connection and transfer of data works flawlessly, however if the user specifies the wrong IP and the program attempts to open the streams it results in the program becoming unresponsive.
From wha...
How can I create an animated .gif file from a movie I have?
I guess it is pretty simple in objective-C and cocoa, by using the QTKit, to extract images from a movie, now how can I glue them together as an animated gif?
...
I ran a leaks report on a program I am developing, with the following results:
Process 2454: 155054 nodes malloced for 7464 KB
Process 2454: 6 leaks for 608 total leaked bytes.
Leak: 0x14984360 size=160 zone: DefaultMallocZone_0x127000 instance of 'SecCertificate', type CFType, implemented in Security
0xa024562c 0x01015580 0x...
Hi,
i have simple question: How to get position of window on screen in cocoa?
I try using frame from NSWindow but in result i have x and y of window always 0, but my window isn't on this position.
Best regards
Chudziutki
...
I'm trying to understand the use of the keyword self Let's say that I have two classes one called
AppDelegate and one called Photo. Photo is my "model" class in the MVC paradigm and AppDelegate is the controller.In the init method of the Photo class below. Who is self referring to?
-(id) init
{
if( self = [super init] ){
[s...
I have (for example) a table with cars in. The cars each have a name, a color and a mileage.
I can have a text field which displays the total mileage of all the cars using bindings in interface builder:
Value - Bind To: Car Array [email protected]
However, I would like separate boxes for the total mileage done b...
I have this code:
- (id)tableView:(NSTableView *)tableView objectValueForTableColumn:(NSTableColumn *)tableColumn row:(int)row
{
if ([[tableColumn identifier] isEqualToString:@"friend name"]) {
if (row == 0) {
return @"All friends";
} else {
return [[friendsArray objectAtIndex:row - 1] name];
...
Hey guys, I am trying to find the width in pixels of a string from the font and font size. I am currently using this code, but it is not working 100% of the time. Is there another way to do it?
NSSize textSize = [aTextLayer.string sizeWithAttributes:[NSDictionary dictionaryWithObjectsAndKeys:@"Bank Gothic Medium", NSFontNameAttribute, [...
I have an Offer class (NSManagedObject subclass) that I want to use to handle offers made for purchases. One side of each offer is a buyer and the other side is the product. There is also a price. However these class instances that can be buyers have pretty different lineage and most likely will have different parent classes all the way ...
I'm experiencing some difficulties here.
I have a drop zone (custom view) with it's own class. Everything works great so far with it. The problem is that I can't get the result from the drop operation outside the class of the drop zone.
I read everything I found in the net.
For instance, I would like my drop zone to count the lenght o...