Sunday, May 24, 2009

Small API fixes and tweaking on updater/installer

NaroCAD have small touches in function API, mostly two:
- till now, every time you create a node with function you should call BeginUpdate, to avoid crashes in Execute.

NaroCAD have a parametric modeling architecture built-in so, every time a parameter is changed right after you define a function, may make the function to be called even before all dependencies are defined. To avoid this was necessarily to call BeginUpdate right after you called a function.

Right now the BeginUpdate is called silently. And the EndUpdate was already called as a part of Execute.

Putting BeginUpdate by default, will make the concern that the developer will want to call too early the Execute method still. Because this cannot be solved in all cases, the Function attribute (which can create a shape) have right access by dependency to an property named: HasDependenciesSolved which will return a boolean value that reflect if your function have all stated dependencies defined.

This property is checked and will block and log misused calls to create a shape without defined dependencies.

Also, before uploading the file to Naro server, it is setup an option to take the snapshot from Naro server. The installer is also updated to install by default NaroCAD to local user folder. Also, a small fix is that the installer will point NaroCAD to NaroStarter.

No comments: