ctrlText – Talk

From Bohemia Interactive Community
Jump to navigation Jump to search
(more thoughts about problem with "ctrlText IDC")
mNo edit summary
Line 29: Line 29:
:: Have to test it more in detail.
:: Have to test it more in detail.
:: --[[User:HeliJunkie|HeliJunkie]] 20:18, 17 June 2010 (CEST)
:: --[[User:HeliJunkie|HeliJunkie]] 20:18, 17 June 2010 (CEST)
All examples i build and you send me work now... but not my initial dialog where i got this error :-(((.
And I can't find the problem.
So... question is obsolete... will delete this little discussion in a few days.
--[[User:HeliJunkie|HeliJunkie]] 11:16, 19 June 2010 (CEST)

Revision as of 10:16, 19 June 2010

First form of syntax

String = ctrlText idc 

doesn't work for me. Can anyone confirm? --HeliJunkie 21:49, 16 June 2010 (CEST)

BI uses it in many scripts. For example in the newdedicatedserverinterface.sqf:

_editPassControl = _display displayCtrl 1113;
_password = ctrlText _editPassControl;

Best check their scripts to learn more. Seems like it wants a control and no idc.

Edit: Warfare has one with IDC (GUI_UpdateDiplomacyMenuEvent.sqf):

_text = CtrlText IDCGENERICTEXT;

If it actually works is a different topic. Anyway just go by the control.

--Kju 22:12, 16 June 2010 (CEST)

ctrlText works with either an IDC number or a control.
Here is a simple demo.
--Kronzky 23:58, 16 June 2010 (CEST)
Your simple demo works fine.
I thought it won't work because my control is in a control group. Modified your sample... but it works too.
Maybe because my control is defined in config.cpp and as addon and not in description.ext in mission (different namespaces) ?
Have to test it more in detail.
--HeliJunkie 20:18, 17 June 2010 (CEST)

All examples i build and you send me work now... but not my initial dialog where i got this error :-(((. And I can't find the problem. So... question is obsolete... will delete this little discussion in a few days.

--HeliJunkie 11:16, 19 June 2010 (CEST)