Re: TXT Records with NSImages

2009-04-30 Thread Marcel Weiher
Not sure this was solved. On 13.Mar, 2009, at 5:45 , Joe Turner wrote: NSImage *original = [NSImage imageNamed:NSImageNameComputer]; [original setSize:NSMakeSize(10.0f, 10.0f)]; - this will not make your bitmap 10x10 pixels, but just change the DPI settings to make sure it

Re: TXT Records with NSImages

2009-03-13 Thread Alexander Spohr
Just got recently into that pit myself. Read the docs _very_ carefully for this one. (And file a complaint at the bottom of the doc’s page) dictionaryFromTXTRecordData: Return Value A dictionary representing txtData. The dictionary’s keys are NSStringobjects using UTF8 encoding. The

Re: TXT Records with NSImages

2009-03-13 Thread Joe Turner
Actually, I am converting it to NSData, and then adding it, and it still returns nil Joe On Mar 13, 2009, at 3:27 AM, Alexander Spohr wrote: Just got recently into that pit myself. Read the docs _very_ carefully for this one. (And file a complaint at the bottom of the doc’s page)

Re: TXT Records with NSImages

2009-03-13 Thread Michael Ash
On Fri, Mar 13, 2009 at 8:12 AM, Joe Turner joetur...@me.com wrote: Actually, I am converting it to NSData, and then adding it, and it still returns nil Post code. Mike ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin

Re: TXT Records with NSImages

2009-03-13 Thread Keith Duncan
Joe, That's a lot of data to be storing in the TXT record. I'd advise that you store it in the NULL record as iChat does for 'Bonjour' chat. Keith ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or

Re: TXT Records with NSImages

2009-03-13 Thread Joe Turner
Here: NSImage *original = [NSImage imageNamed:NSImageNameComputer]; [original setSize:NSMakeSize(10.0f, 10.0f)]; NSData *image = [original TIFFRepresentation]; NSBitmapImageRep *imageRep = [NSBitmapImageRep imageRepWithData:image]; NSData *finalData =

Re: TXT Records with NSImages

2009-03-13 Thread Michael Ash
On Fri, Mar 13, 2009 at 8:45 AM, Joe Turner joetur...@me.com wrote: Here: NSImage *original = [NSImage imageNamed:NSImageNameComputer];                [original setSize:NSMakeSize(10.0f, 10.0f)];                NSData *image = [original TIFFRepresentation];                NSBitmapImageRep

Re: TXT Records with NSImages

2009-03-13 Thread Joe Turner
That's what I thought too. But how do you use the NULL record? Joe On Mar 13, 2009, at 7:36 AM, Keith Duncan wrote: Joe, That's a lot of data to be storing in the TXT record. I'd advise that you store it in the NULL record as iChat does for 'Bonjour' chat. Keith

Re: TXT Records with NSImages

2009-03-13 Thread Keith Duncan
Joe, You'll need to drop below NSNetService and CFNetService to manipulate the NULL record data. Take a look at the API in dns_sd.h for the functions you need. Like a TXT record, a NULL record has a limit of 65535 bytes but unlike the TXT record it isn't segmented. Here's some sample

TXT Records with NSImages

2009-03-12 Thread Joe Turner
Hello, Recently, I've been working on an app that will sync with an iphone app. So, I am using NSNetServices. I would like the iPhone to display the mac's icon, so I was thinking of using the TXT Record to store the icon. However, whenever I add it to the dictionary, convert the