ref Questions
10
Solved
I've got the following function:
public static extern uint FILES_GetMemoryMapping(
[MarshalAs(UnmanagedType.LPStr)] string pPathFile,
out ushort Size,
[MarshalAs(UnmanagedType.LPStr)] string Ma...
Doff asked 10/4, 2009 at 1:48
4
Solved
I've researched a bit and it seems that the common wisdom says that structs should be under 16 bytes because otherwise they incur a performance penalty for copying. With C#7 and ref return it becam...
Schottische asked 19/9, 2017 at 4:28
11
Solved
I've built a form in React using Material UI and React Hook Form. I'm trying to create a custom TextField element that works as a Select Input. I would like it to be an uncontrolled component with ...
Alonaalone asked 3/8, 2020 at 21:6
6
Solved
I tried this earlier today:
public interface IFoo
{
IEnumerable<int> GetItems_A( ref int somethingElse );
IEnumerable<int> GetItems_B( ref int somethingElse );
}
public class Bar :...
Intrados asked 15/6, 2009 at 23:48
3
What is the difference between in and ref readonly parameters?
I found both in and ref readonly parameters make the parameter readonly and it cannot be modified in the called method. Do they have a...
4
Code:
import DrawControl from "react-mapbox-gl-draw";
export default function MapboxGLMap() {
let drawControl = null
return(
<DrawControl ref={DrawControl => {drawControl = DrawControl}}...
Kenzi asked 5/1, 2020 at 13:52
6
Solved
I want to get the dimensions of a vue.js component from the parent (I'm working with the experimental script setup).
When I use the ref inside a component, it works as expected. I get the dimension...
Desultory asked 10/4, 2021 at 11:38
3
How to write multi ref for one property of one mongoose schema, like this(but wrong):
var Schema = mongoose.Schema;
var PeopleSchema = new Schema({
peopleType:{
type: Schema.Types.ObjectId,
ref...
4
i need to to focus ref with name test1 a set some value which is placed in compontend slot (from outside). Is it possible to do it somehow? I tried to get from $refs or $slots, but failed.
App.vue
...
7
I am new to Vue and am trying to use $refs to grab some elements in the DOM from a sibling component (for very basic purposes, just to get their heights, etc.), and I'm doing so in a computed.
No ...
Mignon asked 21/11, 2019 at 15:43
5
Solved
I have a parent and a child component, I want to access the ref of an element which is in the child component, in my parent component. Can I pass it with props?
// Child Component (Dumb):
export de...
2
Solved
my original code was like this:
handleClick() {
var name = this.refs.name.value;
var description = this.refs.description.value
}
render () {
return (
<React.Fragment>
<input ref='name...
Futhark asked 8/1, 2020 at 14:26
10
Solved
I have a object that is my in memory state of the program and also have some other worker functions that I pass the object to to modify the state. I have been passing it by ref to the worker functi...
11
Solved
If I am passing an object to a method, why should I use the ref keyword? Isn't this the default behaviour anyway?
For example:
class Program
{
static void Main(string[] args)
{
TestRef t = new...
Hufford asked 9/10, 2008 at 11:49
2
Solved
2
Here I defined a select component, and I wanted to display it if a condition is true. This select field appears when one of the values of the previous select input is selected. But here is when t...
Ellsworthellwood asked 13/5, 2021 at 2:37
2
Why does the following code not compile in C# 11?
// Example 1 - fails
class C {
public Span<int> M(ref int arg) {
Span<int> span;
span = new Span<int>(ref arg);
return span;
...
28
Solved
I'm creating a function where I need to pass an object so that it can be modified by the function. What is the difference between:
public void myFunction(ref MyClass someClass)
and
public void ...
5
Solved
I have a modifying method with a signature like
private bool Modify(ref MyClass obj);
that will make modifications to obj and indicate succes with it's return value. Modify is not reassigning th...
15
Solved
Is it possible to assign an out/ref parameter using Moq (3.0+)?
I've looked at using Callback(), but Action<> does not support ref parameters because it's based on generics. I'd also prefera...
Conlon asked 1/7, 2009 at 9:6
2
Solved
I'm currently trying to pass a ref to get the value of the input (base-input component) on submit. You will find below the two components. With the console.log in handleSubmit, email is always unde...
Eldridge asked 27/10, 2022 at 12:32
1
Solved
When I try to get the ref of my custom components it results in:
Proxy {__v_skip: true}
[[Handler]]: Object
[[Target]]: Proxy
[[IsRevoked]]: false
but works just fine when replacing d-icon-button ...
Rechaba asked 9/9, 2022 at 21:48
2
Solved
I have a form that contains a number of input elements. I want to access the values of these inputs in the parent component. For this, I could use state but I am exploring the use of refs at the mo...
1
Solved
For example,
public int DoSomething(in SomeType something){
int local(){
return something.anInt;
}
return local();
}
Why does the compiler issue an error that the something variable cannot be ...
Influential asked 14/8, 2022 at 14:34
3
I am having difficulty using refs with Styled Components. When I try to access them in my class methods like below, I get the following error:
Edit.js:42 Uncaught TypeError: this.....contains is...
Rowan asked 12/6, 2018 at 15:22
1 Next >
© 2022 - 2024 — McMap. All rights reserved.