Jump to Real's How-to Main page

Get the package name

integer i
ContextKeyword lcx_key
String ls_name[]

this.GetContextService("Keyword", lcx_key)
lcx_key.GetContextKeywords("com.sybase.jaguar.component.name", ls_name)

IF UpperBound(ls_name) = 1 THEN
    // extract the package name without the component name
    i = POS(ls_name[1], "/")
    zis_packageName = MID(ls_name[1], 1, i - 1)
ELSE
    zis_packageName = "?"
END IF

zis_componentName = ls_name[1]

If you find this article useful, consider making a small donation
to show your supportfor this Web site and its content.

Written and compiled by Réal Gagnon ©1998-2005
[ home ]