Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Denarius

macrumors 6502a
Original poster
Feb 5, 2008
690
0
Gironde, France
Hello folks,

Yet another question, I'm afraid.

I've built a Ruby utility that uses a Plist of this format:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>broadcastIP</key>
	<string>192.168.1.255</string>
	<key>printers</key>
	<dict>
		<key>Brother_HL_1650_1670N_series___PennyG5</key>
		<dict>
			<key>printerHost</key>
			<string>PennyG5.local</string>
			<key>printerURL</key>
			<string>mdns://Brother%20HL-1650_1670N%20series%20%40%20PennyG5._ipp._tcp.local</string>
		</dict>
		<key>EPSON_AL_C900___PennyG5</key>
		<dict>
			<key>printerHost</key>
			<string>PennyG5.local</string>
			<key>printerURL</key>
			<string>mdns://EPSON%20AL-C900%20%40%20PennyG5._ipp._tcp.local</string>
		</dict>
	</dict>
</dict>
</plist>

My problem lies with the printers dictionary when writing my preference panel in Cocoa: I had been looking to use a tableview with columns Printer Name, Printer Host, Printer URL bound to an NSDictionaryController in turn bound to a printer class with the attributes printerName, printerHost, printerURL. Trouble is, if I do it like that, I imagine I'm going to end up with something like:
Code:
<dict>
<key>printerName</key>
<string>blah</string>
<key>printerHost</key>
<string>blah</string>
<key>printerURL</key>
<string>blah</string>
</dict>
This really isn't the format I want, but I can't see a way of avoiding this without abandoning the tableView.

All thoughts very welcome indeed.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.