Hi Eric,
I Loaded my driver on the UEFI of one of the vendors we are working with,
clicked restore to defaults.
The value for the field below, the one that has "default value =
get(MyIfrNVData.DefaultForThisField),", did not change.
Even when I changed it to different values, clicking restore to defaults left
the current value as it is..
I will test on different UEFI browsers later and see if they behave differently
on this field.
Thanks,
Ben S.
From: Dong, Eric [mailto:[email protected]]
Sent: Monday, December 09, 2013 7:26 AM
To: [email protected]
Subject: Re: [edk2] Default value in HII field
Hi Ben,
I think the below format is correct, how you do your test and what's the result?
numeric varid = MyIfrNVData.GetDefaultValueFromAccess,
questionid = 0x1239,
prompt = STRING_TOKEN(STR_DEFAULT_VALUE_FROM_ACCESS_PROMPT),
help = STRING_TOKEN(STR_DEFAULT_VALUE_FROM_ACCESS_HELP),
flags = DISPLAY_UINT_HEX | INTERACTIVE,
minimum = 0,
maximum = 255,
default value = get(MyIfrNVData.DefaultForThisField),
endnumeric;
Thanks,
Eric
From: Ben Schroeder [mailto:[email protected]]
Sent: Monday, December 09, 2013 3:10 AM
To: [email protected]<mailto:[email protected]>
Subject: [edk2] Default value in HII field
Hi all,
I am trying to set a default value for an HII field in my form.
I would like it to be somewhat dynamic and not a constant static value.
My only limitation is that I cannot use the ConfigAccessCallback routine to
trigger when the user selects to return to defaults.
An example of a field and what I am trying to do:
numeric varid = MyIfrNVData.GetDefaultValueFromAccess,
questionid = 0x1239,
prompt = STRING_TOKEN(STR_DEFAULT_VALUE_FROM_ACCESS_PROMPT),
help = STRING_TOKEN(STR_DEFAULT_VALUE_FROM_ACCESS_HELP),
flags = DISPLAY_UINT_HEX | INTERACTIVE,
minimum = 0,
maximum = 255,
default value = get(MyIfrNVData.DefaultForThisField),
endnumeric;
Doing the above does not work (however compiles fine), I assume because the
'get' function pushes the value on stack, and does not initialize the default
value like I intended.
I have also tried something like:
default value = read get(MyIfrNVData.DefaultForThisField)
In order to read the expression from the stack and into the value field,
however this does not compile..
I am not sure how else to go about this, I checked in the vfr forms in the edk2
and have not seen and solutions.
I would like to link the default value to a different field in my NVData
structure, so I can initialize that default to a certain value when the driver
loads, and have that value set when the user presses return to defaults.
Is there a solution to this problem?
Thanks,
Ben S.
------------------------------------------------------------------------------
Sponsored by Intel(R) XDK
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel