Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[sapphire-dev] New topic in forum Sapphire, called How to declare and set an integer field in Sapphire?, by Dmitri Pisarenko

Title: Eclipse Community Forums
Subject: How to declare and set an integer field in Sapphire? Author: Dmitri Pisarenko Date: Wed, 03 December 2014 16:46
Hello!

I have following model:

public interface IMyModel extends Element {
	ElementType TYPE = new ElementType(IMyModel.class);

	@Label(standard = "Integer field")
	@Required
	@NumericRange(min="2", max="100000")
	ValueProperty PROP_INTEGER_FIELD = new ValueProperty(TYPE, "IntegerField");
	Value<Integer> getIntegerField();
	void setIntegerField(Integer integerField);
}


When I run the following code, I get an UnsupportedOperationException.

final IMyModel object = IMyModel.TYPE.instantiate();

object.setIntegerField(10);


What is the right way to declare and set an integer field?

Thanks in advance

Dmitri Pisarenko
[ Reply ][ Quote ][ View Topic/Message ][ Unsubscribe from this forum ]

Back to the top