Inside Out Outside In

New strain of TB found that is virtually untreatable

BBC News reported that a new strain of TB has been found that has extreme drug resistance.  Occurrences have been seen worldwide.  Many of us in the IT profession, such as consultants, regularly expose ourselves to neat little self contained environments of re-circulating air called airplane cabins.   While the risk of contracting TB from air travel is considered low,  The WHO does have guidelines for Tuberculosis and Air Travel that anyone who flies frequently should be aware of.

Nice review of Microsoft Expression Web Designer on Vitamin

Rachel Andrew has authored a nice review on Microsoft Expression Web designer on Vitamin.  The review, replete with screenshots, has the inevitable comparisons to Dreamweaver and some interesting points, including the fact that there is no OS X version, which I would fully expect of Microsoft, taking their usual Microsoft centric approach instead of working on a multi-platform codebase. 

Adding Code Block support for BlogCFC and FCKEditor

If you use a rich text editor with Ray's BlogCFC, you've probably run into some quirks when you try to use code blocks.  By default, Ray's editor uses a standard textarea form element.  I've been using the FCKEditor on BlogCFC for sometime and today I decided to extend the toolbar to support a codeblock dialog.

FCKEditor supports a plug-in architecture.  The enclosure provides the base files (sorry, I haven't taken the time to package it up nicely).  If you follow through the wiki developer instructions, you should be able to add code block support fairly easily.

For my dialog, I chose to use JSMX, one of the simplest CF/AJAX libraries I've found. I converted the old cf_coloredCode custom tag to cfc remoting service.  The code is typed/pasted into the dialog, and then the plugin dialog calls the colorizer.cfc and pastes the result into the main editor window.

 

CFFORM and field focus problem

The standard use of <CFFORM format="html">, which is the default format, automatically generates the validation script for required fields.  Unlike the XML format which uses the xsl\\_cfformvalidation.xsl to generate the validation function, the default format has the function generation hard coded.

On complex html forms, such as a tabbed interface, a problem occurs with the <CFFORM> validation scripts when it tries to focus on a required field that may not be visible.  Another annoyance is that the focus will only occur on required fields if they are standard text fields.  It will not focus on textarea or other types.

The solution is to override the focus function on the form elements by creating a two-step focus, where the first step initiates any actions required to make the field visible, such as tab navigation and then focus the field.

The example below (Internet Explorer 6) illustrates how to re-assign the focus event.  The "Test Focus" button will demonstrate the issue where only text fields will gain focus on a standard form submission and the "Manual Submit" button shows how to gain focus on a textarea.

Also included in the example is the use of the onFocus (which occurs after the focus) and onBlur events to provide a halo effect when the field gains focus.

 

<cfform name="focusExample">
foo:<cfinput type="text" name="foo" required="yes"
message="Foo is required.">
<br />
bar:<cfinput type="text" name="bar" required="yes"
message="Bar is required.">
<br />
comments:<br />
<cftextarea name="comments" rows="5" cols="20" required="yes"
message="Comments are required.">
</cftextarea><br />
<cfinput type="Submit" name="testFocus" value="Test Focus"><br />
<cfinput type="button" name="manFocus" value="Manual Submit"
onClick="manualSubmission(this)">
<bR />

</cfform>

<script>

function haloInput(obj) {
if(typeof(obj) != 'undefined'){
obj.style.borderColor = '#0F0';
obj.style.borderColorDark = '#0F0';
obj.style.borderColorLight = '#0F0';
}else{
this.style.borderColor = '#0F0';
this.style.borderColorDark = '#0F0';
this.style.borderColorLight = '#0F0';
}

}
function plainInput(obj) {
if(typeof(obj) != 'undefined'){
obj.style.borderColor = '';
obj.style.borderColorDark = '';
obj.style.borderColorLight = '';
}else{
this.style.borderColor = '';
this.style.borderColorDark = '';
this.style.borderColorLight = '';
}
}

function checkForOther(){
var fObj = document.getElementById(_CF_FirstErrorField);
var myType = new String(fObj.type);

if(myType.substr(0,6) == 'select' || myType == 'textarea'){
fObj.focus();
}

}

function setFocus(formName){
var currentForm = document[formName];
for (var i = 0; i < currentForm.elements.length;i++){
var fobj = currentForm.elements[i];

if (typeof(fobj) != 'undefined'){
if(fobj.type == 'text'
|| fobj.type == 'textarea'
|| fobj.type == 'select'){

fobj.stepFocus = fobj.focus;

fobj.focus = function(){
// just an alert to show how the
//focus was intercepted.  Place
//your own code here such as navigation
//to another tab to make the element
//visible
alert(this.name + ' got focus');
this.stepFocus();
}
// these events occur after the focus
// so lets pretty up the fields
fobj.onfocus = haloInput;
fobj.onblur = plainInput;
}
}
}

}

function manualSubmission(fObj){

var currentForm = fObj.form;
// CFORM automatically generates the function for validation
// so the function name must match _CF_check + the form name
var cfValidate = _CF_checkfocusExample(currentForm);

if(!cfValidate){
checkForOther();
}


}

setFocus('focusExample');
</script>


Forbes a bit stingy on linking

I was reading the latest Forbes article "No Flash In the Pan" by Dan Frommer, which is peppered with references to Adobe, Apple, On2, as well as osFlash.org (though Dan only referenced the Red5 project) and noticed that all the reference links on the document only point to the Forbes site.  With all the mentions of other companies, you'd think that Forbes could at least provide a sub section of reference links.  They are perfectly willing to put in a stock ticker link that links to their stock lookup page, so its not just an issue of a print based media format being re-purposed for the web. 

Forbes/Dan Frommer, when you write about other sites, at least provide a link to those sites.  Sure we can Google it if we need to, but the whole purpose of hypertext was to make navigation easier for the user.  I'm sure you're reaping the rewards of page ranking when others link to your site, why not return the favor.  I suppose I probably went a bit overboard on linking for this article, but I wanted to prove my point.

Oh, and Forbes, if you're reading this, the MACR symbol is no longer valid.

 

 

Adobe looking for feedback on their site refresh.

Simon Horwith pointed out that Adobe is looking for feedback on their site refresh and the merging of the former Macromedia content under the  Adobe domain.  I've submitted information regarding my previous problem.  and even though I haven't found a suitable solution yet, thanks to John and others for their comments.

A Lesser Known Title of Macromind

Here's one that will fire a few dusty memory synapses.  When I was visiting my parents in California, I came across some old software I'd left behind years ago.  How many remember this little gem...

The picture isn't optimal, but the blurry comic star balloon mentions that it is created by Macromind and Michael Saenz, one of the first pioneers in  Digital Comics, Spaceship Warlock - a classic Macintosh game as well as  MacPlaymate and founder and CEO of Reactor.

 

Apple's touch sensitive GUI patent and Prior Art

Since1968 blogged about  Apple trying to get a patent for touch-sensitive input devices.  Check out flashcomponents.net and navigate to Interfaces/widgets/Jogs/Potentiometer and Jog Knobs.  Run that swf on a touch sensitive screen and you've got a great example of prior art.   The only difference of operation is the skinning of the component.  Adobe should jump into this fight right away and contest Apple's patent submission.

Macromedia Contribute Team is running a survey on Blogging Tools

The Macromedia contribute team is looking for survey participants on what blog authors are looing for in a blogging tool.  Here's your chance to get your wish list in.

Mergers and Software Installers

Whenever major companies merge, or worse, dot.bomb, I find myself scrambling to make sure I've got the latest updates, patches, and any documentation I can grab just in case it disappears into the ether.  Many times I've seen code-rich forums simply vanish, updates and patches gone.  All those wonderful ON-LINE registration enabling technologies end up breaking and you can no longer install that expensive suite of software you purchased a couple of years ago.

Sometimes the older version is just fine and there's no reason to upgrade.  I used to hate the idea of the "Dongle", a hardware based enablement device that plugs into a serial port or usb.  Now I'm a proponent of Dongles.  I want to be able to run/install my software in perpetuity, regardless of whether the company I purchased it from still exists.