Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8642191
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T11:42:56+00:00 2026-06-12T11:42:56+00:00

I am new into a professional project, which uses mt4j library ; the fact

  • 0

I am new into a professional project, which uses mt4j library ; the fact is, I need to refactor part of the code, and I am wondering about the best practices in some cases.

We need to customize some mt4j elements, for example the MTSceneMenu ; for now, previous developers simply copy/paste the class in a new package and modified what they want. I think it would better to create a new class extending the mt4j one, but here is the problem : most of the attribute are in private, so I’m not able to call them from derivated class…

What do you think about this problem ? Is the copy/paste method the right one ?

Thanks you

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T11:42:57+00:00Added an answer on June 12, 2026 at 11:42 am

    You can modify the library itself, instead of just inherit the classes that you want to change. It is very unlikely that you’re going to need the original behavior, since you are already changing it to meet your needs. This way you have access to the private field and don’t need to duplicate code as well.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am still new into Codeigniter framework. Today I read about Database Caching http://codeigniter.com/user_guide/database/caching.html
I'm running into difficulty setting up a new project into source control. I've imported
So I set up a new project into Eclipse and created a build.xml that
I'm relatively new to C++. I was looking into the source code of Box2D
I'm currently new into client-side programming, especially using the Jquery Ajax method to call
whenever I add a new domain into my new Plesk control panel on my
I am loading a new image into an imageview when the stop and play
I am trying to add a new column into an SQLiteDatabase but every time
I want to build a new design into WP (not make a theme for
I'm trying to load a new view into an existing view controller, but I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.