Results 1 to 3 of 3

Thread: [Answers] Procedure

Threaded View

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

    [Answers] Procedure

    use create them in a procedure library and issue:
    SET PROCEDURE TO yourlibraryname in the init or load event for the app.
    You can subclass any of the lianja UI framework classes.
    These classes can then be used in both custom sections and gadgets.



    Q:
    If I use the p_valid.prg as a standalone I must one as part of the script files in the app?
    It would be available for the whole app?
    How would it be to create it as a function inside the function library?
    And finally, sorry for the abuse, if it is part of the page or section where the event would be used to validate input when it loses focus?
    A:
    If it is a standalone prg, just click the + button at the bottom of the 'Files' in the Sidebar in the Apps Workspace and it will prompt you for the filename. The default file extension is '.prg'.
    Yes, it will be available for the whole App. When you Deploy, it will be deployed as a .dbo (pseudo-compiled) file.
    If you have lots of functions you want to use, you can put them in a function/procedure library (create this using the + button as before):


    Then use set procedure to <lib> additive in a delegate called before the function is required, for example in the app.load() or the app.ready() (or a delegate for the relevant Page or Section).



    Or, as in the screenshot above, you can add functions ('anotherfuncstill' here) in with the event delegates.
    The custom libraries for event delegates (created when you create your first delegate) are opened for you automatically; there is no need to use set procedure in this case.

    Pages and Sections can also have a 'Valid When' event delegate called after the field validation.



    ​All topics in [Answers] alphabetically:http://www.lianja.com/community/show...ll=1#post12352
    Last edited by josipradnik; 2017-01-05 at 02:59.

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