Questions tagged [modifier]
347 questions
1
vote
1 answer
Capture specific modifier key
According to this page on MSDN, the Key Value for Left Control is 162. How can I determine if this key is pressed in code? At the moment, everytime I try and handle a keypress, I get the value 17 which is just a generic control key. Is there a way…

XSL
- 2,965
- 7
- 38
- 61
1
vote
1 answer
Get the modifiers of a field using the ASM tree API
I am writing an analyzer for Java class files using ASM. One of the things I want to determine is what the modifiers (public, static, final?) of the fields in a class are. But I am not sure how to do this.
In the documentation i found the opcodes of…

TheArchitect
- 129
- 3
- 9
1
vote
1 answer
contenteditable: Detect element changes when using row/column modifier
I used the following code from a previous posting to detect (most of) the changes to an element with attribute "contenteditable". But sadly it does not include the changes to tables that occur when using the table row/column modifier controls…

devnull69
- 16,402
- 8
- 50
- 61
1
vote
1 answer
Swift substring range function doesn’t find match in specific cases
I am trying to find the range of substrings in a Tamil string. The range function particularly seems to have issues for substrings ending with the Unicode modifier glyph ‘Tamil pulli’ (U+0BCD).
The range functions work as expected when the substring…

baskaran
- 25
- 1
- 7
1
vote
1 answer
How to handle horizontal scroll gesture combined with transform gestures in Jetpack Compose
Hi I want to have a zoomable image in a horizontal pager. I already implemented transform gestures and double tap but now, I can't scroll my pager with scrolling over the image. I guess panning and scrolling mixes each other. Can you help me about…

Sevban Bayır
- 196
- 3
- 13
1
vote
2 answers
How can I group several Tailwind CSS utilities under one modifier?
I'm using Tailwind's default breakpoint values in a TypeScript + React project compiled with Vite. But I noticed that in my project and on a section of their documentation that both repeated instances of the same modifiers within one element. In the…

Nuri Kim
- 139
- 1
- 6
1
vote
1 answer
None of the following functions can be called with the arguments supplied. Compose
I can't figure out what the problem is. I'm trying to create a button, but one of the modifier attributes doesn't work, I tried wrapping it in a column, but it doesn't help.
class MainActivity : ComponentActivity() {
override fun…

Rinat
- 21
- 1
1
vote
2 answers
How to build and call a function inside onAppear modifier when we want to implement inside it a for with stride in order to show SFSymbols in SwiftUI
I have implemented in SwiftUI the following code:
import SwiftUI
struct onAppearmodifier: View {
@State var mytext: String = "Start"
let symbols: [String] = ["globe", "heart.fill","house.fill"]
var body: some View {
…

Clara Puglisi
- 49
- 3
1
vote
1 answer
Mapping Not being updated in contract while sending data from another contract
// SPDX-License-Identifier: MIT
pragma solidity >=0.4.22 <0.9.0;
contract t1{
mapping(address => uint256[]) AllSpecialNFT;
function addNewVal( uint _tokenId) public {
AllSpecialNFT[msg.sender].push(_tokenId);
}
function…

VIASK
- 31
- 5
1
vote
1 answer
Singleton design pattern. Should its instance be public or private?
Is it necessary for instance of singleton design pattern to be private or public to be considered a singleton design pattern .
for example
class Singleton
{
public static Singleton obj;
is the access modifier neccessary. What difference does it…

poornima
- 25
- 1
- 3
1
vote
2 answers
Which visibility modifier has lesser visibility: Protected or Internal?
Which visibility modifier is more permissive: Protected or Internal?
internal var num = 18
protected set // throws an error at 'protected' showing: Setter visibility must be the same or less permissive than property visibility
And I try…

Muhammad Hassaan
- 11
- 2
1
vote
2 answers
SwiftUI conditional Text modifier .textSelection
maybe a absolute beginner question:
In the following code is foregroundColor working but .textSelection doesn't. What is the reason?
Text("This is a Test")
.foregroundColor(isSelectable ? .green : .red)
.textSelection(isSelectable ? .enabled :…

Michael
- 616
- 5
- 20
1
vote
1 answer
SwiftUI What exactly happens when use .offset and .position Modifier simultaneously on a View, which decides the final location?
Here I have this question when I try to give a View an initial position, then user can use drag gesture to change the location of the View to anywhere. Although I already solved the issue by only using .position(x:y:) on a View, at the beginning I…

Jason
- 3,166
- 3
- 20
- 37
1
vote
1 answer
Value of type 'some View' has no member 'baselineOffset'
I am trying to build a custom view modifier. My code is below.
import SwiftUI
struct Heading: ViewModifier {
let color: Color
let size: CGFloat
let align: TextAlignment
func body(content: Content) -> some View {
…

Ryan Clare
- 43
- 5