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.

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?
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.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s