Skip to main content

Hello,

We are trying to migrate additional menu from 9.7 to Uniface 10 with no success. It seems we need to add 2 lines in our asn. At this step we have exported/imported our additional menu but there is no simple way to integrate them in Uniface 10.

In the documentation we didn't found a good step by step procedure with all explanations.

We understood we had to add 2 more lines in our asn :

[LOGICALS]

IDE_DEFINE_USERMENUS=OUR_MENU1

and in the section

[RESOURCES]

menuplugin.uar

But how ca we reuse our additional menu ??? Where can we find and we build the "Menu plug-ins" component ? This is not clear for us

Please we need help 🙂

Hello,

We are trying to migrate additional menu from 9.7 to Uniface 10 with no success. It seems we need to add 2 lines in our asn. At this step we have exported/imported our additional menu but there is no simple way to integrate them in Uniface 10.

In the documentation we didn't found a good step by step procedure with all explanations.

We understood we had to add 2 more lines in our asn :

[LOGICALS]

IDE_DEFINE_USERMENUS=OUR_MENU1

and in the section

[RESOURCES]

menuplugin.uar

But how ca we reuse our additional menu ??? Where can we find and we build the "Menu plug-ins" component ? This is not clear for us

Please we need help 🙂

Hello,


Uniface don't use the "Editors → Library → Menus" any longer for the additional menu.

You have to create a new component (Service, Form) and add the following operations to it. (see Menu definition)

For global functionality use the Utility Menu

For component related functionality use the action menu.


Define your menuitem and call your component. Each operation which is called this way need two params (see last code block)

After compile add the component name to the logical.

You can use also the resource output or deploy it as .uar

Restart your IDE.

[LOGICALS]

IDE_DEFINE_USERMENUS=YOURCOMPONENTNAME,SECONDCOMPONENT


Furthermore reading "Customizing the Uniface IDE".

IDE Menu Plug-Ins or IDE Worksheet Plug-Ins


Hope this will help you.


Menu definition

; === ================================================================================
; === 
; === ================================================================================
public operation getVersion 
params
  string lp_api_version        : OUT
endparams
  lp_api_version = 1
end

; === ================================================================================
; === Uniface 10.3 Default Menu "Utility Menu"                           
; === ================================================================================
public operation getGlobalMenuOptions
params
  struct lp_menu               : OUT
endparams
  ;lp_menu->$name = "menu"
  ;call en_add_option(lp_menu, "", "", "", 1)
end

; === ================================================================================
; === Uniface 10.3 Default Menu "Action"                                 
; === ================================================================================
public operation getEditorMenuOptions
params
  string lp_object_url         : IN 
  struct lp_menu               : OUT
endparams
variables
  string  lv_type, lv_name
endvariables

  lp_menu->$name = "menu"
  $result = $split(lp_object_url, 1, ":", lv_type, lv_name)

  ; === Depending on type different actions
  selectcase lv_type
;    case "aps"        ; === Application Shell
;    case "cpt"        ; === Component
;    case "dtd"        ; === DTD
;    case "ent"        ; === Entity
;    case "prj"        ; === Project
;    case "sig"        ; === Signature
;    case "libsnp"     ; === Library "Snippets"
;    case "libinc"     ; === Library "Include Proc"
;    case "libprc"     ; === Library "Global Proc"
;    case "libvar"     ; === Library "Global Variables"
;    case "libmsg"     ; === Library "Messages"
;    case "libgly"     ; === Library "Glyphs"
;    case "libpnl"     ; === Library "Panels"
;    case "libdnd"     ; === Library "Formats"
;    case "libmen"     ; === Library "Menus"
;    case "libdvc"     ; === Library "Device Tables"
;    case "libktt"     ; === Library "Keyboard Tables"
    elsecase
  endselectcase

end

; === ================================================================================
; === Create Menu Item
; === ================================================================================
entry en_add_option
params
  struct  lp_menu              : INOUT
  string  lp_label             : IN
  string  lp_componentname     : IN
  string  lp_callback          : IN
  numeric lp_enabled           : IN
endparams
variables
  struct lv_item
endvariables

  lv_item             = $newstruct
  lv_item->$name      = "option"
  lv_item->label      = lp_label
  lv_item->component  = lp_componentname
  lv_item->operation  = lp_callback
  lv_item->enabled    = lp_enabled
  lv_item->$parent    = lp_menu

end

Operation definition which are called from the menu item.

operation youroperation
params
  string  pRedirectionUrl    : OUT
  numeric pRefresh           : OUT
endparams

Hello,

We are trying to migrate additional menu from 9.7 to Uniface 10 with no success. It seems we need to add 2 lines in our asn. At this step we have exported/imported our additional menu but there is no simple way to integrate them in Uniface 10.

In the documentation we didn't found a good step by step procedure with all explanations.

