Search content:

 

Personal Menu
Username:
Password:
Save password

Become a member

Forgot Password?

 

Don't miss these
Custom Scroll Bars
Stamper Sprite
Sound slider
Yak
Set WarpMode of a QTVR Sprite
alt.multimedia.director
Brain Killer (Simon)
Vector Shape - Create Ellipse
SiteSearch Indexer
Thumbnail Browser
MediaMacros Xtras Mall
 

 

 

Behavior Add a unique property to a property list

Added on 9/11/2003

 

Compatibilities:

This item has not yet been rated

Author: Sander Falise

This function is basically the same as the addProp function for property lists, but it deletes all properties with the name of the property you want to add. This makes sure your lists stay small and prevents errors because lists will no longer have duplicate entries. Usage is simple: addAProp(listName, propertyName, value) listName is a propery list, propertyName can be either a string or a property, value can be anything. If no value has been specified, the property will be deleted. No value is NOT the same as "" (an empty string) or 0 (zero). I hope you find this usefull, good luck coding!

-- before adding a property to a list, delete all properties with the same name
on addAProp me, a, p, v
  if ilk(p) = #string then s = symbol(p)
  repeat while a.deleteProp(s)    
  end repeat
  if ilk(v) <> #void then a.addProp(s, v)  
  return a  
end

 


Upload Provided by ABCUpload ASP

Contact

MMI
22 West Court Sq
Suite 2C
Newnan, GA 30263
USA

Fax - (206) 339-5833

Send e-mail