BeginVertical won't compile when no style is provided

Hi,

i'm trying to create a very simple GUI with Unity, here is my javascript code:

function OnGUI() {
  GUILayout.BeginVertical(GUIContent("test"));
  GUILayout.EndVertical();
}

when the script is 'compiled' it gives me the following error:

Assets/NewBehaviourScript.js(2,40): BCE0023: No appropriate version of 'UnityEngine.GUILayout.BeginVertical' for the argument list '(UnityEngine.GUIContent)' was found.

when i add a style to the BeginVertical constructor, like this:

function OnGUI() {
  GUILayout.BeginVertical(GUIContent("test"), "box");
  GUILayout.EndVertical();
}

the error goes away...

in the script reference guide, it is said that the style is an optional argument

why do i have to explictly provide the style argument for it to work?

i'm using Unity 3.1.0f3 (54715) if that can help

Thanks a lot

NB: i'm building a unity GUI generation framework so it's not just me not wanting to provide the "style" argument. The thing is: the framework isn't supposed to generate this argument when the user didn't supply a style attribute for a BeginVertical element

According to the script reference, it's not optional:

http://unity3d.com/support/documentation/ScriptReference/GUILayout.BeginVertical.html

static function BeginVertical (params options : GUILayoutOption[]) : void
static function BeginVertical (style : GUIStyle, params options : GUILayoutOption[]) : void
static function BeginVertical (text : string, style : GUIStyle, params options : GUILayoutOption[]) : void
static function BeginVertical (image : Texture, style : GUIStyle, params options : GUILayoutOption[]) : void
static function BeginVertical (content : GUIContent, style : GUIStyle, params options : GUILayoutOption[]) : void

The one in question being the last one, which takes a GUIContent, a style, and a variable number of GUILayoutOptions

Thanks a lot for your help Mike, but it didn't really answer my question. As explained in my previous comment, the script reference guide says about the 'style' argument:

The style to use for background image and padding values. If left out, the background is transparent

and when i use the text/style/options constructor, like this:

function OnGUI() {
  GUILayout.BeginVertical("test");
  GUILayout.EndVertical();
}

it works! i don't have to provide the style argument for it to work!

why is there such a discrepancy between the two constructors?