Results 1 to 3 of 3

Thread: Conditional Compilation

  1. #1

    Conditional Compilation

    Does Lianja allow for conditional compilation with #DEFINE, #IFDEF and #IFNDEF?

    We've got some VFP code to display messages to users that will not work with Lianja. So, we're trying to alter our display function based on use of #IFNDEF #ELSE #ENDIF. We defined LIANJACODE as 1. This shows up in the console during as execution as 1 in response to ? LIANJACODE. When the display function code is called:

    #IFNDEF LIANJACODE
    if mssg = " "
    chose597.FrmChose597.LProcessMsg.Visible = .f.
    else
    chose597.frmchose597.LProcessMsg.visible = .T.
    chose597.frmchose597.LProcessMsg.caption = mssg
    endif
    #ELSE
    xlabel = lianja.getelementbyID("Main597_Pg.Genl_Parms.lproc essmsg")
    xlabel.caption = mssg
    xlabel.refresh
    #ENDIF

    we get the following error message which shouldn't be compiled or executed:
    Wed May 29 12:01:28 2013
    **** Lianja error ****
    chose597.FrmChose597.LProcessMsg.Visible = .f.
    ^
    Unrecognized command

    If conditional compilation is not possible, we'll code differently.

  2. #2
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    7,162
    Blog Entries
    22
    Lianja supports conditional compilation. How did you define LIANJACODE?

    There are several other ways to conditionally execute code:

    if varType( isLianja() ) = 'L'
    // Lianja specific code
    else
    // VFP specific code
    endif

    What type of messages are you wanting to display to the user exactly? There is a lot of built-in functionality that does that.

    Lianja.showMessage("Processing data please wait...", 200)
    ...
    Lianja.hideMessage()
    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

  3. #3
    Hi Barry,

    We defined LIANJACODE:
    #DEFINE LIANJACODE 1

    We knew how to work around Lianja if #DEFINE, #IFDEF, etc functionality did not exist in Lianja but just wanted to know Lianja also supported this functionality with #INCLUDE files.

    Fwiw, one of our applications displays messages to users via a Status textbox. This particular application is very simple from a UI perspective but does a lot of number crunching on a million+ mortgages that take quite a bit of time. The Status messages allow the users to work on other things while the application is processing.

    Regards,

    Jeff

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Journey into the Cloud
Join us