We understood we had to add 2 more lines in our asn :

[LOGICALS]

IDE_DEFINE_USERMENUS=OUR_MENU1

and in the section

[RESOURCES]

menuplugin.uar

But how ca we reuse our additional menu ??? Where can we find and we build the "Menu plug-ins" component ? This is not clear for us

Please we need help 🙂

Hi Pascal,

Take a look at:

which describes and demonstrates the functionality. The Menu API starts at around 40:13

Regards,

Jason.






Hi Pascal,

Take a look at:

which describes and demonstrates the functionality. The Menu API starts at around 40:13

Regards,

Jason.





Thanks Jason, but we already have seen this video for few days and it didn't help us to migrate our additional menu from 9.7 to 10.3

We need a full example of additional menu creation and we have some questions :

→ Why do we need to create a form or un service to create a menu ?

→ Adding the operations in script generate a compilation error because Uniface need an entity to be painted on component (1 entity must be painted at least on component)

→ In which case must be choose a service or un form form for adding additional menu in IDE

→ What kind of form property must we choose for addditional menu (Normal ? Non Modal , Modal ? it seems it is nowhere explained in UNIFACE documentation  or video.


Have a nice day 🙂


Hello,

We are trying to migrate additional menu from 9.7 to Uniface 10 with no success. It seems we need to add 2 lines in our asn. At this step we have exported/imported our additional menu but there is no simple way to integrate them in Uniface 10.

In the documentation we didn't found a good step by step procedure with all explanations.

We understood we had to add 2 more lines in our asn :

[LOGICALS]

IDE_DEFINE_USERMENUS=OUR_MENU1

and in the section

[RESOURCES]

menuplugin.uar

But how ca we reuse our additional menu ??? Where can we find and we build the "Menu plug-ins" component ? This is not clear for us

Please we need help 🙂

Hello Pascal,


we used a non modeled Form, with modality set to false and drop component from memory.


→ I don't know why we need to use a component. Just an idea is to allow Uniface calling operations.

→ Yes, Uniface always needs an entity inside the component, just use a dummy non-database.

→ I haven't seen a case when to use a form or service. 


Redirects per [FILE] is no longer possible.

Your compile form and signature must be in the $RESOURCE_OUTPUT or deployed as .uar 

Inside your [RESOURCES] you need to refer the full path to $RESOURCE_OUTPUT.



[RESOURCES]
//fileserver/project/resources
OR
//filserver/project/path/to/ide-custom.uar

Hello,

We are trying to migrate additional menu from 9.7 to Uniface 10 with no success. It seems we need to add 2 lines in our asn. At this step we have exported/imported our additional menu but there is no simple way to integrate them in Uniface 10.

In the documentation we didn't found a good step by step procedure with all explanations.

We understood we had to add 2 more lines in our asn :

[LOGICALS]

IDE_DEFINE_USERMENUS=OUR_MENU1

and in the section

[RESOURCES]

menuplugin.uar

But how ca we reuse our additional menu ??? Where can we find and we build the "Menu plug-ins" component ? This is not clear for us

Please we need help 🙂

Hello Tobias,

Thanks for your feedback that will surely help us we will try it today  !



Hello,

We are trying to migrate additional menu from 9.7 to Uniface 10 with no success. It seems we need to add 2 lines in our asn. At this step we have exported/imported our additional menu but there is no simple way to integrate them in Uniface 10.

In the documentation we didn't found a good step by step procedure with all explanations.

We understood we had to add 2 more lines in our asn :

[LOGICALS]

IDE_DEFINE_USERMENUS=OUR_MENU1

and in the section

[RESOURCES]

menuplugin.uar

But how ca we reuse our additional menu ??? Where can we find and we build the "Menu plug-ins" component ? This is not clear for us

Please we need help 🙂

Hi Pascal,


Try the exercise link:

        Menu Exercise

This should fully clarify things.


Regards,


Jason.



Hi Pascal,


Try the exercise link:

        Menu Exercise

This should fully clarify things.


Regards,


Jason.


Hello Jason,

Thanks for the example it will help us, we are going to try it !

Bye


Hello,

We are trying to migrate additional menu from 9.7 to Uniface 10 with no success. It seems we need to add 2 lines in our asn. At this step we have exported/imported our additional menu but there is no simple way to integrate them in Uniface 10.

In the documentation we didn't found a good step by step procedure with all explanations.

We understood we had to add 2 more lines in our asn :

[LOGICALS]

IDE_DEFINE_USERMENUS=OUR_MENU1

and in the section

[RESOURCES]

menuplugin.uar

But how ca we reuse our additional menu ??? Where can we find and we build the "Menu plug-ins" component ? This is not clear for us

Please we need help 🙂

Thank Tobias it worked we managed to add our own menu and activate our form.

Bye