Madcap giveth and they taketh away

July 29th, 2010

Flare-name-element

The context menu for a span in Flare 6.0

Madcap Flare 6.1 has been out for a while now and, if you haven't already, you really should upgrade to it if you're a Flare user – and if you're a tech writer and you're not using Flare to produce online help then do yourself a favour and go and take a look at it.

Release 6.1 is confirmation that Flare is the best documentation creation tool out there. In particular, for me, this release is important because it allows you to use Subversion (SVN) from within Flare, which was broken in 6.0.

However ...

Isn't it annoying when a new release of a software application removes something that you'd got used to using in previous releases? In Flare 6.1 – for no discernable reason – you can no longer change the attributes of a span by clicking on the "span" marker. We use the Name attribute of a span with a certain class to create a link to our own home-grown glossary popups. This worked great in previous releases, as follows:

  • Select a word or phrase
  • Choose span.glossPop from the Styles list
  • Click "span" > Name
  • Add the appropriate glossary reference

In 6.1 you can't do this any more. Now, just to increase your click count, you have to get to the Manage Named Elements dialog box from the Format menu.

Okay, so there's a workaround. But why remove something that was useful and we'd got used to using? Is it a bug or is there some sort of rationale to this change? I'll raise a Support call and report back.

But in my view more clicks to achieve the same result is never a good thing.

Leave a comment

 

PHP: swapping round columns & rows in field/record data

July 20th, 2010

I'm blogging this just because I couldn't find a solution via Google so I had to figure this out myself and it might save you some time if you're trying to do the same thing.

I have some PHP script that grabs some data out of a MySQL table. However, rather than display it in the normal way:

resultField1 resultField2 resultField3 resultField4 resultField5
2010-12-24 55 red 1 Miles Davis
2011-03-30 65 yellow 0 Kevin Coyne
2011-06-16 82 purple 1 Kate Bush

I want to swap round the rows and columns so that I display it like this:

resultField1 2010-12-24 2011-03-30 2011-06-16
resultField2 55 65 82
resultField3 red yellow purple
resultField4 1 0 1
resultField5 Miles Davis Kevin Coyne Kate Bush

The thing to be aware of is that when you use mysql_fetch_assoc to get stuff out of a database, for example:

while($resultArray = mysql_fetch_assoc($selectQuery)) {
    Do stuff here ...
}


