Howto:Coding a simple Nasal Framework: Difference between revisions

Line 112: Line 112:


All the original foo=nil initialization can now be removed, this is 100% equivalent, and saves you tons of typing and time!
All the original foo=nil initialization can now be removed, this is 100% equivalent, and saves you tons of typing and time!
Note that it makes sense to group your elements according to their initialization requirements, i.e. anything that just needs '''getElementById()''' called would go into the same vector, while anything that requires '''getElementById().updateCenter()''' called, would get into another vector.
These tips alone will reduce the code required in PFD.nas by about 150 lines.


== Dealing with Properties ==
== Dealing with Properties ==