Questions tagged [extend]

Cause a unit of code (a class in POO, a style class in CSS ...) to cover a wider area.

Cause a unit of code (a class in POO, a style class in CSS ...) to cover a wider area.

1544 questions
0
votes
2 answers

jQuery extend - target object don't get extended

var collection = $('ul li'); collection.each(function (index) { var test = $.extend($(this), { // var test = $.extend(collection.eq(index), { someProperty: 'val' }); …
simo
  • 15,078
  • 7
  • 45
  • 59
0
votes
1 answer

Extending Backbone.Collection and Backbone.Model to create new Collection/Model types

I have been trying to create my own base Models and Collections for extending in my apps. By this I mean that instead of calling: var MyModel = Backbone.Collection.extend({ ... }); I want to use var MyModel = App.Model.extend({ ... }); And…
GTF
  • 8,031
  • 5
  • 36
  • 59
0
votes
1 answer

Rails: Organizing Public and Company roles

In my rails application, I have Companies (which have professional needs) and Public users (which have personnal needs) of my app. Both roles have their attributes: username, location,... for Public users, and Address, phone, fax, professionnal…
Hassen
  • 6,966
  • 13
  • 45
  • 65
0
votes
3 answers

Java architecture issue for extending instances (need for a pattern recommendation)

A service from external API which I am not allowed to modify returns me MyClass instance = ServiceUtil.getThing(); I would like to extend this returned class and Add/Override a method but leave intacts the others, say 150 methods. private…
Whimusical
  • 6,401
  • 11
  • 62
  • 105
0
votes
0 answers

Can you inherit local variables?

I was wondering if the following code is executed, does it inherit local variables from the NewDragDrop function? Does it matter if the NewDragDrop() is the constructor of another class? function NewDragDrop (imageReference, imageTitle){ var…
0
votes
1 answer

Extending a method in rails

In the application I'm creating I use a gem. This gem has a Module with a method that is called by the gem when something changes. What I need to do is extend the functionality of this method. I cannot change the name of this method and I am not…
Tim Baas
  • 6,035
  • 5
  • 45
  • 72
0
votes
1 answer

How to extend click method of accordion

I need to extend click method of accordion. I have something like:

Section
1

Mauris mauris ante, blandit et, ultrices a, suscipit eget, quam. Integer …

Jayyrus
  • 12,961
  • 41
  • 132
  • 214
0
votes
2 answers

Sharing a field method with class

I have a class with objects Now i want to call a function from Box and Toy object from outside of the Container class class Container { Box box1 = new Box(); Toy toy1 = new Toy(); public void open() { box1.open(); } public…
John Frost
  • 673
  • 1
  • 10
  • 24
0
votes
2 answers

I want to extend ArrayList to implement but cannnot access to elementData private var

I would like to know how can I override indexOf() method in a subclass of ArrayList. I need to use the same accessing that super to the private transient elementData var. How can I solve my design? EDIT: Could it be a valid solution changing the…
Whimusical
  • 6,401
  • 11
  • 62
  • 105
0
votes
2 answers

Extend a Div the Length of it's Container

I am trying to extend my left sidebar so that it spans the length of the page (or the container DIV). I tried setting the height of the container to 100% and then the height of the sidebar to 100%, but that did not work. Here is my…
nellygrl
  • 657
  • 1
  • 16
  • 34
0
votes
5 answers

PHP Object Oriented Issue On My Code

Hi please have a look on bellow code. name; } } class B extends A { public function setName() { $this->name = 'Prasad'; } } $obj =…
Prasad Rajapaksha
  • 6,118
  • 10
  • 36
  • 52
0
votes
2 answers

Ensuring an Event listener is called after extending an Activity

If I extend Activity and implement an event handler in my base class (sorry if that's not the correct OOP term) how can I ensure that my event handler always gets run from classes which extend mine. public class MyActivity extends…
user1325094
  • 339
  • 5
  • 13
0
votes
2 answers

Using Smarty 3, Code Igniter 2, and HMVC together with smarty's inheritance?

I am using Code Igniter, The HMVC library, and Smarty with this library. Smarty is working fine by default, however if I try to use smarty's inheritance feature ( {extends file="master.tpl"}) then we run into an issue. The extends feature does not…
Hailwood
  • 89,623
  • 107
  • 270
  • 423
0
votes
0 answers

Extend existing module in symfony 1.4

I would like to know what is the best solution / approach to extend a symfony 1 module. More exactly, what I want to do is: Create a base module "MUSIC" Create a new module AS A PLUGIN (let's name it ARTIST), that extends MUSIC For each plugin…
crada
  • 379
  • 2
  • 6
0
votes
3 answers

CodeIgniter Loader extend causes error

I've came across something that drives me crazy. please help me :( I'm try to extend the CI_Loader Core in-order to create global header and footer. For some reason, the extending causes error. The extend code: class MY_Loader extends CI_Loader { …
Orz
  • 585
  • 1
  • 5
  • 26