Questions tagged [object-properties]

117 questions
0
votes
1 answer

Using a variable variable in an object property in PHP

I've set a few variables: $field = "XYZ"; $block_hi = $field."_hi"; $block_lo = $field."_lo"; Then I have an object with properties that have the name of my above variables: $obj->XYZ_hi['val'] = "value1"; $obj->XYZ_lo['val'] = "value2"; I thought…
0
votes
1 answer

How to save ios object or view parameters to server?

What is the best way to save object parameters to DB in ios? => like sending values to server application and server will save the parameters to db? And later that ios-app will get the properties and create the new object again. What is the best way…
AykutE
  • 344
  • 3
  • 15
0
votes
4 answers

How can I rescue an undefined property of an object in JavaScript?

Okay, say you've got two objects: greg and stacy. They're both people. Greg's object looks like this: var greg = { name: "Greg", job: "doctor", age: 45 } and Stacy's like this: var stacy = { name: "Stacy", age: 42 } When someone tries to…
0
votes
2 answers

How to combine constructor function and prototype property

I'm trying to get a handle on how prototypes work. I have this example: function Person(name) { if (arguments.length > 0) this.init(name); } Person.prototype.init = function(name) { this.name = name(); } Employee.prototype = new…
0
votes
1 answer

OWL API object properties Annotation creation

Does any one can help me generate this ObjectPropertyRange using "The OWL API"?? #ProgramLanguage
Jpropeht89
  • 21
  • 4
0
votes
1 answer

Does an array returned from an AJAX request from the server (encoded and parsed JSON) have a 'results' property?

I have a function that fetches data from a server via an AJAX request. The asynchronous callback takes the data and then displays it to the DOM. I'm aware that the getJSON AJAX request is supposed to return an array of strings (and is automatically…
Seeeyonnn
  • 315
  • 2
  • 10
  • 19
0
votes
1 answer

PHP storing a resource in an object property

I am trying to keep an open pgsql database connection in a property of an object. The database connection is transfered to the object as a paramter of the constructor and saved in a property. Later a function of the class that needs the databse…
EvilKarter
  • 267
  • 7
  • 22
0
votes
1 answer

How to use dynamic key name in object during object construction?

I want to use a dynamic key name during the creation of the object. var myKey = 'text'; var myObj = { [myKey]: 'Hello' // not working }; alert(myObj.text); I know you can do it on the next line after the object is created myObj[key] =…
0
votes
1 answer

Can I have one anonymous function as the value of two different properties in the same object?

Notice in the example below that both create and update are identical. I believe it is possible to have update just be an alias to create's code without needing to write it out a second time. this.VAROPS = { // variable operations create: …
Bryson
  • 1,186
  • 2
  • 13
  • 26
0
votes
2 answers

Java - Jena API - Getting more than one datatypeproperty

I'm using Java and Jena API. I have a class Marriage which have 3 Object Properties called "hasHusband", "Haswife" and "dateOfMarriage". The first two are associated with a class Person which has the datatypeproperties hasFirstName, hasLastName,…
user1632278
  • 111
  • 6
-1
votes
1 answer

Can't print Json object properties

I can see the stringifyed Object proberties in console log but I am getting error while printing them. The following console log works fine, and I can see all properties in console log, but if I print metadata.Age then my app crashes. My object…
Muj
  • 132
  • 3
  • 14
-1
votes
1 answer

how to look at current value and change color if value is changed in python

I am trying to figure out how to change the stroke color of a text field if the value is changed from what the current value is. For these fields i have values that are automatically pulled from various sources and inputted into an XML form. The…
wondergoat77
  • 1,765
  • 9
  • 32
  • 60
1 2 3 4 5 6 7
8