Is there a way to force suppression of all logging in a Mac OS X desktop Cocoa app?
Sometimes some part of the system or a plugin (which is out of your control) will log messages on behalf of your application to the console (system.log).
Is there a way to suppress all logging in your application?
...
Hello,
I am displaying some HTML in table cells, but when I scroll through the table, the contents of each cell re-renders as it appears on screen. The effect is blank cells as they scroll into view, and then the content appears after a lag. Here's the pertinent code:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRow...
I want to create a full Screen Cocoa application, however my app is slightly different from a conventional fullscreen app.
This app would be below everything else, so underneath the menu bar and the Dock, etc. It would have a large image covering up the Desktop and icons, with a custom NSView in the middle with a table view, etc. If thi...
In my application i need to export some data into CSV or html format. How can i do this.
Any help will be greatly appreciated.
...
I'm working with some code that does a bunch of asynchronous operating with various callbacks; Snow Leopard has made this incredibly easy with blocks and GCD.
I'm calling NSTask from an NSBlockOperation like so:
[self.queue addOperationWithBlock:^{
NSTask *task = [NSTask new];
NSPipe *newPipe = [NSPipe new];
NSFileHandle *r...
I have a problem with some JNI code.
I'm getting the following error printed in the console from a OS X 10.4.11 (PPC) machine (it works fine on newer versions of OS X 10.5+)
dyld: lazy symbol binding failed: Symbol not found: _objc_setProperty
Referenced from: /Path/to/my/lib/libMylib32.jnilib
Expected in: /usr/lib/libobjc.A.dylib
...
Using NSXMLParser
why does this line of code cause an exception:
ushort crash = [[attributeDict objectForKey:@"a"] unsignedShortValue];
The value in the xml file is "0"
if I use integerValue it works
what is happening?
...
User would open the app and it would ask if User wants to use the camera or use a saved picture.
If user selects camera, it would link with the camera view so that they can immediately take a picture.
Application would present the user with an outline of a human body so as to match up with a subject they wish to photograph.
Example – ...
I am trying to retrieve the value (how far along it is) of a Determinate NSProgressIndicator.
I have tried …
NSInteger *bValue = [progressIndicator doubleValue];
But it gives an error saying Incompatible types in initialization.
So how do I retrieve the value of the Progress Indicator?
...
Hi there,
When using an iPhone Objective C method that accepts CGFloats, e.g. [UIColor colorWithRed:green:blue:], is it important to append a f to constant arguments to specifiy them explicitly as floats, e.g. should I always type 0.1f rather than 0.1 in such cases? Or does the compiler automatically cast 0.1 (which is a double in gener...
I have this large table which works without errors, even if seems to me too slow compared to more complex cells i've opened from downloaded examples. The problem comes when i click a cell, then came back, in few seconds of scrolling fast the app is crashing at the line: charImage.image = [self imageForIndex:ch.charId];
If i delete it is...
i want to create an app.some features i want to add and some effects i want do are like these.
suppose i shoot a picture of a person male or female from camera.then only cut the body from the image.and then add some background to body.and further get some another clothes for the body.so that we can see how the person looks like with new...
Hi to all
I'm implementing a software to caputre video from webcam. I've seen MyRecorder sample in Apple Dev and it works fine.
I've tried to add a button to take a snapshot from video with this code:
- (IBAction)addFrame:(id)sender
{
CVImageBufferRef imageBuffer;
@synchronized (self) {
imageBuffer = CVBufferRetain(m...
Currently I am using NSMutableArray as a property. However I am also using opengl and for performance purposes I want to use malloc to create an a pointer to the int array and have this as the property.
How would I do this in objective c and still make sure that my memory is safe? Perhaps this is not even a safe thing to do in objecti...
Hi there,
I have added the iPhone's Tock sound to my own custom keyboard like this:
NSString *path = [[NSBundle bundleWithIdentifier:@"com.apple.UIKit"] pathForResource:@"Tock" ofType:@"aiff"];
SystemSoundID soundID;
AudioServicesCreateSystemSoundID((CFURLRef)[NSURL fileURLWithPath:path], &soundID);
AudioServicesPlaySystemSound(soundID...
I have an Cocoa app that calls a web service. When I parse the response from the web service I am getting a \n as the last character in my foundCharacters delegate for the NSXMLParser for each element in the XML.
When I try to do the following:
if (![string isEqualToString:@"\n"])
The check will always fails to catch the newline. ...
I have a view controller (A) that loads a view controller (B) and uses it's view in my view heirarchy. If I add B's view to A's view heirarchy, and I don't manually forward events like viewWillAppear, I can't handle them in the B controller. (From the viewWillAppear: docs)
Warning: If the view belonging to a
view controller is ad...
In Xcode I run the program I wrote with the leaks instrument
It says leaks are discovered and the total leaked bytes keeps rising.
I look at leaked objects and none of them seem to be from my program.
For example QuartzCore
OpenGLES
libLLVMContainer.dyl
libCoreVMClient.dylib
libGFXShared.dylib
Is it my fault that the program is leaki...
Hey Everyone,
I have this code:
[hudWindow orderFront:nil];
And when I debug it and run the command does not seem to work.
hudWindow is a NSPanel.
Please help me solve this problem.
Thanks
Kevin
...
I'm not very familiar with C++ programming. I know the basics of programming in it (syntax, pointers, etc.) and I've built a few basic programs with it and done some basic debugging at work. I am puzzled by this line of code from Box2D, specifically the Box2dTest project from Cocos2D:
// Define the ground body.
b2BodyDef groundBodyDef;
...