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

    Join Date
    Feb 2000
    Location
    Canton, OH, USA
    Posts
    37
    Rep Power
    15
    I have useful methods for handling pages defined in class A. I want to use these methods in my website class, class B. Can I do this and, if so, how? So far, my attempts have failed.
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 1999
    Location
    UK
    Posts
    50
    Rep Power
    16
    I had the same problem a little while ago.

    Try:
    require("classA");
    class classB {

    var $new_class;

    // constructor
    function classB {
    $this->new_class = new classA;
    .. CODE ..
    }

    Hope this is what you are looking for.

    Falcon

Similar Threads

  1. Codepupil
    By Adachic in forum C Programming
    Replies: 3
    Last Post: February 6th, 2004, 07:50 PM
  2. Dynamically include methods in a class - How
    By spybreak in forum PHP Development
    Replies: 7
    Last Post: December 10th, 2003, 10:04 PM
  3. Learning Mouse Event Handling.
    By coredumped in forum Java Help
    Replies: 5
    Last Post: December 4th, 2003, 09:44 AM
  4. compiling .java, thought I knew what I was doing?!
    By geoffgarcia in forum Java Help
    Replies: 10
    Last Post: September 9th, 2003, 11:56 AM
  5. java class methods not accessible
    By Ixodian in forum Java Help
    Replies: 8
    Last Post: August 26th, 2003, 10:04 AM

IMN logo majestic logo threadwatch logo seochat tools logo