Trap click event on dock icon using Qt on Mac
Hello all, I am trying to get dock click event on dock icon on Mac OS X. I am using Qt-Cocoa. Any help would be highly appreciated. Thanks, Rahul ...
Hello all, I am trying to get dock click event on dock icon on Mac OS X. I am using Qt-Cocoa. Any help would be highly appreciated. Thanks, Rahul ...
Is there is any way to change the color of a line ("vertical line" and "horizontal line" of Interface Builder). A line separator in IB is a NSBox and I didn't find any method to change color when is used as NSBoxSeparator. ...
Hi, I'm initializing a NSCalendar in viewDidLoad like this: gregorian = [NSCalendar currentCalendar]; The calendar is declared in the corresponding .h file like this: NSCalendar *gregorian; When accessing the calendar from a method my app crashes: - (void)someMethod{ unsigned int unitFlags; unitFlags = NSHourCalendarUnit | NS...
I am creating a list of bar buttons with its action functions (sFuncName as below), it is dynamically changed. When user clicks on a button, sFuncName will be called. for(int i = 0; i < 3 ; i++){ NSString* sFuncName = [NSString stringWithFormat:@"OnFunc_%d:", i ]; barButtonItem = [[UIBarButtonItem alloc] initWithBarBut...
Hi guys, Let's say I have 2 threads, one is the main thread and another one, a secondary thread. The main thread is being used the most, but sometimes (rarely) I want the secondary thread to do some work based on calls from the main thread. Most of the time the secondary thread should sleep. Now after some searching I understand the wa...
Hi, I have to render a PDF into a very high resolution image (say up to and even over 100,000 * 80,000 pixels). I managed to do that without going out of ram by splitting the render into several slices and then rendering each one using NSOperationQueue, basically drawing the NSImage pdf representation into a new NSImage using drawInRect...
Hi (Objective-C and others) guys, I've a question, and I don't know if this is the best place to ask for it. Few days ago, dannywartnaby helped me with a problem I had and gave me an interesting advice, which can be considered as a coding convention, which is to prefix yout class files with your initials. I wonder if you know other bes...
I'm trying to write a program that serves to toggle a secondary click for a one button HID (in this case a touch screen). What I want to do is have the user touch a button on the screen that makes the next touch a right click. I simply don't know where to begin on this. I began by looking to Applescript, but found that this is impossible...
I would like to use an open source library that's written in Java to create a Cocoa desktop application. Ideally, I would use the Java library as the model, and write my own Objective C controller classes and Cocoa views. Is this possible in Xcode? What options do I have (if any)? Or, would you recommend rewriting the parts of the ...
Hi, I am working on a class A which has a method -(void)DoSmthing1. I am making a call to another method-(void)DoSmthing2 in class B. Now after doing some operations in class B, the method is supposed to call back a method-(void)DoSmthing3 previous class. How will i call a method of current class from another class?? Can someone pleas...
hello, I am trying to get the summary of an article and download it as a string. This works great with some articles, but the wikipedia website is inconsistent. So NSScanner fails pretty often while it works fine for other articles. Here's my NSScanner implementation: NSString *separatorString = @"<table id=\"toc\" class=\"toc\">"; ...
Hi all. A few days ago I posted a problem with using checkboxes in nstableview (old question). Peter Hosey helped me, but I am still unable to get this to work. I seem to be doing something very wrong with implementing a button that shoud be straightforward. I have a tableview with three fields; bool, text, and text. The values of each c...
I extract nodes from an XML document by calling -nodesForXPath:error:. Now i wonder if it guarantees, that the nodes are returned in the same order as they appear from top to bottom in the document (it's crucial in my case). My XML looks something like this and i retrieve the b tags with the XPath query: <a> <b> ... </b...
I'm getting the select items from a table view with: NSIndexSet *selectedItems = [aTableView selectedRowIndexes]; what's the best way to get the indexes in a NSArray object? ...
I have an iOS application (but this is just as applicable to an OS X app) that has async network access functions. Using GHUnit and without manually doing inner run loops, or synchronization of async operations, is it possible have a test method run an async operation and verify the results AFTER the async operation is complete. I don'...
In iPhone development, speed is of the essence. Does anyone know if there is a speed difference between using a CoreFoundation type (like CFMutableDictionaryRef) versus a Foundation type (its counterpart, NSMutableDictionary). I would think manipulating the CF type would be faster as it doesnt have to throw around ObjC runtime messages,...
Hi, I'm interested in capturing key presses while a NSMenu is open. For example, if the menu is open and the user presses "e", or "1" on the keyboard, send a particular message (preferably passing an event object which contains reference to which key was pressed). I've looked into alternate menus, but I'm under the impression that can ...
Is it possible to pass the pointer to an object in a drag and drop operation? Here is the scenario... I have an 'NSArray' of custom objects. For arguments sake we'll say this is a list of person objects. The list is tied to an NSTableView via an NSArrayController. The NSTableView is a drag source and I have an NSView as a drag destina...
Hello all, I've been writing a Web Application recently that interacts with iPhones. The iPhone iphone will actually send information to the server in the form of a plist. So it's not uncommon to see something like... <key>RandomData</key> <data>UW31vrxbUTl07PaDRDEln3EWTLojFFmsm7YuRAscirI=</data> Now I know this data is hashed/encryp...
Hello, As someone new to developing for macs I was wondering if I could gather some advice on dealing with network proxies. Currently the software makes use of: NSURLRequest NSURLDownload [NSString initWithContentsOfURL:] WebKit / WebView I had a little search on google and found Apple's page on CFProxySupport although I haven't looke...