Dataset.clear() - MACROMEDIA FLASH 8-COMPONENTS LANGUAGE Reference

Components language reference
Table of Contents

Advertisement

Example
The following code enables a Save Changes button (not shown) if the DataSet collection, or
any items with that collection, have had modifications made to them that haven't been
committed to a delta packet.
my_ds.addItem({name:"Milton", years:3});
my_ds.addItem({name:"Mark", years:3});
my_ds.addItem({name:"Sarah", years:1});
my_ds.addItem({name:"Michael", years:2});
my_ds.addItem({name:"Frank", years:2});
my_ds.addEventListener("modelChanged", modelChangedListener);
function modelChangedListener(evt_obj:Object):Void {
if (evt_obj.target.changesPending()) {
trace("changes pending");
submitChanges_button.enabled = true;
}
}
submitChanges_button.enabled = false;
my_ds.addItem({name:"Hal", years:4});

DataSet.clear()

Availability
Flash Player 7.
Edition
Flash MX Professional 2004.
Usage
dataSetInstance.clear()
Returns
Nothing.
Description
Method; removes the items in the current view of the collection. Which items are considered
"viewable" depends on any current filter and range settings on the current iterator. Therefore,
calling this method might not clear all of the items in the collection. To clear all of the items
in the collection regardless of the current iterator's view, use
If
DataSet.logChanges
added to
DataSet.deltaPacket
350
Components Dictionary
is set to
when you invoke this method, "remove" entries are
true
for all items in the collection.
DataSet.removeAll()
.

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-COMPONENTS LANGUAGE and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Flash 8

Table of Contents