Board index » cppbuilder » Bug in Borland C++ Builder 5 Object Inspector

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 };

Quote
};

//---------------------------------------------------------------------------

#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);

Quote
}

//---------------------------------------------------------------------------

__fastcall TTest::TTest(TComponent* Owner)
        : TComponent(Owner)
{

Quote
}

//---------------------------------------------------------------------------

namespace Test
{
        void __fastcall PACKAGE Register()
        {
                 TComponentClass classes[1] = {__classid(TTest)};
                 RegisterComponents("Beispiele", classes, 0);
        }

Quote
}

//---------------------------------------------------------------------------
 

Re:Bug in Borland C++ Builder 5 Object Inspector


"Hans Martin Brckmann" <H...@brueckmann-gmbh.de> wrote in message
news:392D1CEB.D411EFA0@brueckmann-gmbh.de...
Quote
> 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
This is becoming a quite common bug, I believe in Win9x. The only
work-around we have found is to use an unsigned __int64, instead of
unsigned int.

Quote
> When can I expect a bugfix ?

I would say that the sooner you report this bug, the sooner it will be
fixed. Please go to borland.com, and the support center's bug
reporter, if you haven't already. The first Delphi 5 patch has been
out for a while, so I expect the BCB 5 patch to follow soon.

--
Anthony Yeh

Re:Bug in Borland C++ Builder 5 Object Inspector


Hans Martin Brckmann <H...@brueckmann-gmbh.de> wrote in message
news:392D1CEB.D411EFA0@brueckmann-gmbh.de...

Quote
> I encountered a bug in BCB5 while transferring my components from BCB4.
> Problem: Trying to change an unsigned int propertys value in the object

There was an earlier problem related to component properties that boiled
down to the default data alignment.  I don't know if it's related but go to
Project, Options, Advanced C++ and check that the default Data Alignment is
Quad Word...

Hope that helps - please let us know either way,

Thanks

Nigel

Re:Bug in Borland C++ Builder 5 Object Inspector


Ok,

thats it. But its realy Borlands thing to fix it.

I think we will stop going over to BCB 5 and we will wait for the bugfix.

thanks
Hans Martin Brckmann

PS.: It happens also with NT 4.0

Anthony Yeh schrieb:

Quote
> "Hans Martin Brckmann" <H...@brueckmann-gmbh.de> wrote in message
> news:392D1CEB.D411EFA0@brueckmann-gmbh.de...
> > 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

> This is becoming a quite common bug, I believe in Win9x. The only
> work-around we have found is to use an unsigned __int64, instead of
> unsigned int.

> > When can I expect a bugfix ?

> I would say that the sooner you report this bug, the sooner it will be
> fixed. Please go to borland.com, and the support center's bug
> reporter, if you haven't already. The first Delphi 5 patch has been
> out for a while, so I expect the BCB 5 patch to follow soon.

> --
> Anthony Yeh

Other Threads