Questions tagged [object-property]
75 questions
3201
votes
49 answers
Detecting an undefined object property
How do I check if an object property in JavaScript is undefined?

Matt Sheppard
- 116,545
- 46
- 111
- 131
41
votes
1 answer
Javascript: Checking if an object has no properties or if a map/associative-array is empty
Possible Duplicate:
How do I test for an empty Javascript object from JSON?
Is there an easy way to check if an object has no properties, in Javascript? Or in other words, an easy way to check if a map/associative array is empty? For example,…

Vivin Paliath
- 94,126
- 40
- 223
- 295
6
votes
3 answers
Typescript element implicitly has type any with for...in loops
I have a JSON object imported from a JSON file (with resolveJsonModule: true).
The object looks like this:
"myobject": {
"prop1": "foo",
"prop2": "bar"
}
and it's type therefore looks like this:
myobject: { prop1: string, prop2: string…

Emrio
- 91
- 3
- 8
6
votes
1 answer
Is it possible to make a property which listen to changes of custom objects in javafx?
Let's assume I have an entity class Foo which contains some fields, getters, setters and constructor. For example:
public class Foo {
private Integer a = 0;
private Integer b = 0;
public Foo() {
}
public Integer getA() {
return a;
}
public…

Nazarii Mediukh
- 63
- 1
- 5
5
votes
2 answers
Attempt to assign property of non-object - Laravel 5.2
Issue: Converting my Laravel 4 code to Laravel 5.2. I'm at the point of moving and converting my views and cannot get past the following error.
Error: ErrorException in IndexController.php line 27:
Attempt to assign property of non-object
Debug…

scrfix
- 1,188
- 3
- 11
- 24
3
votes
4 answers
cannot assign to read-only property of object
#interestingProblem can anybody explain, please
I had a problem while updating the state as in the first code block, but there was no problem when I updated the state as in the second code block as below.
I had a problem: (cannot assign to…

Saad Saif
- 101
- 1
- 2
- 8
3
votes
0 answers
Inconsistency with bracket notation in object property accessors for dynamically named constructor-function. Is there an explanation?
I want to dynamically create objects of dynamically named class (sorry JS, I got used to call them classes) via dynamically named anonymous function. In this answer I found out that...
As of ES2015, the function created by an anonymous function…

UniBreakfast
- 55
- 1
- 7
3
votes
1 answer
OWL Same Object Property for different Classes
I am trying to convert a UML Class Diagram into an Ontoloy and I have a Question.
Let's say I have the following setup:
rel1
ClassA ------> ClassB
rel1
ClassC ------> ClassD
For the first case I converted the Relation "rel1" to an…

John
- 63
- 4
3
votes
2 answers
How To Dynamically Access Object Property?
I have stored name of a property of an object as a string. In PHP, if the object were named $object and the property variable was named $key, it could be accessed with $object->$key. How can I dynamically access properties in ActionScript?

Mr Coder
- 8,169
- 5
- 45
- 74
3
votes
1 answer
Laravel Relationship working, but showing it -> Trying to get property of non object
In my Controller I have:
public function showMainPage()
{
$categories = Category::with('subcategories.products.prices', 'subcategories.products.image')->get();
$data = array(
"categories" => $categories,
);
…

xTheWolf
- 1,756
- 4
- 18
- 43
3
votes
1 answer
OWL Object Property domain/range restrictions to the same level classes
I want to design an object property which is always linked only between the same level of classes. For example,
I want to limit the property isCounterPartOf to be an arc of the sibling nodes which belong to the same upper class, such as
house…

MJ Park
- 303
- 1
- 10
3
votes
0 answers
ng-table fields that are object property
I want a column in ng-table-dynamic that has a field which is an object property.
{
field: 'customer.name',
title: "Customer Name",
show: true
}
I tried lot of different way…

praveensanap
- 103
- 8
3
votes
1 answer
Protege: Object property restrictions 1
I'm using Protege 4.3 to create my first ontology, so I encountered a few problems
Let's say we have the classes Shop, Mall, and Person and the properties works-inand is-part-of.
So the first problem is we want: if a Person works-in Shop and Shop…

DS_UNI
- 2,600
- 2
- 11
- 22
2
votes
1 answer
VueJS observe plugged parameter
I'm starting with VueJS 2 and I created a simple plugin which adds parameter to Vue instance.
I have problem because when I update this value my computed properties are still same.
My example plugin's code:
export default function (Vue) {
…

ventaquil
- 2,780
- 3
- 23
- 48
2
votes
1 answer
Exclude individuals that is related by some specific inverse properties
I have some individuals A,B,C,D,E, and two properties P1, P2.
A P1 B
C P1 D
E P2 C
I want to build a Class that only captures A but not C. so I set a Class like,
myClass EquivalentTo: (P1 some owl:Thing) and (P1 only owl:Thing)
myClass…

MJ Park
- 303
- 1
- 10