[aida] Comment on the tutorial

Stephen Davies stephen.l.davies at gmail.com
Mon Sep 22 12:59:11 CEST 2008


Hi,
In the tutorial, step 6, you are shown how to add a "Add a new entry" link
to your viewMain.

The added code looks like so:

        e addBreak.

        e addLinkTo: self text: 'Add a new entry'  view: #add.


 When I did this, I was puzzled by the generated URL for the linked to page:

        http://localhost:8888/an%20ademoaddressbookapp.html?view=add



When I thought about it, I realised that the reason was that the link
was to the ADemoAddressBookApp instance, and not the ADemoAddressBook.

Whilst the functionality works fine, this seems to break the usual
convention which is that URLs point at the model objects, not at the
view.

I changed the above code to:

	e addBreak.

	e addLinkTo: self observee text: 'Add an entry'  view: #add.

And got the expected URL:

              http://localhost:8888/addressbook.html?view=add

Things worked just the same, and this seems more correct to me.

(It does seem wrong to me that the view for adding an address is in
the AddressBook model, but I leave that to another post).

Thanks for comments,

Steve
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.aidaweb.si/pipermail/aida/attachments/20080922/538b09e7/attachment.htm 


More information about the Aida mailing list