Home page Home page Home page Home page
Pixel Header R1 C1 Pixel
Pixel Header R2 C1 Pixel
Pixel Header R3 C1 Pixel
By Captain C | Thursday, 22 October 2009 11:51 | 0 Comments
Here's another update for those of you using our Basic+ Source code publisher. This time I had a bit of a major rewrite to the HTML generator to handle the crazy 4K chunk HTML parsing in the Revelation Forum Domino server.

Originally I had wanted to keep the generated HTML for this blog and the forum pretty much the same, but alas that wasn't to be, so I had to drop back to "pre" tags again for the forum, and keep the "div" tags for here.

Thanks to Jared at Revelation for his help in tracking down the weirdness.

You can download version 1.7.0 from here in standard RDK format or here as an NSIS installer version.

Labels: , , ,

By Sprezz | Thursday, 8 October 2009 17:53 | 4 Comments
Well we've been running with Windows 7 on a couple of our laptops for a few weeks now and we like it! The ability to launch a program by typing just a few letters of its name is brilliant... the only downer was not being able to run AREV at all anymore - oh yes, and the fact that as of the time of writing OpenInsight 9.1 completely hangs - I mean COMPLETELY hangs Windows 7 64 bit.

Note I said "was" because today we installed Virtual PC for Windows 7 along with XP Mode and huzzah - we have an environment where we can actually work with AREV and OI! You can read all about it here.

The only thing to point out is that once you enabled virtualization in your BIOS you have to do a cold reboot - turn the machine completely off. Easily overlooked and potentially frustrating.

[Edit] - The hanging issue is fixed for OI 9.1.1

Labels: , ,

By Captain C | 14:00 | 0 Comments
A common requirement when dealing with EditTables is to prevent a user from deleting a row on a case by case basis at runtime. In many applications we've seen this implemented by trapping the standard DELETEROW event and then sending an INSERT message with the deleted row contents, but this looks messy and unprofessional because the data disappears and reappears again.

A better way to do this is to trap the low-level ETM_DELETEROW notification sent by the EditTable prior to the actual DELETEROW event occuring. However, this notification has to be handled in a synchronous fashion (via a WINMSG event), and we also have to tell OpenInsight to return a special value from its own low-level internal message handler so that the EditTable stops the deletion (This last requirement is why the event has to be handled synchronously, because we need to return a value at the point in time that the message is sent).

We do this in two stages: First we tell OpenInsight to trap the WINMSG event for the EditTable and listen specifically for the ETM_DELETEROW message. This is normally done in a form's CREATE event like so:

0001     $insert logical
0003     equ WM_USER$       to 1024
0004     equ ETM_INSERTROW$ to (WM_USER$ + 2004)
0005     equ ETM_DELETEROW$ to (WM_USER$ + 2005)
0007     eventOp    = TRUE$ ; * // Turn tracking on
0008     eventOp<4> = TRUE$ ; * // Track Synchronously
0010     call send_Message( @window : ".TABLE_1", |
0011                        "QUALIFY_EVENT",      |
0012                        ETM_DELETEROW$,       |
0013                        eventOp )

Next we have to add a WINMSG event handler to the EditTable to catch the ETM_DELETEROW message:

0001     $insert logical
0003     equ WM_USER$       to 1024
0004     equ ETM_INSERTROW$ to (WM_USER$ + 2004)
0005     equ ETM_DELETEROW$ to (WM_USER$ + 2005)
0007     begin case
0008        case ( message = ETM_DELETEROW$ )
0009           * // Stop the delete here...
0010           call set_WinMsgVal( TRUE$, 0 )  ; * // Force PS to return 0 
0011                                           ; * // to Windows
0013     end case


Notice the use of the Set_WinMsgVal function. This function only works from within a synchronous WINMSG event and it allows us to set the actual low-level value that OpenInsight returns internally from handling the ETM_DELETEROW message. Returning 0 here tells the EditTable not to allow the row deletion.

Preventing Row Insertion

We can also prevent users from inserting rows in a similar fashion, by trapping the ETM_INSERTROW message instead (which we've defined in the examples above). However, implementing this is an exercise left for the reader.

Labels: , ,

By Captain C | Monday, 5 October 2009 09:00 | 0 Comments
Still on the topic of undocumented EditTable features here's the details of the MOVE_ROW message that you can use to move a row within an EditTable. The nice thing about this message is that it takes all the colour, style and formatting information when the row is moved, which makes it easier to use than deleting and inserting the row "manually" yourself.

MOVE_ROW message

DescriptionMoves a row in a control
Applies ToEdit Table
Syntaxx = Send_Message( controlID, "MOVE_ROW", fromIndex, toIndex )
fromIndex  Position of the row to move
toIndex  Position to move the row to. Specify -1 to move the row to the end of the Edit Table.
ReturnsNew position of the row


0001     * // EditTable MOVE_ROW message example to move the
0002     * // row at position 2 to position 4
0004     edtID   = @window : ".TABLE_1"
0005     fromRow = 2
0006     toRow   = 4
0008     call send_Message( edtID, "MOVE_ROW", fromRow, toRow )

Labels: , ,

Pixel Footer R1 C1 Pixel