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:ben...@mellanox.com]
Sent: Monday, December 09, 2013 3:10 AM
To: edk2-devel@lists.sourceforge.net
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
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel