In object-oriented programming with classes, an instance variable is a variable defined in a class (i.e. a member variable), for which each object of the class has a separate copy.

learn more… | top users | synonyms

2
votes
0answers
225 views

Instance value in view is diplayed after page refresh(Production)

I'm using rails 2.3.4 & ruby 1.8.7 I'm trying to print a instance variable in my application. The instance variable is getting initialized in a method in deal_portal/base_controller.rb, while ...
1
vote
0answers
110 views

Where is seconds parameter being passed into method and stored? Converting seconds to string 00:00:00

I'm getting error: Timer should initialize to 0 seconds time_string should display 0 seconds as 00:00:00 (FAILED - 1) Failures: 1) Timer time_string should display 0 seconds as ...
0
votes
0answers
9 views

My Models are kludged together in an interdependent mess

I'm having interdependent model mayhem. Here's the original problem ( using DecentExposure ) : reply ActiveRecord::RecordNotFound: Couldn't find Topic with id=1 [WHERE ...
0
votes
0answers
39 views

Setting instance variable to parent in inherited resources

I'm trying out IR and im having some issues setting an instance variable to a nested parent object. For example, I have a professional model that has many projects. In my projects controller, I have ...
0
votes
0answers
80 views

getting null UITableView and cant access Instance NSMutatableArray

My goals is to remove the cell from being visible after a certain method is called. Basically im trying to remove the cell once the +(void)deleteFound has been called, please see where im trying to ...
0
votes
0answers
66 views

html tags not being interpreted in instance variables in rails views

I'm making a website with pages for each college and I have a college_page view and a College model. I have the @college instance variable available in my college_page view, so I'm using all of its ...
0
votes
0answers
23 views

Instance of classes used as instance variables in other classes

can someone help me with the concept of using class instances as another class instance variable? it should be something like this, right? @implementation Employee { calculateSalary *salary ...
0
votes
0answers
69 views

Write a driver program implementing an ArrayList of CD objects

I have written the CDException class and the CD class, and now I'm trying to write a driver class to run the other classes. I have to Read the artist name from user Read the album name from user ...
0
votes
0answers
18 views

Having difficulties in trying to my toString method print two different outputs

I'm trying to my my toString method print Not in Stock, while the other three will print what they have in stock. So far I have this. You'll see that in the toString part in my code. I'm instructed to ...
0
votes
0answers
144 views

iOS 6, ARC: primitive type instance variable loses value

I face a simple problem that I don't understand how to solve. Looks like ARC is involved, but where and how I've got no clue. In viewWillAppear I check the value of int fetched from sqlite and assign ...
0
votes
0answers
49 views

Why is my Application instance variable always blank?

I'm trying to declare a global instance variable in my ApplicationController, to be able to access it from every views... The following code is working BUT, it execute the query for every page ...
0
votes
0answers
32 views

dolfin get_eigenpair() results in segmentation violation in a class implementation

I want to solve a generalized eigenvalue problem with Dolfin. The solver is implemented as a class where the solve step and the evaluation step should be coded in different methods. And the ...
0
votes
0answers
40 views

local declaration hides instance variable

I don't know what i'm doing wrong NSArray *itemArray = [NSArray arrayWithObjects: @"One", @"Two", @"Three", nil]; UISegmentedControl *segmentedControl = [[UISegmentedControl alloc] ...
0
votes
0answers
72 views

Ruby's Kernel#instance_variables can't be removed by remove_instance_variable

I have the following code. I am passing it a Mongoid::Document. def clean_object(obj) obj.instance_variables.each do |ivar| obj.send(:remove_instance_variable, ivar) unless ivar == ...
0
votes
0answers
461 views

Unable to set instance attributes in Python signal handler

I have the following code def signal_handler(self,signum,frame): self.kill_received = True print "signal received",signum self.condition.set() def mainFunc(self): ...

15 30 50 per page