TopClass update
Hey all,
I updated TopClass, which is basically a syntactically nice version of the Douglas Crockford Module Pattern. It no longer relies on any libraries.
It also has support for instances of a class that have their own public/private stuff. So: that moves it away from just being a singleton. These instances have a concept of parentClass and the parentClass has knowledge of the instances it has created. Allows you to do some pretty cool things. Comment if you want me to explain that part of it a little more.
Otherwise, just syntactically writing Douglas Crockford’s method is nice:
var MyThing = TopClass({
publicMethods: {
publicFunction: function() { //do something useful },
otherPublicFunction: function() { // do something more useful }
},
privateMethods: {
privateVar: "I'm private",
privateFunction() { //I can only be called by the public functions above }
}
});
October 1st, 2007 at 7:42 am e
[…] Ajax calls which render HTML from the server can sometimes get hard to manage. This little module will take JSON from your server and render it with a template that’s already in your HTML. I’ll explain it more later. You’ll need to be using TopClass. […]
October 19th, 2007 at 1:19 pm e
Very interesting code, really. Thank you very much for publishing. What is the license?
October 19th, 2007 at 2:31 pm e
Daniel,
Thanks. Please feel free to do whatever you want with the code. If you change it, I’d love to hear what you’ve done.
August 15th, 2008 at 7:39 am e
I get an error in this script on privateFunction “missing : after property id”. I think it should be “privateFunction: function() {}”
May 19th, 2010 at 1:18 am e
Office 2007 Professional
Office 2007 Ultimate
Office Professional 2007
Office Ultimate 2007
MS Office 2007
August 31st, 2010 at 1:09 am e
With DWG to PDF Converter, you can convert files from any Windows software application to over 150 file types including searchable PDF, DWG, TIFF, JPEG etc, as easy as printing the file. Converting your DWG files to PDF has never been easier! Combine several DWG files into a single PDF file, convert a CAD file into a PDF file, or convert DWG to ANY file format!
This DWG Converter can batch convert multiple files such as DWG to DWF, DXF, SVG as well as to PDF, PLT(HPGL), SVG, EPS, CGM, BMP, JPEG, TIFF, PCX, WMF, PNG without the need of AutoCAD. Merge multiple DWG files into one PDF file is also supported.