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 6788553
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T17:29:58+00:00 2026-05-26T17:29:58+00:00

I am using Base2 as a means to allow us to easily do inheritance

  • 0

I am using Base2 as a means to allow us to easily do inheritance in our system, aswell as using KnockoutJS for some UI interactions.

We have defined a base class for our ViewModels

BaseViewModel = Base.extend({
    ...
});

Which we then extend for our view models:

ExampleViewModel = BaseViewModel.extend({
    text: ko.observable("")
});

However there seems to be a problem. When you create 2+ instances of the view model (say if you are pushing them in to an observableArray and using templates to build up a UI) it seems like any changes made to a bound field, updates all view models rather than just the one it’s bound to.

Does anybody know why this might be?

  • 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-05-26T17:29:58+00:00Added an answer on May 26, 2026 at 5:29 pm

    Because the extension is not actually instantiating a new observable, its just copying the reference.

    I think you can do something like this:

    ExampleViewModel = BaseViewModel.extend({
        constructor: function() {
            this.text = ko.observable("");
        }
    });
    

    Not as nice though as normal Base2 syntax, but just a limitation in how Knockout is implemented due to issues with properties.

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

Sidebar

Related Questions

I have a small code base using Subsonic 2.1 in my project. I would
In CodeIgniter I'm using a base CRUD My_model , but I have this small
A bit of background first: I am using base code from a remote SVN
I am using form base authentication in my Sharepoint site. On my login page
when accessing foo() of base using derived class's object. #include <iostream> class base {
For my tests I'm using a base class MyTestBase defining a method setup() that
I'm playing with LINQ-To-SQL in .NET 3.5 and have built some classes based on
I am using jQuery droppable (in conjunction with jQuery draggable ) to allow the
A friend of mine really likes using Joomla as a base for his websites.
I have a system that requires a unique 6-digit code to represent an object,

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.