Bug in Borland C++ Builder 5 Object Inspector
Bug in Borland C++ Builder 5 Object Inspector
Version 5.0 Build 12.34
I encountered a bug in BCB5 while transferring my components from BCB4.
Problem: Trying to change an unsigned int propertys value in the object
inspector failed, error message: value must be between 0 and -1
(or something like that, I use the german version).
I made a simple component (TTest) to demonstrate this bug. It just
contains
one private Member, FValue, and one published property, Value. The
propertys
read and write options are set to FValue ( means no getter or setter
functions).
Thats all, trying to change the propertys value using object inspector
will
lead to an error, no matter wich value you entered. Entering 0 also
causes the
same error message (value must be between 0 and -1).
When can I expect a bugfix ?
greetings,
Hans Martin Brueckmann
Here is the Code:
//---------------------------------------------------------------------------
// The Header File
#ifndef TestH
#define TestH
//---------------------------------------------------------------------------
#include <SysUtils.hpp>
#include <Controls.hpp>
#include <Classes.hpp>
#include <Forms.hpp>
//---------------------------------------------------------------------------
class PACKAGE TTest : public TComponent
{
private:
unsigned int FValue;
protected:
public:
__fastcall TTest(TComponent* Owner);
__published:
__property unsigned int Value = { read = FValue, write = FValue };
//---------------------------------------------------------------------------
#endif
//---------------------------------------------------------------------------
// The CPP
#include <vcl.h>
#pragma hdrstop
#include "Test.h"
#pragma package(smart_init)
//---------------------------------------------------------------------------
// ValidCtrCheck wird benutzt, um sicherzustellen, da? die erzeugten
Komponenten
// keine rein virtuellen Funktionen besitzen.
//
static inline void ValidCtrCheck(TTest *)
{
new TTest(NULL);
//---------------------------------------------------------------------------
__fastcall TTest::TTest(TComponent* Owner)
: TComponent(Owner)
{
//---------------------------------------------------------------------------
namespace Test
{
void __fastcall PACKAGE Register()
{
TComponentClass classes[1] = {__classid(TTest)};
RegisterComponents("Beispiele", classes, 0);
}
//---------------------------------------------------------------------------