SNumericEntryBox error: use of undefined type in

Hi
I’m having trouble declaring an SNumericEntryBox in Slate. Declaring other types of widgets seems to work (SButton, STextBlock etc)

Problem occured I believe when switching from Slate to SlateBasics.h

Please help! What am I missing here???
Using 4.7.6 (latest hotfix)

This is for a plugin extending the editor.

.....
vertBox->AddSlot()
		.AutoHeight()
		[
			SNew(SHorizontalBox)
			+ SHorizontalBox::Slot()
			.VAlign(VAlign_Center)
			[
				SNew(STextBlock).Text(LOCTEXT("Category", "Name"))
			]
			+ SHorizontalBox::Slot()
				.VAlign(VAlign_Center)
					[
						
						SNew(SNumericEntryBox<int32>)
						.Value(this, &MyClassName::GetVariable)
						.OnValueChanged(this, &MyClassName::SetVariable)
						.AllowSpin(false)
						.LabelPadding(0)
						.MinValue(1)
						.MaxValue(100)
						]
					
		];

etc.

SNumericEntryBox isn’t included by SlateBasics.h so you’ll need to include its header ( SNumericEntryBox.h ) yourself.

Thanks for putting up with such a simple problem!

That did the trick :slight_smile:

Thanks for asking a simple question. It turns out the numeric entry box api page has “Runtime/Slate/Public/SlateFwd.h” as the .h to use – which wouldn’t allow me to compile.

It looks like the documentation generator is picking up the forward declaration rather than the real type when listing the header to include. I’ve passed that on to the docs team to investigate.