Is there any XML binding framework for Objective-C?
I've tried a few searches on google and didn't find anything yet.
I'm looking for something that reads from a XSD/DTD/XML and generate:
the Model classes to store values
the actual parser that reads from the XML and populate the model classes
...
How can I get in Mac OS X "global" mouse position - I mean how can I in cocoa/cf/whatever find out cursor position even if it's outside the window, and even if my window is inactive?
I know it's somehow possible (even without admin permissions), because I've seen something like that in Java - but I want to write it in ObjC
Sorry for my...
I'm just getting started with using threads in obj-c/cocoa and I'm running into some trouble.. I get this error in the console:
2010-02-15 09:18:41.467 Timer[1007:4503] *** __NSAutoreleaseNoPool(): Object 0x10012adc0 of class __NSCFDate autoreleased with no pool in place - just leaking
2010-02-15 09:18:41.478 Timer[1007:4503] *** __NSAu...
Hi,
I have a table view and when I drop something on it, I get a blue focus inside it. Now, iTunes has the same behavior but in iTunes the color of the line is a lighter blue and the line is thicker. I have added a picture to explain it better. I want to achieve the same thing but I don't know why.
The Image: http://img502.imageshack.u...
I'm using this code in my UIView subclass to draw a circle with a gradient fill:
- (void)drawRect:(CGRect)rect {
CGContextRef context = UIGraphicsGetCurrentContext();
CGContextSetShadow (context, CGSizeMake(4,4), 5);
CGContextBeginPath (context);
CGContextAddEllipseInRect(context, CGRectMake(self.bounds.origin.x, self.bo...
As the title.
I tested NSScanner, but it passed some strange strings. (ex :123aaa).
Is there any way to convert string<->number strictly?
...
The static analyzer is showing up a leak in this block of code (specifically the link with the copy in it):
- (void)parser:(NSXMLParser *)parser didEndElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI
qualifiedName:(NSString *)qName
{
if ([elementName isEqualToString:@"item"])
{
[elements setObject...
Hi,
I am trying to upload multipart data to my server which has image data along with the fields specified in the following form
<form action="/imageUploader" enctype="multipart/form-data" method="post">
<p>
Title:<br>
<input type="text" name="title" size="30">
<input name="action" type="hidden" value="uploadtile" />
<input name="can...
When you create new Cocoa application Xcode generates MainMenu.xib for you with the sets of predefined menu items (File, Edit, Format, View, etc.).
I make a very simple application. I really don't need menu items Edit, Format, View. What is the best practice in this case. Should I remove or keep them? It's look very strange for me that ...
In UILabel there's functionality to truncate labels using different truncation techniques (UILineBreakMode). In NSString UIKit Additions there is a similar functionality for drawing strings.
However, I found no way to access the actual truncated string. Is there any other way to get a truncated string based on the (graphical) width for ...
I'm using a NSKeyedArchiver to encode a big object graph (76295 objects.)
It takes a lot of time but even worse the NSKeyedArchiver doesn't give back all its memory.
After using the Leak check, the code doesn't appear to leak at all but for some reason the encoding doesn't give back all memory after it's done.
Calling the encode method...
Hi all,
I am trying to make a cocoa application which will have form like fields and will be used to store and retrieve values from table in MySql database at some local linux server.
I want to know that is there any connectivity tool in cocoa which I can use or I have to design API for it??
Thanks,
Miraaj
...
Hi, I have a very specific web page that causes webview to crash with the Garnage Collector ON (does not crash when OFF).
Easy to reproduce: create a document base application, drop a webview, and have the following line (button perhaps).
- (void)connectSearch:(id)sender
{
[[webView mainFrame] loadRequest:[NSURLRequest requestWithURL:...
Hi All,
I am creating an NSView, which in its drawRect method creates and adds an NSImageView as a subview.
I would like to rotate this NSImageView (circleView), or [self]. So in another method, I am trying to do that:
-(void)startAnimation {
CABasicAnimation* spinAnimation = [CABasicAnimation animationWithKeyPath:@"transform.rotation...
I am just grasping the concepts of TDD and mocking, and am running into an issue in terms of how to properly. I have a sheet that drops down and lets a user create a new core data object and save it to the data store. I am not sure if I am taking the best approach to testing it.
- (IBAction)add:(id)sender
{
NSString *itemName = [...
Hi,
I am working on a text editor and I want to add RTFD support. After adding the RTFD file type to my Info.plist, I got the message that "readFromFileWrapper:ofType:error: must be overridden for your application to handle file packages."
I had a look around in the documentation and found some things, but I didn't manage to do everyth...
Hi,
I have an NSArray of NSDictionaries. I need to check if there's at least one occurrence of an object for a key of the NSDictionary in the NSArray. I do this by using
int i;
for (i=0;i< [myArray count];i++)
{
if ([[[myArray objectAtIndex: i] objectForKey: myKey] isEqualToString: myString]) {
found = YES;
break;
...
I run into design choices like this often and struggle a bit; I'm looking for some other perspectives.
I often want to keep lists of, or pass around chunks of state that are basically just sets of values. The values tend to be primitive types: floats, NSTimeIntervals, CGPoints, etc.
My first inclination is often to create C structures ...
I'm in the middle of writing some Cocoa classes to parse ID3 tags from MP3 files. To make them as easy to use as possible, I'm allowing the option to request a tag by the actual ID3 frame id ("TCON", "TPE1", "TALB", etc.) or an equivalent word/phrase ("genre", "artist", "album", etc.)
To store this data, currently I have a reference cla...
In Interface Builder.app (and some other cocoa apps), image dragging has a very nice/sexy effect of morphing the drag image while you drag a draggable item out of its window.
For example in Interface Buildler.app:
Show the Library Palette (⇧⌘L, or Tools Menu -> Library)
Drag an item out of the Library palette
NOTE: as you drag the ...