27 December 2010

Escape the American date format in DateTimeAxis Flex charts using the <mx:DateTimeAxis> are hardcoded with the American date format. As only 6% of the world's population is using this date format, I've seen more than one request for something like this: As the <mx:DateTimeAxis> has the label formats hardcoded, one solution is to extend it. The class <mx:DateTimeAxis> contains various functions for every type of time units, e.g formatYears(), formatMonths(), formatDays(), formatMinutes(), formatSeconds() and formatMilliseconds(). The <chart:FormattedDateTimeAxis> class above overrides the date functions, and allows custom formats with the properties formatStringYears, formatStringMonths and formatStringDays. The benefit with this approach is that we utilise all the logic within <mx:DateTimeAxis>, but only overriding the formatting part.

Labels: , ,

13 March 2010

X-Plane - First flight

This is a very basic, complete non-technical, how-to guide for your first flight in X-Plane.
I am a newbie myself, and long struggled finding a basic guide for landing, and especially stopping, the plane. The following guide assumes standard key setup (v9.45).
Take-off
I assume you've already managed this, but anyway: Press [B] to turn off the breaks. Engage thrust by pressing [F2] repeatedly. Control the plane with your controller, or your mouse (click on the white cross in the middle of the screen, and keep your mouse pointer within the square that appeared.)
You can apply flaps for better lift by pressing [2], once. When you are air borne, press [G] to bring your wheels up, and [1] to retract your flaps all the way up, to flying position.
Landing
Not as straight forward, but even more crucial if you first managed to take-off. :) Even positioning yourself correctly before the landing strip is not all that easy in the beginning. Take the short cut: 'Location' - 'Select Global Airport' - 'Innsbruck Kranebitten' and click on [3 nm] to be position air born 3 nautical miles ahead of the air strip. (Either RWY 08 og RWY 22, which means the runway heading at the direction of 80° and 220°, respectively. Thus, the same runway, but from opposing directions.) Then:
  1. Get control over your plane
  2. Flaps - Press [2] until maximum flaps (max lift, and max drag)
  3. Gear down - Press [Ctrl-D] to bring down your wheels
  4. Get control over your plane again
  5. Slow down - Press [F1] to slow down ("as slow as you can"*, just don't stall)
  6. Aim for the beginning of the runway
  7. Nose up
  8. Touch down
  9. Speed flaps - Press [4] to maximum air breaks (if available)
  10. Breaks - Press [V] for max wheel breaks
  11. Reverse thrust - First, press Period [.], then engage thrust by [F2] to break using your engine (if available)
[The order of breaking might not be optimal, so please tell me what is better.]
Piece of cake, isn't it?
This way, you should be able to stop the plane before you jump the river, the infinity and beyond.
Not all breaking tools are available on all planes (see below).
* See "How slow" further down...
Difficulties aiming for the air strip?
Semi transparent panels might help (on some air crafts). Press semi colon [;]
Tilt you head down by pressing [S] (back by [W]).
View the plane from behind [A].
Although not that easy to land, the fighter FA-22 Raptor gives you nice visual, green "3D" guide lines in the air, of the path that you were supposed to have followed. ;-) Makes it easier to practice finding the airport, and the direction of the air strip.
Before take-off: Look at the flaps
Press [A] to view the plane from behind. Use Arrow keys, Minus [-] and Equal [=] to get a good view of the wings, and try the flaps.
'Normal flaps' - [1] and [2]; Look closely, the flaps take a while to extend fully
And if your selected plane has got them:
'Speed flaps' - [3] and [4] for extra speed breaks
The Cessna doesn't have speed flaps, while the fighter FA-22 Raptor, and heavy metal Boings do.
Also, press [W] to familiarise yourself with the inside of the cockpit. Toggle flaps quickly pressing 1-2-1-2-... and 3-4-3-4-... to see if any levers move. Use Up or Down arrow to look around the cockpit.
Count the number of notches from none to fully extended flaps for the air craft you've chosen.
Before take-off: Backing out; or speed breaking
You can use the reverse thrust stop the plane after landing, or to "taxi" out from the gate (or download the Pushback plugin). I took me awhile to figure out the reverse thrust. First of all, not all planes have that possibility. Secondly, I got the key-sequence wrong.
Press [W] to view the cockpit (possibly Down arrow) to view the thrust controller. Add some thrust [F1 and F2] to see the lever move. Bring the thrust all the way down. If your now press Period [.] and apply thrust, the lever should move downward if your plane has reverse thrust. (the Cessna doesn't, while the King Air B200 has).
Landing: How slow?
[Maybe we should delete this? Or move it to somewhere else???]
So how slow should I go? With maximum flaps, you can go quite slow. The Cessna has got colour markers in the Air speed instrument to indicate speed ranges:
White - flaps and gear down
Yellow - flaps and gear up.
[I should have some pictures or good references here]

Labels:

03 February 2010

Adobe Output Server: Message Msg210 not in .ini file

Problem

Ever got:

2010/02/02 14:19:46 d:\Adobe\Central\Common\Bin\jfserver.exe: [314]Agent exit message: [210]** Message Msg210 not in .ini file **

in Adobe Central Output Server (formerly known as JetForm)?

And the error message makes no sense or gives any clue to what's wrong, what so ever...

Background

It is jfmerge.exe that is throwing this error message, and jfserver.exe is just relaying it in the jfserver.log file.

Normally the Msg210 is present in jfmerge.ini, and if not, you need to get hold of a new uncorrupted version.

The problem is that jfmerge.exe is not reading the correct jfmerge.ini, or any file at all.

Possible solution 1 - quote your paths

Check your log file (turn verbosity on) for 'Launching...':

Do you see:

-aiiC:\Program Files\Adobe\Central\Server\jfmerge.ini

which must be:

-aii"C:\Program Files\Adobe\Central\Server\jfmerge.ini"

Otherwise, jfmerge is trying to open the ini file "C:\Program".

And while you're at it, quote the other paths including spaces, or swap them to relative paths (from 'data'): '..\jfmerge.ini'.

Possible solution 2 - Set inifile path -aii

Check and verify the -aii as above. If the launching line does not have any -aii at all, we must add it to the Task's Program options. Either explicitly, or as -aii""@IniFileName."", which gets the ini file name from jfserver.ini - [JFMERGE] - IniFileName.
Remember double double quotes if you edit jfserver.jmd directly.

Possible solution 3 - The quotes don't match

Check the 'Launching...' in the log file (as above).
Example: ^job JOBNAME -zprinter -agvVAR="value -aduON
Since the first double quote didn't have a matching quote, the rest of the options (@OtherTokens) got muddled up, and -aii got lost inside the variable VAR: "value -aduON -aii".

Possible solution 4 - The 1st line is too long

I have also encountered this if the whole file contains no line breaks at all, leaving the whole file as one long line.
This even breaks Central, stopping the instance, leaving the whole queue down.
I have no good solutions for this, apart from not sending files where the first line is longer than 256 characters.

Labels: , , , ,

18 August 2009

Myst IV does not start on Mac OS X (Permission denied)

If you are a bit slow trying out new games, or is rediscovering the Myst series, you might get this problem when installing on a Mac.
Problem:
You've installed Myst IV Revelation on your Mac but nothing happens when you click the application.
Symptoms:
If you start 'Console' and check your last messages, you'll see something similar to:
..... posix_spawnp("/Applications/Ubisoft/MystIV/myst4.app/myst4", ...): Permission denied
Solution:
The problem is that the executable application does not have the 'execution' permission set within the app.
Open 'Terminal' and go to the directory where you installed Myst IV.
$ cd /Applications/Ubisoft/MystIV/ (in my case)
Here you'll see that the Mac app is really a directory you can enter:
$ ls -l
total 8
drwxr-xr-x 4 xxxx admin 136 Aug 18 16:42 _uninst
-rw-r--r-- 1 xxxx admin 550 Aug 18 16:15 log.txt
drwxr-xr-x 9 xxxx admin 306 Aug 18 17:26 myst4.app
drwxr-xr-x 5 xxxx admin 170 Aug 18 17:29 save
drwxr-xr-x 4 xxxx admin 136 Aug 18 16:15 support
Go down into the directory myst4.app:
$ cd myst4.app
$ ls -l
total 21744
drwxr-xr-x 6 xxxx admin 204 Aug 18 16:15 Contents
-rw-r--r-- 1 xxxx admin 289 Aug 18 16:15 ares_config.xml
drwxr-xr-x 14 xxxx admin 476 Aug 18 16:42 data
-rw-r--r-- 1 xxxx admin 238 Aug 18 17:26 detect_config.dsc
-rw-r--r-- 1 xxxx admin 257636 Aug 18 16:15 libBinkMachO.dylib
-rw-r--r-- 1 xxxx admin 10866160 Aug 18 16:15 myst4
The real application is 'myst4' which does not have the executable bit set.
Fix this with:
$ chmod +x myst4
$ ls -l myst4
-rwxr-xr-x 1 xxxx admin 10866160 Aug 18 16:15 myst4
Now, start your Myst IV :)

