July 2009 Entries
I found myself using the cross browser xml library XML for <SCRIPT> and not liking that you get no intellisense love I whipped up a quick class to convert the javadoc comments into xmldoc format.
Luckily the main library has consistent and valid javadocs so the task was not so tedious. Some of the other vitals scripts such as the xpath addon not so much. Will tackle those later, reluctantly. Will be an exercise in munging to be sure.
in any case here is the class that will eat xmlw3cdom.js and parse its subset of javadocs into valid xmldoc and add them inside...
This work is in support of a POJO automated documentation tool that will be released shortly.
Find attached commented xml file walkthroughs of the comment.xml and reflection.org files that are consumed by Sandcastle Help File Builder to generate documentation and working samples to test these conclusions
Steps to generate docs:
Download and install Sandcastle.
Download and install Sandcastle Help File Builder
Download and decompress the sample to create a directory structure that the AjaxDoc plugin recognizes.
C:\docGen\
C:\docGen\docGen.shfbproj
C:\docGen\Explained\
C:\docGen\Explained\comments.xml
C:\docGen\Explained\reflection.org
C:\docGen\Output\
C:\docGen\Output\docgen.org
C:\docGen\Output\docgen.xml
C:\docGen\Projects\
C:\docGen\Projects\docgen.project.xml
If uncompressed to the default directory shown, you may simply dblclick docGen.shfbproj and build the sample help file.
Otherwise...
visual studio javascript intellisense friendly
// enum creation pattern
// NOTE: i am not doing the intensive argument validation
// and restricting the enum values to integer as is done in
// msajax so you can probably break this with little effort.
function createEnum(type, flags)
{
for (var i in type.prototype)
{
type[i] = type.prototype[i];
}
// __xxx props are msajax/vs talking to each other
type.__enum = true;
type.__flags = flags;
}
intEnum = function()
{
/// <summary>
...
I just learned a hard lesson.
take a look at the following code.
salient.delegate.prototype.indexOf = function(fn)
{
/// <summary>
/// </summary>nbsp; {
for (var i = 0; i < this.eventHandlers.length; i++)
{
eventHandler = this.eventHandlers[i];
if (eventHandler.token === fn || eventHandler.fn === fn)
{
...
I have been doing a lot of javascript lately after a long time of not doing any javascript. I mean a long time and I found myself trying to implement patterns that have become familiar and trusted in the strongly typed class based OOP world.
I had some success but a lot of frustration, especially trying to enforce encapsulation to force the use of messages (events/delegate/commands etc).
I am sure there are very simple and elegant ways to to the things I have been trying to do but they were not in my rusty toolbox after so long.
What I really...
Recently i was pulled in to try and save a project that was headed out the door in not so good shape and dealing with GMarkers and linked polygons was one of the more convoluted scenarios in the code. The existing workflow and 'logic' did not allow for an agile redesign of that (or any other) aspect of the project. So I dealt with it. or around it as it were, but it seem to me that there was a much easier and cleaner way to accomplish that task.
So.... I have had a bit of time on my hands and got...
Found myself wanting to use jqGrid and being annoyed that all the quickstarts and examples were in php/mysql and found the default method of accessing soap endpoints exciting not so much.
So here is my solution, http://skysanders.net/jqgridws/,.
The query engine supports paging/sorting and filtering ( only one term currently) over any table in your database without writing any data access code. Just knock out some simple lightweight DTO objects shaped like your tables and away you go.
Anyway - check it out and let me know what you think.