412 lines
No EOL
11 KiB
HTML
412 lines
No EOL
11 KiB
HTML
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
<!DOCTYPE html
|
|
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
|
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
<head>
|
|
<title>Class: CFPropertyList::List</title>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
|
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
|
<script type="text/javascript">
|
|
// <![CDATA[
|
|
|
|
function popupCode( url ) {
|
|
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
|
}
|
|
|
|
function toggleCode( id ) {
|
|
if ( document.getElementById )
|
|
elem = document.getElementById( id );
|
|
else if ( document.all )
|
|
elem = eval( "document.all." + id );
|
|
else
|
|
return false;
|
|
|
|
elemStyle = elem.style;
|
|
|
|
if ( elemStyle.display != "block" ) {
|
|
elemStyle.display = "block"
|
|
} else {
|
|
elemStyle.display = "none"
|
|
}
|
|
|
|
return true;
|
|
}
|
|
|
|
// Make codeblocks hidden by default
|
|
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
|
|
|
// ]]>
|
|
</script>
|
|
|
|
</head>
|
|
<body>
|
|
|
|
|
|
|
|
<div id="classHeader">
|
|
<table class="header-table">
|
|
<tr class="top-aligned-row">
|
|
<td><strong>Class</strong></td>
|
|
<td class="class-name-in-header">CFPropertyList::List</td>
|
|
</tr>
|
|
<tr class="top-aligned-row">
|
|
<td><strong>In:</strong></td>
|
|
<td>
|
|
<a href="../../files/rbCFPropertyList_rb.html">
|
|
rbCFPropertyList.rb
|
|
</a>
|
|
<br />
|
|
</td>
|
|
</tr>
|
|
|
|
<tr class="top-aligned-row">
|
|
<td><strong>Parent:</strong></td>
|
|
<td>
|
|
Object
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<!-- banner header -->
|
|
|
|
<div id="bodyContent">
|
|
|
|
|
|
|
|
<div id="contextContent">
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<div id="method-list">
|
|
<h3 class="section-bar">Methods</h3>
|
|
|
|
<div class="name-list">
|
|
<a href="#M000062">load</a>
|
|
<a href="#M000058">load_binary</a>
|
|
<a href="#M000060">load_binary_str</a>
|
|
<a href="#M000061">load_str</a>
|
|
<a href="#M000057">load_xml</a>
|
|
<a href="#M000059">load_xml_str</a>
|
|
<a href="#M000056">new</a>
|
|
<a href="#M000063">save</a>
|
|
<a href="#M000064">to_str</a>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
<!-- if includes -->
|
|
|
|
<div id="section">
|
|
|
|
|
|
<div id="constants-list">
|
|
<h3 class="section-bar">Constants</h3>
|
|
|
|
<div class="name-list">
|
|
<table summary="Constants">
|
|
<tr class="top-aligned-row context-row">
|
|
<td class="context-item-name">FORMAT_BINARY</td>
|
|
<td>=</td>
|
|
<td class="context-item-value">1</td>
|
|
<td width="3em"> </td>
|
|
<td class="context-item-desc">
|
|
Format constant for binary format
|
|
|
|
</td>
|
|
</tr>
|
|
<tr class="top-aligned-row context-row">
|
|
<td class="context-item-name">FORMAT_XML</td>
|
|
<td>=</td>
|
|
<td class="context-item-value">2</td>
|
|
<td width="3em"> </td>
|
|
<td class="context-item-desc">
|
|
Format constant for <a href="XML.html">XML</a> format
|
|
|
|
</td>
|
|
</tr>
|
|
<tr class="top-aligned-row context-row">
|
|
<td class="context-item-name">FORMAT_AUTO</td>
|
|
<td>=</td>
|
|
<td class="context-item-value">0</td>
|
|
<td width="3em"> </td>
|
|
<td class="context-item-desc">
|
|
Format constant for automatic format recognizing
|
|
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<div id="attribute-list">
|
|
<h3 class="section-bar">Attributes</h3>
|
|
|
|
<div class="name-list">
|
|
<table>
|
|
<tr class="top-aligned-row context-row">
|
|
<td class="context-item-name">filename</td>
|
|
<td class="context-item-value"> [RW] </td>
|
|
<td class="context-item-desc">
|
|
Path of PropertyList
|
|
|
|
</td>
|
|
</tr>
|
|
<tr class="top-aligned-row context-row">
|
|
<td class="context-item-name">format</td>
|
|
<td class="context-item-value"> [RW] </td>
|
|
<td class="context-item-desc">
|
|
Path of PropertyList
|
|
|
|
</td>
|
|
</tr>
|
|
<tr class="top-aligned-row context-row">
|
|
<td class="context-item-name">value</td>
|
|
<td class="context-item-value"> [RW] </td>
|
|
<td class="context-item-desc">
|
|
the root value in the plist file
|
|
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<!-- if method_list -->
|
|
<div id="methods">
|
|
<h3 class="section-bar">Public Class methods</h3>
|
|
|
|
<div id="method-M000056" class="method-detail">
|
|
<a name="M000056"></a>
|
|
|
|
<div class="method-heading">
|
|
<a href="List.src/M000056.html" target="Code" class="method-signature"
|
|
onclick="popupCode('List.src/M000056.html');return false;">
|
|
<span class="method-name">new</span><span class="method-args">(opts={})</span>
|
|
</a>
|
|
</div>
|
|
|
|
<div class="method-description">
|
|
</div>
|
|
</div>
|
|
|
|
<h3 class="section-bar">Public Instance methods</h3>
|
|
|
|
<div id="method-M000062" class="method-detail">
|
|
<a name="M000062"></a>
|
|
|
|
<div class="method-heading">
|
|
<a href="List.src/M000062.html" target="Code" class="method-signature"
|
|
onclick="popupCode('List.src/M000062.html');return false;">
|
|
<span class="method-name">load</span><span class="method-args">(file=nil,format=nil)</span>
|
|
</a>
|
|
</div>
|
|
|
|
<div class="method-description">
|
|
<p>
|
|
Read a plist file
|
|
</p>
|
|
<table>
|
|
<tr><td valign="top">file = nil:</td><td>The filename of the file to read. If nil, use <tt>filename</tt> instance
|
|
variable
|
|
|
|
</td></tr>
|
|
<tr><td valign="top">format = nil:</td><td>The format of the plist file. Auto-detect if nil
|
|
|
|
</td></tr>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="method-M000058" class="method-detail">
|
|
<a name="M000058"></a>
|
|
|
|
<div class="method-heading">
|
|
<a href="List.src/M000058.html" target="Code" class="method-signature"
|
|
onclick="popupCode('List.src/M000058.html');return false;">
|
|
<span class="method-name">load_binary</span><span class="method-args">(filename=nil)</span>
|
|
</a>
|
|
</div>
|
|
|
|
<div class="method-description">
|
|
<p>
|
|
read a binary plist file
|
|
</p>
|
|
<table>
|
|
<tr><td valign="top">filename = nil:</td><td>The filename to read from; if nil, read from the file defined by instance
|
|
variable <tt>filename</tt>
|
|
|
|
</td></tr>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="method-M000060" class="method-detail">
|
|
<a name="M000060"></a>
|
|
|
|
<div class="method-heading">
|
|
<a href="List.src/M000060.html" target="Code" class="method-signature"
|
|
onclick="popupCode('List.src/M000060.html');return false;">
|
|
<span class="method-name">load_binary_str</span><span class="method-args">(str=nil)</span>
|
|
</a>
|
|
</div>
|
|
|
|
<div class="method-description">
|
|
<p>
|
|
<a href="List.html#M000062">load</a> a plist from a binary string
|
|
</p>
|
|
<table>
|
|
<tr><td valign="top">str:</td><td>The string containing the plist
|
|
|
|
</td></tr>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="method-M000061" class="method-detail">
|
|
<a name="M000061"></a>
|
|
|
|
<div class="method-heading">
|
|
<a href="List.src/M000061.html" target="Code" class="method-signature"
|
|
onclick="popupCode('List.src/M000061.html');return false;">
|
|
<span class="method-name">load_str</span><span class="method-args">(str=nil,format=nil)</span>
|
|
</a>
|
|
</div>
|
|
|
|
<div class="method-description">
|
|
<p>
|
|
<a href="List.html#M000062">load</a> a plist from a string
|
|
</p>
|
|
<table>
|
|
<tr><td valign="top">str = nil:</td><td>The string containing the plist
|
|
|
|
</td></tr>
|
|
<tr><td valign="top">format = nil:</td><td>The format of the plist
|
|
|
|
</td></tr>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="method-M000057" class="method-detail">
|
|
<a name="M000057"></a>
|
|
|
|
<div class="method-heading">
|
|
<a href="List.src/M000057.html" target="Code" class="method-signature"
|
|
onclick="popupCode('List.src/M000057.html');return false;">
|
|
<span class="method-name">load_xml</span><span class="method-args">(filename=nil)</span>
|
|
</a>
|
|
</div>
|
|
|
|
<div class="method-description">
|
|
<p>
|
|
Load an <a href="XML.html">XML</a> PropertyList
|
|
</p>
|
|
<table>
|
|
<tr><td valign="top">filename = nil:</td><td>The filename to read from; if nil, read from the file defined by instance
|
|
variable <tt>filename</tt>
|
|
|
|
</td></tr>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="method-M000059" class="method-detail">
|
|
<a name="M000059"></a>
|
|
|
|
<div class="method-heading">
|
|
<a href="List.src/M000059.html" target="Code" class="method-signature"
|
|
onclick="popupCode('List.src/M000059.html');return false;">
|
|
<span class="method-name">load_xml_str</span><span class="method-args">(str=nil)</span>
|
|
</a>
|
|
</div>
|
|
|
|
<div class="method-description">
|
|
<p>
|
|
<a href="List.html#M000062">load</a> a plist from a <a
|
|
href="XML.html">XML</a> string
|
|
</p>
|
|
<table>
|
|
<tr><td valign="top">str:</td><td>The string containing the plist
|
|
|
|
</td></tr>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="method-M000063" class="method-detail">
|
|
<a name="M000063"></a>
|
|
|
|
<div class="method-heading">
|
|
<a href="List.src/M000063.html" target="Code" class="method-signature"
|
|
onclick="popupCode('List.src/M000063.html');return false;">
|
|
<span class="method-name">save</span><span class="method-args">(file=nil,format=nil,opts={})</span>
|
|
</a>
|
|
</div>
|
|
|
|
<div class="method-description">
|
|
<p>
|
|
Serialize <a href="../CFPropertyList.html">CFPropertyList</a> object to
|
|
specified format and write it to file
|
|
</p>
|
|
<table>
|
|
<tr><td valign="top">file = nil:</td><td>The filename of the file to write to. Uses <tt>filename</tt> instance
|
|
variable if nil
|
|
|
|
</td></tr>
|
|
<tr><td valign="top">format = nil:</td><td>The format to <a href="List.html#M000063">save</a> in. Uses <tt>format</tt>
|
|
instance variable if nil
|
|
|
|
</td></tr>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="method-M000064" class="method-detail">
|
|
<a name="M000064"></a>
|
|
|
|
<div class="method-heading">
|
|
<a href="List.src/M000064.html" target="Code" class="method-signature"
|
|
onclick="popupCode('List.src/M000064.html');return false;">
|
|
<span class="method-name">to_str</span><span class="method-args">(format=List::FORMAT_BINARY,opts={})</span>
|
|
</a>
|
|
</div>
|
|
|
|
<div class="method-description">
|
|
<p>
|
|
convert plist to string
|
|
</p>
|
|
<table>
|
|
<tr><td valign="top">format = List::FORMAT_BINARY:</td><td>The format to <a href="List.html#M000063">save</a> the plist
|
|
|
|
</td></tr>
|
|
<tr><td valign="top">opts={}:</td><td>Pass parser options
|
|
|
|
</td></tr>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div id="validator-badges">
|
|
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
|
</div>
|
|
|
|
</body>
|
|
</html> |