Why is C++ Builder 6 ignoring a TMemo on a form ? [Edit]

Hi

I'm using C++ builder 6 on Windows XP pro.
I have a form, MainForm (in MainFormUnit.h), and a TMemo in a TPageControl on it, with the TMemo called AxisInfo.
When in another unit, (with #include "MainFormUnit.h" at the top), I type
MainForm->AxisInfo
C++ builder tells me that AxisInfo is not a member of TMainForm.

In fact, when I type just
MainForm->A
the list of all controls on MainForm that begin with 'A' appear, but AxisInfo is not among them, so when I type the next character 'x', it shows that nothing it recogjnises starts with MainForm->Ax

I have several other controls that all work properly, but I can't seem to access AxisInfo at all, except from within MainForm.cpp.

When I look in the Object TreeView, it shows the following levels :
MainForm->PageControl1->WaveForms(WaveTabSheet)->AxisInfo

In the Class Explorer, it shows
TMainForm -> TMemo * AxisInfo

in TMainForm,h
class TMainForm : public TForm
{
__published:	// IDE-managed Components
// lots of other controls here....
	TMemo *AxisInfo;


so I would expect the IDE to recognise MainForm->AxisInfo

Has anyone else experienced anything similar, or have any idea what could have happened ?

Edited by: Nigel Stevens on Jun 11, 2009 6:25 AM
0
Nigel
6/11/2009 1:26:42 PM
embarcadero.cppbuilder.ide 2180 articles. 1 followers. Follow

5 Replies
1209 Views

Similar Articles

[PageSpeed] 21
Get it on Google Play
Get it on Apple App Store

<Nigel Stevens> wrote in message news:126458@forums.codegear.com...

> When in another unit, (with #include "MainFormUnit.h" at the top), I type
> MainForm->AxisInfo
> C++ builder tells me that AxisInfo is not a member of TMainForm.

What is the EXACT copy/pasted error message?

> in TMainForm,h
<snip>
> so I would expect the IDE to recognise MainForm->AxisInfo

Is your MainForm variable actually declared to be of type TMainForm, and not 
TForm perhaps?  Are you sure that there is no another class also named 
TMainForm in your project by accident?

-- 
Remy Lebeau (TeamB)
0
Remy
6/11/2009 4:36:08 PM
When I try to compile the program, the actual error message (copy/pasted) is :

[C++ Error] SLB1DE_Unit.cpp(1765): E2316 'AxisInfo' is not a member of 'TMainForm'

in MainUnit.cpp, I have :
TMainForm *MainForm;

and in MainUnit.h, I have
class TMainForm : public TForm

at the top of the form definition and

extern PACKAGE TMainForm *MainForm;

at the bottom.

This is the "Main form" as defined in Project Options (which is why I called it MainForm).

in WinMain, I have :
	Application->CreateForm(__classid(TMainForm), &MainForm);

I'm certain there is no other TMainForm in the program.

Another thing that's happening with this form is that I have several TButtons on a TPanel.
If I delete one of these buttons and run the program, BCB comes up with a "Debugger Exception Notification" saying :

"Project Replay.exe raised exception class EAccessViolation with message 'Access violation ad address 4010CF8B. Read of address 614421F4'. Process stopped. Use Step or Run to continue."
(This comes up just after Application->Run in WinMain)

(The program is called Replay, and I have been ignoring this for the moment by just leaving the buttons where they are, but I don't know if it's related in any way to the other problem).
0
Nigel
6/11/2009 5:02:33 PM
Fixed it !

In case anyone wonders what happened, I had originally created the program and saved the first form as their default filenames Unit1.cpp and Unit1.h

Some time later, I had saved it again, renaming Unit1 to MainUnit (.cpp and .h)

Unfortunately I had left
       #include "Unit1.h"
statements in 2 of my files, so that was what confused C++ builder !

Next time I do that, I'll delete Unit1.cpp and Unit1.h after saving them
0
Nigel
6/18/2009 12:53:40 PM
> {quote:title=Nigel Stevens wrote:}{quote}
> In case anyone wonders what happened, I had originally created the program and saved the first form as their default filenames Unit1.cpp and Unit1.h
> 
> Some time later, I had saved it again, renaming Unit1 to MainUnit (.cpp and .h)
> 
> Unfortunately I had left
>        #include "Unit1.h"
> statements in 2 of my files, so that was what confused C++ builder !
> 
> Next time I do that, I'll delete Unit1.cpp and Unit1.h after saving them

I'm not sure if you can do this in C++ Builder 6, but in recent ones (2006+, and chances are well before that, including 6) you can rename a unit by right-clicking on it in the Project Manager and selecting Rename.  It looks after renaming the files, the include, and the header guards (which have to be named in a specific way too.)

It does mess up source control unfortunately, since most SCs won't recognise it's the same file, renamed.

Cheers,

David
0
David
6/19/2009 4:33:15 AM
<Nigel Stevens>
> Fixed it !
>
> In case anyone wonders what happened, I had originally created the 
> program and saved the first form as their default filenames Unit1.cpp 
> and Unit1.h
>
> Some time later, I had saved it again, renaming Unit1 to MainUnit 
> (.cpp and .h)
>
> Unfortunately I had left
>       #include "Unit1.h"
> statements in 2 of my files, so that was what confused C++ builder !
>
> Next time I do that, I'll delete Unit1.cpp and Unit1.h after saving 
> them

I usually want to delete the old name files so I wonder if the IDE could 
ask if I want that done for me.  The name on the top tab seems to get 
the extention wrong after renaming and I think the tool tip caption 
extention is also wrong.

Fraser.
0
Fraser
6/22/2009 4:12:17 PM
Reply:

Similar Artilces:

Error while launching C++ Builder 6 IDE [Edit]
Hi, Good Afternoon, I have installed japanese version of C++ builder 6 software in my PC(English version of Windows XP). After complete installation(typical mode), i tried to launch the IDE through the following path. Start->All Programs-> Borland C++Builder 6-> C++ Builder6. While launching the IDE, i am getting the following error. I tried installation in other modes(Custom and Compact) also. I am facing the same problem. *モジュール’coreide60.bpl'のアドレス0053FE88でアドレス00000008に対する読み込み違反が起きました* Can anyone help me in resolving this error? Is there any pre-requisite for in...

problem of converting from C++ Builder 6 to C++ Builder 2007
Hi, A program which was developed by our partner was built fine with C++ Builder 6. Now I need to make some changes to it. We bought C++ Builder 2007 a few weeks ago. When I open the program with C++ Builder 2007, I was told that the project needs to be converted. I agreed. Then when I compile it, some errors happen: [BCC32 Error] ComCtrls.hpp(435): E2272 Identifier expected [BCC32 Error] ComCtrls.hpp(3880): E2272 Identifier expected [BCC32 Error] ComCtrls.hpp(4658): E2272 Identifier expected ...... Anybody has any idea how to fix it? Thanks, Allen In article <14040@f...

Convert to C++ Builder XE from C++ Builder 6 and 2007
Any information regarding the roadblocks of converting the code build in C++ Builder 6,2007 to C++ Builder XE? On 6/20/2012 8:20 AM, Girish Duddu wrote: > Any information regarding the roadblocks of converting the code build in C++ Builder 6,2007 to C++ Builder XE? The big change is the default string in XE is UnicodeString rather than AnsiString. All VCL String properites (Text, etc.) are Unicode in XE. There are good white papers regarding making this transition on the Embarcadero EDN site. I found that most of the changes I had to make fell into two categories: 1) Places...

C++ 11 on Builder 6 [Edit]
I am looking for to use some libraries (JSON and WebSoCkets) to run on C++ Builder 6, and most of them use C++ 11. Does someone know if is possible to make Builder 6 work for C++ 11? Edited by: Eliseu Martins Gomes on Mar 7, 2014 11:40 AM Eliseu wrote: > Does someone know if is possible to make Builder 6 work for C++ 11? No, it is not possible. C++Builder 6 was released a decade before C++11 was released. C++11 is only implemented in the Win64 compiler of C++Builder XE2 and later, to a lesser extent in the iOS compiler of C++Builder XE5, and a FEW select features of C...

sgcWebSockets for C++ Builder 6
The library documentation and the install readme says that the project, who was build for Delphi, works as well for C++ Builder. [http://www.esegece.com/manual/sgcWebSockets.pdf] a) All Delphi/C++Builder Versions: Add the directory {$DIR}\source to the library path How can I run delphi code in a C++ Builder Project? Is it possible? > {quote:title=Eliseu Martins Gomes wrote:}{quote} > The library documentation and the install readme says that the project, who was build for Delphi, works as well for C++ Builder. Most Delphi components are usable in C++Builder...

BUG (or issue) with Indy, C++ Builder 2010 and C++ Builder XE [Edit]
To reproduce this issue you need a clean installation (from scratch, no additional components installed, no Indy update) of C++ Builder 2010 or XE. It uses Indy 10.5.5 (with 2010) or 10.5.7 (with XE). Note: although it uses Indy to reproduce the issue, the version of Indy and Indy itself is not the one that causes this problem but the linking of C++ binary probably. Steps to reproduce: 1. Create a simple text file with the following content. Save it as "file.txt" or any other name. It can be also full email message but the text below is enough. {code} Subject: =?windows-125...

C++ Builder 6.0 compiler fatal error [Edit]
Good time of day or night to all! I'm sorry for raising this old stuff, but I have no time to get shifted to XE4 Builder. Please help me advanced programmers... All the time developing my program I used to compile it in such a way that IDE was not producing stand alone exe file, so it was using those dynamic RTLs and so on. Quite recently I wanted to make stand alone exe, but failed with the following error messages: [C++ Warning] utilcls.h(1149) W8027 Functions containing do are not expanded inline _ASSERTE(vt!= VT_UNKNOWN); [C++ Fatal Error] UFP.h(354) F1004 Internal compiler e...

C++ Builder 6 on Win8
My Borland C++ Builder 6 running on a VM upgraded to Win8 will not activate. I had a working WinXP VM with both C++ Builder 6 and RAD Studio 2007 installed and activated. Needing a test case machine for upgrade WinXP -> Win Vista -> Win7 -> Win8, I decided to use this. I made a copy of the VM and upgraded this. The Win8 install with all applications works fine, but that is not the story here. Today I went to use BCB6, which is installed under C:\Program Files\Borland. The permissions on this folder (including all sub-folders and files) had already been overridden to "...

C++ Builder 6 professional IDE Package beta testing and developing.
I have 24 years experience programming in Borland C++. I have very little Delphi or pascal knowledge. If this is not posted properly right forum ...please excuse me I have not reached out for help much since the days of CompuServe and Tapcis. Ok ... Im using C++ Builder 6 professional for an application that uses a Turbo-Power Async Pro api toolkit written in delphi 5.0. It comes with the delphi source files and package files so you can make changes. The toolkit has about 30 files that make up the ent ire package. I'm adding/working on one of those pascal unit files in the tool kit. ...

Using C++ Builder XE7, several IDE issues, comments [Edit]
Not sure if I should put one comment per message or not....I've got some issues! 1. I am running Windows 7 32 bit, so I only have 3GB of memory available. I often get a memory error when I go to compile. I close Google Chrome (a memory hog), and I now have 50% of my 3gb available (had 20% available with Chrome running). Try compiling again, memory error. Once I get a memory error, I must exit XE7 and restart, then it will work properly. This takes 3 minutes or so. 2. If I double click on a word (it's now highlighted), then do a search, why is "Search Selection" check...

C++Builder 6 issue with anchors and form size when changing themes...
Hi, Yes, I know, I am still back at version 6. Sizeable forms have one problem for me. If they are designed under one theme (title bar height, border width), and then program is run on a different theme (win 7 vs windows classic). Does anyone have a method to fix this? I thought that setting the clientwidth/clientheight to the values in the IDE during form construction would work, and it does although this does not work properly for items that are anchored to the bottom or right. I am thinking perhaps you would have to set the clientwidth/clientheight properly and then step thr...

Using C++ Builder XE7, several IDE issues, comments [Edit] #2
Not sure if I should put one comment per message or not....I've got some issues! 1. I am running Windows 7 32 bit, so I only have 3GB of memory available. I often get a memory error when I go to compile. I close Google Chrome (a memory hog), and I now have 50% of my 3gb available (had 20% available with Chrome running). Try compiling again, memory error. Once I get a memory error, I must exit XE7 and restart, then it will work properly. This takes 3 minutes or so. 2. If I double click on a word (it's now highlighted), then do a search, why is "Search Selection" check...

Memory limit vcl forms application c++ builder xe 32 bit [Edit]
Hi, I use C++ Builder XE and the code below (with new project "VCL Forms Application - C++ Builder" 32 bit) has memory limits. I'd like to know if someone has a C++ Builder succeeding XE that can compile 64 bit and create an executable of type PE32+ (not PE) and test this code to see if the limit increase. Thanks, Best Regards. Davide #include <vector> //--------------------------------------------------------------------------- class ObjectSize { public: char ca[100]; }; //-----------------------------------------------------------------------...

IPWorks V8 C++ Builder Edition [Edit]
Registers positive on antivirus scans. I'm unable to use the product with antivirus products installed on my system. What is the info on this please? https://www.virustotal.com/en/file/32b32136d2dd42855cc07da7de518fddd9e7f83338fb1ed959287ee16a405ab8/analysis/1364888779/ Edited by: John Lance on Apr 2, 2013 1:27 PM I called IPWorks. No virus, just antivirus products test this suite positive due to the nature of the code (heuristics). ...

Web resources about - Why is C++ Builder 6 ignoring a TMemo on a form ? [Edit] - embarcadero.cppbuilder.ide

Ignoring the Keep Out Sign.
Let's find out what's so dangerous!

Tony Abbott ignoring, walking or hiding away from questions - YouTube
In this collage are instances of Tony Abbott ducking from questions that cover: - His stance on coal seam gas exploration on farming land (0.07) ...

The app that stops teenagers ignoring their parents
A mother who became frustrated by her teenager's failure to answer her calls has created an app that disables youngsters' phones if they refuse ...

Screaming Jets bassist slams Angels for ignoring sick Doc Neeson
Paul Woseen, bass guitarist and songwriter with The Screaming Jets, has criticised Angels band members for not speaking with ailing frontman ...

Sir David Attenborough accused of 'ignoring gay animals' in BBC documentaries
... Dr Brett Mills, head of media studies at the University of East Anglia, said that while he doubted Sir David was deliberately ignoring the issues, ...

Kim Kardashian 'ignoring pregnancy health risks, doctor's warnings'
PREGNANT Kim Kardashian is reportedly taking striking health risks in blatant disregard of doctor's warnings.

SMEs ignoring disaster and cyber threats, with over half having no risk strategies in place
Over half (53%) of Australia’s small to medium businesses have no risk plan in place for fire, flood, cyclones or man-made disasters that could ...

Cyclists ignoring speed limits on busy pedestrian thoroughfare
Cyclists are travelling at an average of almost twice the signposted speed limit during peak hour on one of Sydney's busiest pedestrian thoroughfares. ...

Ignoring the inbox - a new morning mantra
Ignoring the inbox - a new morning mantra

Biosecurity Queensland accused of ignoring environmental risk in directing growers to use chemical known ...
There is concern about the chemical banana growers have been told to use to stop the spread of Panama TR4 disease.

Resources last updated: 1/21/2016 11:46:48 AM