<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof">
Hi Andrea, <br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof">
Thanks for your reply.</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof ContentPasted1 ContentPasted2 ContentPasted3 ContentPasted4">
The doc should reflect this weird (I believe) behavior.<br>
<br>
Setting "usesStaticStrings=True" and "defaultValue="2023" and with parameterAsEnumString I have expected behavior but parameterAsEnum is broken...</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof ContentPasted1 ContentPasted2 ContentPasted3 ContentPasted4">
Not easy...<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof ContentPasted1 ContentPasted2 ContentPasted3 ContentPasted4">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof ContentPasted1 ContentPasted2 ContentPasted3 ContentPasted4">
I think I will fill an issue as the doc should should be more explicit or behavior fixed.</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof ContentPasted1 ContentPasted2 ContentPasted3 ContentPasted4">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof ContentPasted1 ContentPasted2 ContentPasted3 ContentPasted4">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof ContentPasted1">
<span style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);"><br>
</span></div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof">
<br>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>De :</b> QGIS-Developer <qgis-developer-bounces@lists.osgeo.org> de la part de Andrea Giudiceandrea via QGIS-Developer <qgis-developer@lists.osgeo.org><br>
<b>Envoyé :</b> vendredi 24 février 2023 17:50<br>
<b>À :</b> qgis-developer@lists.osgeo.org <qgis-developer@lists.osgeo.org><br>
<b>Objet :</b> Re: [QGIS-Developer] parameterAsEnumStrings always return default value</font>
<div> </div>
</div>
<div>Il 24/02/2023 17:37, Andrea Giudiceandrea ha scritto:<br>
<blockquote type="cite"><code>In addition, the parameter defaultValue should be set to a single value and not to a list if
</code><code><span class="x_n">allowMultiple is set to </span><span class="x_o"></span><span class="x_bp">False</span>.</code><br>
</blockquote>
<code>... and it should be populated with the index number (</code><code><code></code><code><span class="x_n">allowMultiple=</span><span class="x_o"></span><span class="x_bp">False)
</span></code>or a list of index numbers (</code><code><code></code><code><span class="x_n">allowMultiple=True</span><span class="x_bp">) when
</span></code></code><code></code><code><span class="x_n">usesStaticStrings</span> is set to False and
</code><code>with the value </code><code><code>(</code><code><code></code><code><span class="x_n">allowMultiple=False</span><span class="x_bp">)
</span></code></code>or a list of values </code><code><code>(</code><code><code></code><code><span class="x_n">allowMultiple=True</span><span class="x_bp">) when
</span></code></code></code><code><code><span class="x_n">usesStaticStrings</span> is set to True.<br>
<br>
Andrea<br>
</code></code></div>
</body>
</html>