Wednesday, April 4, 2007

Tip of the Day #2: Is Running Application Compiled or Not?

Supported Versions:

. R:BASE 7.6 for Windows (Build: 7.6.1.30404 or higher)
. R:BASE C/S:I 7.6 for Windows (Build: 7.6.1.30404 or higher)
. R:BASE Turbo V-8 for Windows (Build: 8.0.15.30404 or higher)

When you design and then deploy totally automated R:BASE 7.6
or Turbo V-8 applications, there might be an option for a few
users, including yourself, to get back to the R:BASE Database
Explorer or R> prompt. That's all good if your application
was started using the full version of R:BASE for Windows.

What happens when you have distributed your cool application
using R:Compiler?

You may wish to keep all menu options, and make the optional
"Database Explorer, R> Prompt" invisible if the application
is using the compiled version of R:BASE. This feature can be
achieved without creating separate menus for development and
distribution.

Using the latest updates of R:BASE 7.6, R:BASE 7.6 (C/S:I)
and R:BASE Turbo V-8, you may use the "ISCOMPILED" property
of the application to take advantage of the latest versions
of R:BASE.

Here's how:

01. Assign a <ComponentID> to a button or menu item of a
    tree or drop-down menu, such as 'DatabaseExplorer'.

02. Use the following code as "On After Start" Custom EEP.

    -- Start
    CLEAR VARIABLE vCompiled
    SET VARIABLE vCompiled TEXT = NULL
    GETPROPERTY APPLICATION ISCOMPILED vCompiled
    IF vCompiled = 'YES' THEN
       PROPERTY DatabaseExplorer VISIBLE 'FALSE'
    ENDIF
    CLEAR VARIABLE vCompiled
    RETURN
    -- End

    New GETPROPERTY APPLICATION ISCOMPILED varname will
    return the value of YES or NO.

Imagine the possibilities!

Very Best R:egards,

Razzak.

Reply via email to