Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- alias ListTest {
- var %k echo @Debug2
- if !$window(@Debug) { window -e @Debug }
- if !$window(@Debug2) { window -e @Debug2 }
- clear @Debug2
- var %x 100
- var %list $List
- %k Adding 100 items to list $qt(%list)
- while %x {
- var %obj $Class
- - $Class(%obj,VAR,This is a fucking test: %x).setv
- - $list(%list,%obj).add
- dec %x
- }
- var %x 1
- %k List count: $List(%list).count - Listing Items
- while $List(%list,%x).get {
- var %y $v1
- %k Class(List(%list, $+ %x $+ ),VAR).getv = $Class(%y,VAR).getv - Count: $List(%list).count
- inc %x
- }
- var %x $CopyObject(%list)
- if %x {
- %k Copied object $qt(%list) to $qt(%x) - Count: $list(%x).count
- - $List(%x).delete
- }
- %k Exporting Object: %list
- %k $iif($ExportObject(%list),Successfully exported,Failed to export) object $qt(%list)
- - $List(%list,1).delete
- %k $iif($IsInstance(%list),Failed to delete,Successfully deleted) object $qt(%list)
- %k $iif($ImportObject(%list),Successfully imported,Failed to import) object $qt(%list)
- var %x 1
- %k List count: $List(%list).count - Listing Items...
- while $List(%list,%x).get {
- var %y $v1
- %k $!Class($List(%list, $+ %x $+ ),VAR).getv = $Class(%y,VAR).getv - Count: $List(%list).count
- inc %x
- }
- %k Deleting List..
- - $List(%list,1).delete
- %k $iif($IsInstance(%list),Failed to delete,Successfully deleted) Object: %list
- %k Finished list test. Handle: %list $+($chr(40),$iif($IsInstance(%list),True,False),$chr(41))
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement