It sounds like a problem with your site configuration. You need to make sure to define a site in Dreamweaver and open a saved page from that site before creating a cart object.
From your description it would appear you didn't set up the site in dreamweaver properly.