Results 1 to 3 of 3

Thread: Lianja import project error

  1. #1
    Junior Member
    Join Date
    Aug 2017
    Posts
    2

    Lianja import project error

    Hi everybody,
    I have a problem with the import of my program, this is a program in VPF and I need import this to lianja, but, every time when I tried this, the message following error appears

    **** Lianja error ****
    cReturn = iif(vartype(oProtected.--)=="C", oProtected.--, m.cDefault)
    ^
    Variable was expected
    Called from procedure - getaccessmodifier at line 446
    Called from procedure - convertproperties at line 428
    Called from program - vfp_import_xcx.dbo at line 236
    Called from program - vfp_import_vcx.dbo at line 5
    Called from program - vfp_import_pjx.dbo at line 32

    Does anyone have an Idea how can I solve this?

  2. #2
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    5,771
    Looking at your code the following is clearly a syntax error.

    oProtected.--


    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
    Lianja MVP
    Join Date
    Dec 2012
    Location
    Croatia, Zagreb
    Posts
    1,099
    Hi dianagarcia,

    Reading the error stack, the problem is probably a name of some property in your VCX

    **** Lianja error ****
    cReturn = iif(vartype(oProtected.--)=="C", oProtected.--, m.cDefault)
    ^
    Variable was expected
    Called from procedure - getaccessmodifier at line 446
    Called from procedure - convertproperties at line 428
    Called from program - vfp_import_xcx.dbo at line 236
    Called from program - vfp_import_vcx.dbo at line 5
    Called from program - vfp_import_pjx.dbo at line 32
    Line 5 of vfp_import_vcx.prg:
    do (justpath(sys(16))+"vfp_import_xcx.prg") with cFile, cOutputFile, "vcx"
    Line 236 of called vfp_import_xcx.prg:
    fprintf(m.fp, "%s", strindent(convertProperties(), 1))
    Line 428
    if !m.cPropName=="Name"
    cAccess = getAccessModifier(m.cPropName)
    endif

    Line 446:
    function getAccessModifier(cName, cDefault)
    local cReturn
    cDefault = Evl(cDefault,"")
    if vartype(m.cDefault)=="L"
    cDefault = "Public"
    endif
    cReturn = iif(vartype(oProtected.&cName)=="C", oProtected.&cName, m.cDefault)

    if !empty(cReturn)
    cReturn = m.cReturn + " "
    endif
    return m.cReturn
    Here is your error line. Not quite descriptive, but Lianja is open to explore what is going on. All code for importing is in C:\Lianja\library folder (you can even write your own importers).

    So, Lianja has a problem getting cName in your case. Even to show it, i.e. see -- instead of name you gave it.

    What to do?
    Check all names in your VCX
    or try manually to test the code (piece by piece) in a new Lianja project, to find out what name is the problem.

    If all your names work ok in VFP, I can only guess that codepage could be problem here.
    VFP is using codepage concept (older), Lianja preferes Unicode UTF-8 (newer) because of web/mobile compatibility.
    I wonder what codepage you are using...

    Josip

    P.S.
    I would personally avoid importing VFP projects, because this way you stay trapped in 20+ years old Visual Foxpro paradigm when you hope to reach new one.
    Our VFP applications are more menu oriented or monolithic - not suitable for web/mobile.
    Converting 20 years old code on a button click to be running in today mobile/web environment sounds as a free lunch.
    Instead of compromises, better to start from scratch in Lianja way and copy/paste chunks of your proven VFP code into Lianja delegates.
    Here you can find more info about migration: http://www.lianja.com/community/show...-VFP-migration
    Last edited by josipradnik; 2017-08-30 at 04:16.

Tags for this Thread

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