Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 21

Thread: Importing VFP form with a problem

  1. #11
    Member
    Join Date
    Apr 2019
    Location
    UK
    Posts
    44
    ** I just found it **
    setAttribute
    It's knowing where to look !
    Thankyou



    Thanks Yvonne,
    I will get going I'm sure, sometimes a little nudge goes a very long way
    I've been through the object model and I can return all the items and values fine, and am fine with unique names etc all good there ...
    with the imported VFP form code I can see how that changes label captions at run time and I'm 100% ok with VFP
    However, when it comes to the page builder, which is where I want to be, I can't find any reference to change to the value of an item at run time say in the commandbutton click procedure
    Am I missing something that's really obvious ?


    Like in VFP is just thisform.label1.caption='XYZ' etc
    Last edited by CharlieDenver; 2019-04-11 at 11:44. Reason: Found reference

  2. #12
    Lianja Team yvonne.milne's Avatar
    Join Date
    Feb 2012
    Location
    Berkshire, UK
    Posts
    1,842
    Lianja.get("mypage.mysection.mylabel").caption = 'XYZ'

    or, providing you have a unique name in the Canvas Section,

    Lianja.get("mylabel").caption = 'XYZ'

    Regards,

    Yvonne

  3. #13
    Member
    Join Date
    Apr 2019
    Location
    UK
    Posts
    44
    I get it now, perfect, thanks, Giant steps

  4. #14
    Member
    Join Date
    Apr 2019
    Location
    UK
    Posts
    44
    Hi
    Where can I find the example apps please -> Lianja Custom Canvas Demo (lianjcustomcanvas) (Desktop, Lianja/VFP)

    Also , I'm wondering how to set the initial value at run time of a label as the below INIT event isn't doing it

    proc page1_section2_XYZButton_click()
    Lianja.get("MyLabel").caption = 'XYZ'
    endproc

    proc page1_section2_ABCButtton_click()
    // Lianja.get("Mylabel").setAttribute("caption","ABC" )
    Lianja.get("MyLabel").caption = 'ABC'
    endproc

    proc page1_section2_MyLabel_init()
    //Lianja.get("MyLabel").setAttribute("caption","***" )
    Lianja.get("MyLabel").caption = '***'
    endproc
    Last edited by CharlieDenver; 2019-04-12 at 06:07.

  5. #15
    Lianja Team yvonne.milne's Avatar
    Join Date
    Feb 2012
    Location
    Berkshire, UK
    Posts
    1,842
    Included in the App Builder. 'Lianja Custom Canvas Demo' is the App title in the Home workspace, under 'Demo Desktop Apps'. Or open it from the Apps workspace - the App name is 'lianjcustomcanvas' under 'Demo Desktop Apps'.

    Regards,

    Yvonne

  6. #16
    Member
    Join Date
    Apr 2019
    Location
    UK
    Posts
    44
    Thanks Yvonne
    I don't have Demo Desktop Apps in the home workspace for some reason, I've found it though - thanks

    I was wondering how to set the initial value at run time of a label as the below INIT event isn't doing it
    can you point me to any info about the sequence of how the apps load


    proc page1_section2_XYZButton_click()
    Lianja.get("MyLabel").caption = 'XYZ'
    endproc

    proc page1_section2_ABCButtton_click()
    // Lianja.get("Mylabel").setAttribute("caption","ABC" )
    Lianja.get("MyLabel").caption = 'ABC'
    endproc

    proc page1_section2_MyLabel_init()
    //Lianja.get("MyLabel").setAttribute("caption","***" )
    Lianja.get("MyLabel").caption = '***'
    endproc

  7. #17
    Lianja Team yvonne.milne's Avatar
    Join Date
    Feb 2012
    Location
    Berkshire, UK
    Posts
    1,842
    If you open the (default) Project, you will see all the demo Apps.

    Event Sequences

    Is there a reason why you are setting the captions programmatically rather than setting the attribute in the Page Builder?

    Regards,

    Yvonne

  8. #18
    Member
    Join Date
    Apr 2019
    Location
    UK
    Posts
    44
    Yes, I was hoping I could control what the captions say when the page loads either based on public variables, or variables I pass the page, using the INIT() events
    I'm so used to working in VFP I'm on a steep curve to get to grips with what I can and can't do (I'm fairly sure I can do this ?)
    I've constructed many Generic forms that serve many purposes, so I'm just trying to understand If I can migrate that methodolgy to Lianja

    I'm happy to look at the demo apps of course, but specifically I'm in evaluation and I need to get to some basic things quite quickly so I can make a call

    The INIT of the label does allow for code to be added ?

    I'll have a look trough the event sequences and see if that helps my understanding
    I can only appologise if this is a pain but I can't justify the premium training costs right now


    Phillip

    *PS I could import the forms and run them as scripts, but I'm really keen to use the page builder so I can incorporate other Lianja features
    Plus I'm not 100% sure how my grids will convert as I have a lot of dynamic change code, I've made big steps but time is of the essence


    It may be my linear - procedural mind state , I'm happy to get other views
    Last edited by CharlieDenver; 2019-04-12 at 12:12.

  9. #19
    Lianja MVP
    Join Date
    Dec 2012
    Location
    Croatia, Zagreb
    Posts
    1,135
    Hi,

    Ready event is the best for doing this.

    More info: http://www.lianja.com/community/show...vents-sequence

    and forum answers collection by topics: http://www.lianja.com/community/show...ll=1#post12352

  10. #20
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    7,165
    Blog Entries
    22
    There are always a variety of ways to do the same thing in Lianja.

    Development in Lianja is mostly declarative. The appearance and behavior of the UI is affected by attributes that you specify in the app inspector. You then respond to events by specifying delegates.

    Many textual attributes can contain {macros} that are substituted when the UI element e.g a section is refreshed. These macros can contain variable names, expressions or parameterized function calls.
    https://www.lianja.com/doc/index.php...tanding_Macros

    You can therefore have captions that are dynamic.

    Data binding inherits business rules and metadata such as captions, input masks, validation, data mapping, tool tips, autosuggestions, choice lists, etc from those defined in the table.

    Metatypes can be associated with UI elements and are applied globally across all UI elements in your app which have them specified.

    I do realize that as a VFP coder much of this is not familiar to you so you are trying to do what you have always had to do in VFP but that would be a mistake and will not work if you are going to build web or mobile apps also or write delegates in javascript rather than VFP.

    It is worthwhile browsing the “Development Essentials”, “Scripting Essentials”, “Data Essentials”, and “UI Essentials” here in the forums to get more familiar with the Lianja Platform overall. It will save you time in the long term. Older forum posts may add to confusion as Lianja has often been enhanced with new features and functionality since they were posted.

    As you can see on the forums, we are preparing “Online Training” which is a short video series for all of the training courses embedded here in the forums. These will be free and will be made available gradually once Lianja 5 has been released.

    Lianja 5 is a significant leap in performance and productivity which is why it has taken a while to complete and QA. With reference to reusable components it supports the visual design of UI components in the canvas designer and the ability to use these components as custom sections and gadgets, grid cell renderers, dialog panel renderers etc. importantly these work across desktop, web and mobile apps.

    I hope that helps.
    Last edited by barrymavin; 2019-04-12 at 20:15.
    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

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