I'm developing a Cocoa/Obj-C application that involves a WebView (from the WebKit framework). I've noticed that this WebView presents a slightly scaled-down version of the rendered webpage. An example screenshot:
In a browser (Safari or Firefox):
In my WebView:
These happen to be local HTML/CSS files generated by the program, but ...
I'm trying to animated text in the NSStatusBar similar to how the text "Dialing ..." scroll from right to left when dialing-up to Internet.
I'm not sure how to do this so is there some code example or guide on how to go about this?
...
When I print the value of a CFString constant e.g. an AddressBook label in the console, the output value is _$!<home>!$_. How do I extract only the pure value, e.g home? ANy help would be greatly appreciated please.
...
Several methods I've used to write to files return a BOOL signifying their success, e.g.
NSDictionary:
- (BOOL) writeToFile:(NSString *)path atomically:(BOOL)flag
NSKeyedArchiver:
- (BOOL) archiveRootObject:(id)rootObject toFile:(NSString *)path
Somehow, this returned NO on one of my tester's devices. That's great (well, not real...
Just looking for how to programmatically add a watermark or some sort of overlay to video using cocoa. Not looking for a step by step ( although that would awesome ), but more or less looking for where I should start looking to learn how. Are there frameworks developed to work for this. Would like something native to cocoa or objectiv...
I am having trouble copying the value of an NSString into a Textfield value. I've done this before, but for some reason it's not working in the function below. Can someone tell me if I'm doing something wrong?
pictureComment is the Textfield and comment is an NSString.
When I look at the log file, only 'comment' prints.
Any suggestion...
Hi,
I developed an application in using cocoa using xcode 3.1.Now i upgraded the os version and tried to compile the code in xcode 3.2 But the app crashes with an error
" CocoaJava: com.apple.cocoa.foundation.NSRuntime
-[NSJavaVirtualMachine initWithClassPath:] FATAL: cannot initialize ObjCJava"
I still dont know how to resolve this P...
I must be missing something simple, but I am having some trouble binding a tableView to an NSDictionaryController. Here is a model of my current scheme:
TableViewColumn --bindsTo-->DictionaryController.arrangedObjects.(value or key)
--bindsTo-->someClass.someClassMember.aDictionary.
I've tested the tableView by adding a...
In Cocoa/Mac OSX 10.6
OSType IOSurfaceGetPixelFormat(IOSurfaceRef buffer)
returns a type OSType
where can I find some documentation/reference on the supported OSType with regard to the context of this function.
What sort OSType should I expect with IOSurfaceGetPixelFormat? do you have any ideas on the various expected values from t...
Hi,
I'm having crash in my application, which says
trying to pop an unknown autorelease pool:
10/19/09 11:40:11 AM MyApp[89480] *** attempt to pop an unknown
autorelease pool (0x11bc800)
How to trace it down?
Since it's RubyCocoa application it's almost impossible to trace it with gdb in Xcode environment. So mostly it's about loggin...
While running my application (which does a good bit of custom drawing) I get this error (it happens a good bit with no observable side effects, but I'd like to understand what's happening).
<Error>: kCGErrorIllegalArgument: CGSUnionRegionWithRect : Invalid region
<Error>: kCGErrorFailure: Set a breakpoint @ CGErrorBreakpoint() to catch
...
I'm trying to fire a Notification in a method called setPosition in one class, that triggers setViewPointCenter in another class. However, I'm trying to send a CGPoint along with it. But Xcode isn't liking it one bit.
-(void)setPosition:(CGPoint)point
{
NSDictionary *dict = [[NSDictionary alloc] initWithObjectsAndKeys:@"sp", poi...
I'm simply trying to convert a CGEventTimestamp (which is an unsigned 64-bit integer roughly representing nanoseconds since system startup) into an NSDate. I know there's a way to convert "time since system startup" into either an NSTimeInterval or a date relative to a reference date, but I'm not finding it.
How do I convert a CGEventTi...
I want to use an open panel to let the user select a destination, but I want to alert them at that point that point that the directory is not-writable. I generally prefer to create it and handle the error, but that's not useful to me here, since I don't want to create the folder just yet. (I'll be sure to handle the error when I do creat...
Guys-
I am using
- (NSString *)tableView:(UITableView *)tableView titleForFooterInSection:(NSInteger)section
{
if ( section == 0 )
{
return NSLocalizedString(@"Section_0_text", @"");
}
if ( section == 1 )
{
return NSLocalizedString(@"Section_1_text","");
}
return nil;
}
Can I modify return string text font, co...
I'm trying to send a CGPoint through an NSNotification like this
-(void)setPosition:(CGPoint)point
{
NSString *pointString = NSStringFromCGPoint(point);
NSDictionary *dict = [[NSDictionary alloc]
initWithObjectsAndKeys:@"p", pointString, nil];
[[NSNotificationCenter defaultCenter]
postNotificationNa...
I'm trying to set up an NSCollectionView (I have done this successfully in the past, but for some reason it fails this time).
I have a model class called "TestModel", and it has an NSString property that just returns a string (just for testing purposes right now). I then have an NSMutableArray property declaration in my main app delegat...
Now I develop a program with a webview showing flash. but I found that when I installed clickToFlash , the webview not to show the flash. I think that when webview load , the safari will check the MIMETYPE , and clickToFlash's MIMETYPE will first chek by safari , so the clicktoflash will handle my falsh , but it didn't have methods to do...
I have a Core Data app with a fairly simple data model. I want to be able to store instances of NSImage in the persistent store as PNG Bitmap NSData objects, to save space.
To this end, I wrote a simple NSValueTransformer to convert an NSImage to NSData in PNG bitmap format. I am registering the value transformer with this code in my Ap...
I have an entity (e.g. Employee) in a managed object model that is related to two other entities (e.g. Department and Team). Both relationships are one-to-many (i.e. an Employee must have one Department and one Team, Teams and Departments have many Employees). The two may or may not overlap (e.g. a team might be made up of employees from...