Labels: , ,

18 May 2009

Adobe LCDS tomcat running with 100% CPU

We  have just experienced a problem with Adobe Live Cycle Data Services ES 2.6 using 100% of the CPU.
Restart of the tomcat service did no good, unless I also restarted the Flash client. Then it was running without problems for a while, before it once again rocketed up to a 100% CPU load.
After some debugging we found the cause to be non-unique data rows to the SQLAssembler. 
A database change led to a view was missing a join, which in turn caused the view to return a numerous duplicate rows.  LCDS did not handle this very well, but was luckily easy to fix, once the bug was identified.

Labels: , , ,

26 December 2008

Step 4 - Create a Flex application

Now we're getting into the interesting bits. 
First we create our first Adobe LiveCycle Data Services Flex application.
Make sure you Validate the configuration. The directories should be all the same (at least in this examlpe.
Now, add the datamodel var inventory:ArrayCollection and the view mx:DataGrid. For DataGrids with given column names, I often include a mx:Label to indicat whether I actally received any data, or if just my DataGrid isn't displaying waht I received.
Then we include the <mx:DataService id="ds" destination="sql-product"/>
And finally, we're filling it in the onCreationComplete()
and don't forget to trigger the event in creationComplete="onCreationComplete() the <mx:Application>.
The final code should look like this: 
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="vertical"
creationComplete="onCreationComplete()">
<mx:Script>
<![CDATA[
  import mx.collections.ArrayCollection;
  [Bindable]
  protected var inventory:ArrayCollection = new ArrayCollection();

  protected function onCreationComplete():void {
      ds.fill(inventory, "all");
  }
]]>
</mx:Script>
<mx:DataService id="ds"
destination="sql-product"
/>
<mx:DataGrid id="grid1"
dataProvider="{inventory}"
editable="true"
/>
<mx:Label text="Items: {inventory.length}" />

</mx:Application>
And your application should look like this:
Update the data
Now start the Admin application (http://localhost:8400/lcds-samples/sqlassembler/index_inv.html) in another window, and update som of the info. Watch you new application!
Troubleshooting
If you receive the error:
An error executing SQL caused the operation to fail. If debug level logging is enabled for the SQL Assembler, details are logged on the server.
Make sure you start the Sample Database BEFORE you start Tomcat. Check the log windows for LCDS if you find :
******************************************************************************
*                                                                            *
*  Unable to connect to the samples database.                                *
*  You must start the samples database before you can run the samples.       *
*  To start the samples database:                                            *
*    1. Open a command prompt and go to the {install-dir}/sampledb dir       *
*    2. Run startdb.bat (Windows) or startdb.sh (Unix-based systems)         *
*                                                                            *
******************************************************************************
Turn on debugging in HSQLDB (previous post) to find out if LCDS actually finds the DB at all. 
(In my case I got 'Access denied' because I had changed the sa password.... :)
[Main article] [Next] [Previous

Labels: , , ,

17 December 2008

Step 3 - Get to know the existing sample HSQLDB database

Once you have started your Livecycle Data Services (LCDS) and HSQLDB database agent (more here), you can explore the two Flex applications contected to the product sample database. Open the following in two different browser windows, do some changes in the Admin page, and see the changes imidiately in the shop.
The database, HSQLDB, is a built-in, mature open source database engine.
Our sample
...uses only one table, 'PRODUCT'. This table and all other data, table definitions, user rigts etc of the database, are simply defined in a text file:
C:\Adobe_lcds\sampledb\flexdemodb\flexdemodb.script.
This file contains the product data well as date for the Employee and Cencus applications. Therefore there will be more data than what you rcognise, right away. Don't worry about it. Just consentrate about the lines containing 'PRODUCT'.
Altering the database
You can add your own tables, rows, users just by editing the text file, and restert the database agent.
Add 'CREATE TABLE' statements for your own tables, and 'INSERT INTO's for your data. Just follow the concept as the existing tables use.
In flexdemo.script you can also change the SA password, but don't do that unless you also changes the password in your LCDS!
Database setup
The HSQLDB that comes with LCDS is set up with two databases: FlexDemoDB and SalesBuilderDB. This is configured in: C:\Adobe_lcds\sampledb\server.properties.
Change to server.silent=false and server.trace=true if you need more debugging info.