Skip to main content
Filter by
Sorted by
Tagged with
0 votes
2 answers
94 views

Just getting in to interfaces and I can't seem to find how to implement calculated fields... I know I can do this in the deriving class, but is there a way to do this in the interface itself? A very ...
Richard Harrison's user avatar
1 vote
0 answers
29 views

The sample code is simple, as follows: class Node { id?: string; private _parent?: Node; get parent(): Node | undefined { return this._parent; } set parent(value: Node | ...
Billy Chen's user avatar
5 votes
1 answer
2k views

I recently upgraded my Freezed from 2.x.x to 3.x.x. After the upgrade, my Riverpod state file gave me an error, indicating that I need concrete getters. I couldn't find any information, as it has only ...
Bamsen's user avatar
  • 52
2 votes
0 answers
46 views

`async fetch_pdf_attachment(from_email, to_address, subject, body, downloadPath = "./Data/Files/") { let count = 0; let email = null; // Get access token const accessToken = await ...
Eswar's user avatar
  • 21
1 vote
1 answer
92 views

Consider this code in C#: private int _backingField; public int SomeNumber => Volatile.Read(ref _backingField); public void Test_1() { var someNumber = Volatile.Read(ref _backingField); /...
user3163495's user avatar
  • 3,968
-3 votes
1 answer
68 views

My code dynamically generates properties and the classes to contain them. The code creates immutably-typed properties such that assignments to them are automatically converted to the correct type, ...
dakra137's user avatar
  • 170
-1 votes
1 answer
56 views

public class Card { private String cardRankString; private String cardColorString; private int copiesOfCard; public Card(String rank, String color, int copies) { ...
BleachEnjoyer's user avatar
0 votes
2 answers
110 views

I am using the below record in my Quarkus application and at some point I need to access the requestId field, located in Statements nested record. I want to avoid using the getters provided by the ...
Alex_Pap's user avatar
  • 546
-3 votes
2 answers
190 views

I have the some code similar to the following. This is obviously a stripped-down version. struct Foo { int bar; Foo() : bar(0) {} }; class Container { Foo* foo; public: ...
livefree75's user avatar
0 votes
1 answer
39 views

In PHP Symfony project with doctrine, I am using following class with self-referencing attribute "credit" and another attribute referencing class foo as follow. /** * Bill * * @ORM\Table(...
Yvon's user avatar
  • 35
1 vote
2 answers
114 views

Lets say I have the member: char* name; When writing a getter function to this member, is this the correct way: char* getName(){ return name; } But when we do this, now user of this class can ...
serkan ertas's user avatar
0 votes
0 answers
279 views

I have defined a Pinia store in which my user's character is made, stored/retrieved from localStorage, and pushed into an array which the store eventually returns. This is done by defining the class ...
VHK's user avatar
  • 101
0 votes
3 answers
896 views

I have hard time understanding why there are two different ways to perform an absolutely identical operation in JavaScript objects. Here I've got an object which contains an array in its "log&...
VantaBlack's user avatar
0 votes
1 answer
118 views

I was wondering how to exactly do a getter for a multidimensional array. I have a class (called Figure), one of its attributes is a bidimenisonal array (matrix), and I want to read that matrix from ...
Ambake's user avatar
  • 1
2 votes
2 answers
756 views

I have a critical concern, which might have a dumb & simple solution I cannot find, or it might open a Pandora box. If you define an accessor in a model, and then you try to use it in a ...
Internetbug256's user avatar
0 votes
0 answers
45 views

So I'm working with some export in js and do not understand the way they interact... I have those two files : imported file export var a = 0; // getter on a export function A() { return a; } // ...
Ren's user avatar
  • 153
-1 votes
3 answers
157 views

I have a ClockObj which has an AlarmObj in a "HAS A" OOP relationship. Or should I say injected through the constructor. Inside the AlarmObj I have a isAlarmOn boolean variable. I am ...
ILIIA CHTEREV's user avatar
0 votes
1 answer
50 views

I am working on a Java assignment for school. In this method, I am trying to save to a file as described by assignment, but I am getting an error when calling clothing.getLastWornDate() and am lost as ...
Wremmurg's user avatar
0 votes
0 answers
96 views

I have created standalone component. import { AsyncPipe, CommonModule } from '@angular/common'; import { Component, OnInit } from '@angular/core'; import { FormsModule } from '@angular/forms'; @...
Visrut's user avatar
  • 762
0 votes
1 answer
335 views

LWC setter is not getting called. <template> {message}<br><br>1. getter value: {displayMessage}<br><br>2. setter value: {updatedMessage} </template> import { ...
Salesforce developer's user avatar
0 votes
2 answers
553 views

Is there a way in C# to access the default value of a non-static, non-const property that is defined in an abstract class? For example, given: public abstract class SomeClass { public int ...
alelom's user avatar
  • 3,257
0 votes
1 answer
179 views

I am trying to subclass JavaScript array and override 'length' getter and setter. This code is not working - it outputs nothing to the console because getter and setter are not called. How to fix this?...
dvv's user avatar
  • 771
-2 votes
1 answer
109 views

I have this in my JS file : let xe = 0; const get_usd2inr = async () => { return await fetch(BASE_URL + "api/usd") .then(response => response.json()) .then(response => ...
anjanesh's user avatar
  • 4,291
0 votes
1 answer
58 views

FooClass has a property called foo. It's declared as @property (nullable, nonatomic, readonly, strong) id foo and it has NO underlying storage, it's not synthesized. It's just a getter that by default ...
Isaaс Weisberg's user avatar
1 vote
0 answers
80 views

I come across the following example: public class TimeService { public TimeService() { Time = DateTime.Now.ToLongTimeString(); } public string Time { get; } } We have ...
Anthony Voronkov's user avatar
0 votes
2 answers
41 views

I am doing "The Complete Flutter Development Bootcamp with Dart", and when I am getting the error below: lib/main.dart:47:42: Error: Too few positional arguments: 1 required, 0 given. ...
Joseph Mills's user avatar
0 votes
0 answers
53 views

I'm writing a text based game for my computer science class (I'm a beginner and still learning new stuff pretty much everyday) and I'm trying to make a method that will print out the information of ...
Will Blanchard's user avatar
1 vote
1 answer
536 views

I have a Pinia store: import { defineStore } from "pinia"; import { api } from "@/services/api"; export const useMaterialStore = defineStore("material", { state: () =&...
Bouni's user avatar
  • 155
0 votes
0 answers
52 views

I am new to properties in Python and a bit confused on how below code is working class FavoriteShape: def __init__(self, color, shape): self.color = color self.shape = shape @...
a.J.'s user avatar
  • 1
0 votes
1 answer
135 views

The tdwsUnit declares a property of type TObject, as well as a getter and a setter. An instantiated object shall be stored in an "object store" on the Delphi side. The goal is to transport ...
LuWey's user avatar
  • 51
0 votes
1 answer
431 views

i am very beginner ..and just start learning flutter. I follow "Your First Flutter App" from Google Codelabs, and stop at this step: https://codelabs.developers.google.com/codelabs/flutter-...
radevpro's user avatar
0 votes
1 answer
89 views

I have a quick question regarding const-correctness for getters of vector of non-pointers. Basically, I have this class with a non-const getter and a const getter for m_Vertices: class Mesh { public: ...
Anthony Blanchette-Potvin's user avatar
0 votes
0 answers
62 views

I'm trying to display data from a database in a TableView in JavaFx, and I'm using the class CheckAssunzione for creating my assunzione object that will be used to populate the table. I also have a ...
Ilaria Meghi's user avatar
0 votes
1 answer
35 views

I have removed the methods that are not involved in the case for a more concise display. Need to return the count value for the object with the specified id. When I pass a valid id to counter, the ...
Hopex Development's user avatar
3 votes
2 answers
186 views

I am a bit confused with a concept of value types as properties in a class. As far as I understand, when getter is called - a copy of value type is returned. Let's have an example: public struct Point ...
jon bee's user avatar
  • 73
0 votes
2 answers
255 views

I'm expecting to display a computed getter property, but VSC gives me the error "Expected to return a value in 'features' computed property." Even though I'm returnng a true value in getter ...
john's user avatar
  • 25
0 votes
1 answer
21 views

I have a class that looks like this: export class WidgetsManager { private foo?: boolean; private bar?: boolean; // ... and so on constructor(config: Config | null) { this.foo = config....
Andrew Allison's user avatar
2 votes
2 answers
7k views

I am trying to resolve the issue with getter, error message: The getter 'params' isn't defined for the type 'GoRouterState'. Try importing the library that defines 'params', correcting the name to ...
Elena Epshtein's user avatar
0 votes
0 answers
142 views

I use Spring Boot with Hibernate. I have an entity containing some credentials: @Entity class MyEntity { @Column(name = "credentials", columnDefinition = "jsonb") @Type(...
Taserface's user avatar
  • 123
1 vote
1 answer
337 views

In emberJS Octane, I expect a "get" function to be recomputed when the used tracked properties inside of it changes. It does not in my case. Here is my template : {{#each this.model....
Pierre Girardeau's user avatar
0 votes
1 answer
70 views

How to pass an input field to the getter? I'm trying to pass th einput field to the getter as a paramether. How to pass the param to the getter ? <input type="text" ...
stieve's user avatar
  • 3
-1 votes
1 answer
275 views

I have a Javascript object where one of the keys is a getter and I want to convert the entire object to a Lua table in order to use it in a wiki module. So far I have managed to find how to convert ...
Panos's user avatar
  • 91
0 votes
1 answer
172 views

If I want to create a getter accessor for a method variable, the getter does not give back the variable, but it executes the code referenced by the variable. unit Unit5; interface uses Winapi....
SOLID Developper's user avatar
1 vote
1 answer
100 views

To get a value from a function I can to this: bool goOutside() { if(today is a good day){ return true; }else{ return false; } } But I can also do this: bool get goOutside { ...
Maximilian's user avatar
1 vote
0 answers
33 views

I am attempting to use property-based getters and setters in Python and am getting strange problems. Consider the following code:#!/usr/bin/env python class anyThing(object): def __init__(self): ...
Jonathan's user avatar
  • 2,927
2 votes
1 answer
661 views

Using IConfigurationRoot extension method public static T GetSectionAsObject<T>(this IConfigurationRoot configuration, string key) { return configuration.GetSection(key).Get<T>(); } I ...
chuftica's user avatar
  • 178
-1 votes
2 answers
94 views

I want to move from Java to C# and I want to try getter and setter like in Java internal class Person { internal string name; internal void setName (string name) ...
Alexandru Manole's user avatar
-2 votes
1 answer
42 views

fruit_frame = LabelFrame(root, text = "Fruit", padx = 15, pady = 15) fruit_frame.grid(row = 0, column = 0) veg_frame = LabelFrame(root, text = "Vegetables", padx = 15, pady = 15) ...
Leah 's user avatar
0 votes
0 answers
65 views

I'm building an application for storing/searching/sorting cars and I'm running into an issue with one method. I have six ArrayLists, storing variables of different data types: Car c1 = new Car(1, &...
CasCelis's user avatar
0 votes
1 answer
181 views

I received several crashes in Xcode organizer, but I'm not able to find the root cause for it. Would be nice, if someone could look at it and give his thoughts ... ... here is the code of the getter /...
Hardy_Germany's user avatar

1
2 3 4 5
39