Aida Object Removal Example using a WebGrid

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Aida Object Removal Example using a WebGrid

Rob Rothwell
Ok...I have a reproducible example of what I am doing wrong.

I have included a simple ChangeSet with a ListItem, ListManager, and ListManagerApp.  You can create and delete ListItems with the ListManager, with a view to do this provided by the ListManagerApp.

Load the ChangeSet.

In a workspace, if you do:

m:=ListManager new.
m addItem: 'Expected 1'.

and then

ListItem allInstances inspect.

you see the one item as expected.

If you then

m selectAllItems.
m deleteSelectedItems.

and

Smalltalk garbageCollect.
ListItem allInstances inspect.

you see no ListItem(s) as expected as well.

Now in an Aida Image with the demo started, do

(AIDASite named: 'aidademo') urlResolver defaultURL: '/listmanager.html' forObject: m .

and go to http://localhost:8888/listmanager.html.

Enter a name in the input field and press "new."  A new item will appear in the grid.

Again do ListItem allInstances inspect, and the item will be seen as expected.

Check the checkbox beside your item and press "delete."  The item will go away.

Now do

Smalltalk garbageCollect.
ListItem allInstances inspect.

The item is still there.  Look for "objects pointing to this value" in the inspector.  I see four items, which appear to be the WebGrid collection, two WebGrid Columns, and a WebCheckBox.

What am I doing wrong so that  I can't get rid of these objects through the WebApplication?  I expect it has something to do with direct references to my objects in the WebGrid?

Thanks,

Rob











_______________________________________________
Aida mailing list
[hidden email]
http://lists.aidaweb.si/mailman/listinfo/aida

AidaObjectRemovalStudy.st (4K) Download Attachment