what you get back is an associative array (that's a hash for folks like me who learnt this stuff in Perl before arriving at PHP). So in the above example $resultArray is an associative array - that is, a set of key/value pairs where the key is the field name and the value is the value in that field for that record. Each iteration through the while loop you get a different record.

So, in effect, it's like an array of associative arrays.

However, what you want in order to be able to swap round fields and columns is an associative array of arrays - that is, a set of key/value pairs where each key is a field name and each value is an array of the values for that field in each record in the data set. So what you need to do is:

  • Iterate through each record in the data set (i.e. each row in your results) .
  • For each field in the record, assign the field value to an array, a reference to which is the value of the key/value pair in the outer associative array.

If it sounds complicated, then I'm glad I'm not the only one. Actually, it's probably easier to understand by looking at the code:

assocArrayOfArrays-example-PrettyPrinting.html - This is a syntax-highlighted representation of the PHP.
assocArrayOfArrays-example.php.txt - This is the actual PHP saved as a .txt file so that you can see and download it.

And here's the PHP in action:
assocArrayOfArrays-example.php

Leave a comment



Madcap fixes PushOK issue in Flare 6.1

July 20th, 2010

The title of this post pretty much says it all. We were using the PushOK plugin to allow us to check files in and out of our Subversion (SVN) version control system from within Madcap Flare. When we upgraded to 6.0 this broke and we duly reported it to Madcap. After a bit of to-ing and fro-ing of questions/answers with my colleague Graham, Madcap promised to try and fix the issue for the next release.

And, lo and behold, version control is now working again in release 6.1.

Thanks Madcap - much appreciated!

Leave a comment



Sky Broadband Support – Are they taking the mickey, or what?

June 22nd, 2010

Over the past few days my broadband connection from Sky Broadband ("up to 20 Mb/s" so they claim) has been getting steadily more of a bad joke. In the mornings it's workable (today I was generally getting around 2.5 Mb/s download). After lunch it becomes sluggish and tiresome to use (round about 0.75 Mb/s). But from about 5pm you may as well give up. 

As I write my download connection is 0.06 Mb/s. Yes, that's right, a measly 60 kilobits per second. That means a long, long wait between clicking a link on a Web page and eventually having the result page in a readable state in front of you.

At this speed iTunes and Tweetdeck simply don't work.

This, I'm assuming, is due to Sky's wonderful Traffic Management policy: the more useful you find the internet, the more we're going to try and discourage you from using it.

So I logged into my Sky account and went to try and raise a Support call. Here's the form they present you with, saying: "tell us about your query":
image
What?!!! In that space? Now they're really just rubbing salt in my wounds.

OK, so, after writing out my complaint elsewhere and then copying it into this field and submitting it, lo and behold, as I suspected (but didn't want to assume, in case I had to get all the way back there again if I was wrong) there's a follow-up screen where you can pick from options and then you can send Sky Support an email. But honestly! Usability: ever heard of it Sky? Did you ever roadtest this on anyone? Did you ever think how it feels to spend 10 minutes on a grindingly slow connection waiting for pages to slowly load, just to get to this page.

So I'm off to have a cold beer now, watch some football and cool down a bit.

And maybe by tomorrow this page will have uploaded to Web host. And maybe Sky will get back to me. But at the moment I'm not optimistic.

Potentially similar posts

Leave a comment



Don’t sweat the spelling – they can read it just fine!

June 22nd, 2010    3 Comments

Lots of people get all fretted up about grammar. The Grammar Nazis of this world continue to put the frighteners on the many who are impressed by rules known only by the few. But, since you're reading this, you're probably in the words business, in one way or another, so you may be like many of us who, after going through a phase of flirting with grammar fascism, have learned to relax and enjoy the magnificent beauty and power of the English language, with its huge expressive scope. And, with a little reading, you've probably figured out for yourself that if the greatest writers in the English language don't worry themselves with strict adherence to the rules laid down by the great grammar expert of the day, then there's no reason you should be so hampered. And if linguistics is your thing, Language Log is a great place to go if you're looking for a sane and inquisitive approach to grammar.

But spelling's different. Isn't it?

Surely we can never afford to lower our defences against misspelling? Spelling comes in two flavours: right and wrong. Right? And if you let spelling errors slip through then no one will be able to understand what you're on about. One spelling slip and your credibility crumbles ...  You get the picture.

Well, that's what I've always thought. So I was surprisingly interested in an email Patricia forwarded on to me today. "Surprisingly" because it was one of those pass-it-on emails that used to do the rounds but which, thankfully, you don't get so much any more. Usually they have a list of lame jokes or pictures and at the end they tell you to email it to your friends. Usually I save them straight to my Trash folder. But this one contained some simple editing-type tests (for example, spotting a single N in a block of Ms) and then ended with this:

I cdnuolt blveiee that I cluod aulaclty uesdnatnrd what I was rdanieg. The phaonmneal pweor of the hmuan mnid, aoccdrnig to a rscheearch at Cmabrigde Uinervtisy, it dseno't mtaetr in what oerdr the ltteres in a word are, the olny iproamtnt tihng is that the frsit and last ltteer be in the rghit pclae. The rset can be a taotl mses and you can still raed it whotuit a pboerlm. This is bcuseae the huamn mnid deos not raed ervey lteter by istlef, but the word as a wlohe. Azanmig huh? Yaeh and I awlyas tghuhot slpeling was ipmorantt! If you can raed this forwrad it 

It is amazing how easy it is to read this. And it did make me stop and ask myself: maybe I should lay off the obsessive marking up of every piddling little spelling mistake when I'm sent documents to review. As long as the first and last letter are correct, why worry?

Yeh, right!

I take a liberal, progressive approach to grammar. But I think I'll stick to my hard-line approach to spelling.

Leave a comment



^ back to top ^

Page 1 of 9712345102030OlderLast »