Page MenuHomeFeedback Tracker

menuSetURL is not working
Closed, ResolvedPublic

Description

  • menuSetURL does not apply an URL to a menu strip entry
  • Sometimes menuSetURL prevents entry from being created (Reproducibility: Sometimes)

Details

Severity
Minor
Resolution
Open
Reproducibility
Always
Operating System
Windows 10 x64
Category
Scripting
Steps To Reproduce
  1. Create a new scenario in Eden Editor
  2. Execute
disableSerialization; 
private _ctrlMenuStrip = findDisplay 313 displayCtrl 120; 
//Create  Folder
private _indexMain = _ctrlMenuStrip menuAdd [[],"URL Test"];
//Create a sub entry in folder
private _indexURL = _ctrlMenuStrip menuAdd [[_indexMain],"URL"];

The entry is created just fine

  1. Now execute
disableSerialization; 
private _ctrlMenuStrip = findDisplay 313 displayCtrl 120; 
//Create  Folder
private _indexMain = _ctrlMenuStrip menuAdd [[],"URL Test"];
//Create a sub entry in folder
private _indexURL = _ctrlMenuStrip menuAdd [[_indexMain],"URL"];
//Set the weblink property
_ctrlMenuStrip menuSetURL [[_indexMain,_indexURL],"https://arma3.com/"];

No entry is created (Reproducibility: Sometimes) and if it's created, no URL is set

Additional Information

Arma 3 Version: 2.01.146950

Seems to be the same issue with menuSetText:

works fine

disableSerialization; 
private _ctrlMenuStrip = findDisplay 313 displayCtrl 120; 
//Create  Folder
private _indexMain = _ctrlMenuStrip menuAdd [[],"URL Test"];
//Create a sub entry in folder
private _indexURL = _ctrlMenuStrip menuAdd [[_indexMain],"URL"];

No entry is created

disableSerialization; 
private _ctrlMenuStrip = findDisplay 313 displayCtrl 120; 
//Create  Folder
private _indexMain = _ctrlMenuStrip menuAdd [[],"URL Test"];
//Create a sub entry in folder
private _indexURL = _ctrlMenuStrip menuAdd [[_indexMain],"URL"];
//Set the weblink property
_ctrlMenuStrip menuSetText [[_indexMain,_indexURL],"https://arma3.com/"];

Event Timeline

R3vo created this task.Nov 20 2020, 10:07 AM
R3vo edited Additional Information. (Show Details)Nov 20 2020, 10:13 AM

The repro is "dirty". The code contains foreign chars that stop script from compiling, hence no item appearing in the menu. Otherwise the URL is added fine it is just not executed because the item is not marked as weblink. So I'm going to fix that

fixed in 146979

BIS_fnc_KK removed BIS_fnc_KK as the assignee of this task.Nov 24 2020, 6:05 PM
BIS_fnc_KK added a subscriber: BIS_fnc_KK.
R3vo added a comment.Dec 3 2020, 3:05 PM
disableSerialization;
private _ctrlMenuStrip = findDisplay 313 displayCtrl 120;

private _indexMain = _ctrlMenuStrip menuAdd [[],"URL Test"];
private _indexURL = _ctrlMenuStrip menuAdd [[_indexMain],"URL"];
_ctrlMenuStrip menuSetText [[_indexMain,_indexURL],"https://arma3.com/"];
_ctrlMenuStrip menuSetURL [[_indexMain,_indexURL],"https://arma3.com/"];

Works.

LouMontana changed the task status from New to Feedback.Dec 3 2020, 3:15 PM
LouMontana closed this task as Resolved.Feb 24 2021, 2:14 PM
R3vo reopened this task as Feedback.EditedJun 20 2021, 4:50 PM

The following link doesn't work https://github.com/R3voA3/3den-Enhanced/wiki/Custom-GUIs#vehicle-inventory-manager-vim. Tested with example above.

R3vo closed this task as Resolved.Jun 21 2021, 12:53 AM
R3vo claimed this task.

URI needs to be defined in CfgCommands.