Thread: Not accessable

    #1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2012
    Posts
    3
    Rep Power
    0

    Not accessable


    I am creating a PageControl at runtime with a number of Tabsheets each containing a String Grid .... code below:

    ppc = new TPageControl(this);
    ppc->Parent = this;
    ppc->Align = alClient;
    ppc->TabPosition = tpTop;

    for(i=0;i<NumberTabs;i++)
    { TabArray[i] = new TTabSheet(this);
    TabArray[i]->PageControl = ppc;
    TabArray[i]->Name = AnsiString("TabArray") + IntToStr(i);
    TabArray[i]->Caption = sTitles[i];
    TabArray[i]->PageIndex = i;
    TabArray[i]->OnShow = TabOnShow;


    GridArray[i] = new TStringGrid(TabArray[i]);
    GridArray[i]->Parent = TabArray[i];
    GridArray[i]->Align = alClient;
    GridArray[i]->ColCount = 8;
    GridArray[i]->RowCount = 2;
    GridArray[i]->DefaultRowHeight = 18;
    GridArray[i]->FixedRows = 1;
    GridArray[i]->FixedCols = 1;
    GridArray[i]->Name = "sg" + IntToStr(i+1);
    GridArray[i]->Width = 990;
    GridArray[i]->DoMouseUp;
    }

    The GridArray[i]->DoMouseUp; function is as follows:

    //------------------------------------------------------------
    void __fastcall TfMainRecharges::DoMouseUp(TObject *Sender,
    TMouseButton Button, TShiftState Shift, int X, int Y)
    {

    // code to go here

    }
    //-----------------------------------------------------------

    However when I build the project I get an error:

    [C++Error]MainRecharges.cpp(113); E2247'_fastcall TControl::DoMouseUp(TWMMouse &,TMouseButton)' is not accessible.

    I cannot seem to find out why thid is so. How can I fix?
  2. #2
  3. Contributed User
    Devshed Specialist (4000 - 4499 posts)

    Join Date
    Jun 2005
    Posts
    4,364
    Rep Power
    1870
    Well, first fix your post so that all the code is surrounded by [code][/code] tags.

    This will allow us to read indented code which hasn't been mangled with a variable width font and random smilies.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2012
    Posts
    3
    Rep Power
    0
    Originally Posted by salem
    Well, first fix your post so that all the code is surrounded by [code][/code] tags.


    This will allow us to read indented code which hasn't been mangled with a variable width font and random smilies.
    Not sure what you mean but here goes:-

    I am creating a PageControl at runtime with a number of Tabsheets each containing a String Grid .... code below:

    Code:
    ppc = new TPageControl(this);
    ppc->Parent = this;
    ppc->Align = alClient;
    ppc->TabPosition = tpTop;
    
    for(i=0;i<NumberTabs;i++)
    { TabArray[i] = new TTabSheet(this);
    TabArray[i]->PageControl = ppc;
    TabArray[i]->Name = AnsiString("TabArray") + IntToStr(i);
    TabArray[i]->Caption = sTitles[i];
    TabArray[i]->PageIndex = i;
    TabArray[i]->OnShow = TabOnShow;
    
    
    GridArray[i] = new TStringGrid(TabArray[i]);
    GridArray[i]->Parent = TabArray[i];
    GridArray[i]->Align = alClient;
    GridArray[i]->ColCount = 8;
    GridArray[i]->RowCount = 2;
    GridArray[i]->DefaultRowHeight = 18;
    GridArray[i]->FixedRows = 1;
    GridArray[i]->FixedCols = 1;
    GridArray[i]->Name = "sg" + IntToStr(i+1);
    GridArray[i]->Width = 990;
    GridArray[i]->DoMouseUp;
    }
    The GridArray[i]->DoMouseUp; function is as follows:

    Code:
    //------------------------------------------------------------
    void __fastcall TfMainRecharges:oMouseUp(TObject *Sender,
    TMouseButton Button, TShiftState Shift, int X, int Y)
    {
    
    // code to go here
    
    }
    //-----------------------------------------------------------
    However when I build the project I get an error:

    [C++Error]MainRecharges.cpp(113); E2247'_fastcall TControl:oMouseUp(TWMMouse &,TMouseButton)' is not accessible.

    I cannot seem to find out why thid is so. How can I fix?
  6. #4
  7. Contributed User
    Devshed Specialist (4000 - 4499 posts)

    Join Date
    Jun 2005
    Posts
    4,364
    Rep Power
    1870
    > [C++Error]MainRecharges.cpp(113); E2247'_fastcall TControlMouseUp(TWMMouse &,TMouseButton)' is not accessible.
    The reason for using code tags is so we don't see crap like this in all your posts.


    Code:
    void __fastcall TfMainRecharges:oMouseUp(TObject *Sender,
    TMouseButton Button, TShiftState Shift, int X, int Y)
    I don't know, maybe it's because you can't spell.

    In your original post, you had TfMainRecharges:DoMouseUp which appeared as TfMainRecharges:DoMouseUp
    Now you have TfMainRecharges:oMouseUp which appears as TfMainRecharges:oMouseUp

    Somewhere along the line at your end, a 'D' went missing.

    Nobody can tell whether this is just sloppy typing in the original code, or finger trouble on copy and pasting.


    The other issue seems to be that your implementation has parameters TShiftState Shift, int X, int Y which the error message does not.

    Comments on this post

    • jakotheshadows agrees : I'm not entirely sure why, other than I saw it coming, but this most damn near made me piss myself from laughter.
    Attached Images
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2012
    Posts
    3
    Rep Power
    0
    Originally Posted by salem
    > [C++Error]MainRecharges.cpp(113); E2247'_fastcall TControlMouseUp(TWMMouse &,TMouseButton)' is not accessible.
    The reason for using code tags is so we don't see crap like this in all your posts.


    Code:
    void __fastcall TfMainRecharges:oMouseUp(TObject *Sender,
    TMouseButton Button, TShiftState Shift, int X, int Y)
    I don't know, maybe it's because you can't spell.

    In your original post, you had TfMainRecharges:DoMouseUp which appeared as TfMainRecharges:DoMouseUp
    Now you have TfMainRecharges:oMouseUp which appears as TfMainRecharges:oMouseUp

    Somewhere along the line at your end, a 'D' went missing.

    Nobody can tell whether this is just sloppy typing in the original code, or finger trouble on copy and pasting.


    The other issue seems to be that your implementation has parameters TShiftState Shift, int X, int Y which the error message does not.
    Not to worry another forum has fixed my problem, and did not have any problem in reading or understanding my post, and I did not have to stuff around with code tags etc. What a joke

IMN logo majestic logo threadwatch logo seochat tools logo