CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 13 of 13

Threaded View

  1. #1
    Join Date
    Dec 2007
    Location
    Lithuania
    Posts
    98

    class created object name.

    Good day.

    I dont know if it is possible. But maybe there is a solution to such kind of situation.

    Lets say. I have class which creates a button. and I create it.

    Code:
    TButton button1 = new TButton();
    TButton button2 = new TButton();
    and i have a method which sets name

    Code:
    button1->setName("button1");
    button2->setName("button1");
    Is it some kind of solution to make it like this

    Code:
    button1->setName();
    And it should set button1 name as button1.
    In other words. How to get the same name as instance ? OC setName() is a method, but what kind of code there should be I cant figure out

    Thankyou in advice.
    Last edited by ulumulu; June 29th, 2009 at 06:10 AM.
    Share and always try to give back more.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured