Page MenuHomeFeedback Tracker

menuSetURL is not working
Feedback, NormalPublic

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.Fri, Nov 20, 10:07 AM
R3vo edited Additional Information. (Show Details)Fri, Nov 20, 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.Tue, Nov 24, 6:05 PM
BIS_fnc_KK added a subscriber: BIS_fnc_KK.
R3vo added a comment.Thu, Dec 3, 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.Thu, Dec 3, 3:15 PM