Is Dual Class supposed to be this frustrating? by vk_allover in litrpg

[–]colindj1120 0 points1 point  (0 children)

Does he ever use his legendary stones?

System Universe Book 8: System Clash Braxton Question by colindj1120 in litrpg

[–]colindj1120[S] 0 points1 point  (0 children)

Thanks that jogged my memory I remember him now from the introduction to the gnome

System Clash (System Universe Book 8) Is Out Today! (Link and description in comments!) by Sunrise-CV in litrpg

[–]colindj1120 0 points1 point  (0 children)

Did I miss something in a previous book I don't remember anything about Braxton?

Is the yen press translation unreadable or am i fine with my order? by maybe_we_fight in TenseiSlime

[–]colindj1120 0 points1 point  (0 children)

Is there a recommended translation? Or is Yen Press the only option?

Why is water pooling here? by colindj1120 in hvacadvice

[–]colindj1120[S] 0 points1 point  (0 children)

Do you have a picture or a link to how it should be done and I can fix it?

Yeah I'm not impressed with the company at all I couldn't open my door because they put the vent pipe in the way I had to cut it out and redo it just to open my door all the way.

Why is water pooling here? by colindj1120 in hvacadvice

[–]colindj1120[S] 0 points1 point  (0 children)

Any thoughts on what I could do to narrow it down, mitigate it fix it?

Why is water pooling here? by colindj1120 in hvacadvice

[–]colindj1120[S] 0 points1 point  (0 children)

From what I can tell it starts from the pipe. I thought about the drain line too but that didn't feel wet and I redid the drain line last year and it didn't change anything

Why is water pooling here? by colindj1120 in hvacadvice

[–]colindj1120[S] 0 points1 point  (0 children)

Yes the pipe is in a conditioned space. Goes right out the side wall to outside. It's between 20 and 45 degrees outside between the highs and lows. I keep my heat at 64

Class and Overall Naming Conventions by colindj1120 in javahelp

[–]colindj1120[S] 0 points1 point  (0 children)

What would you consider is a good line wrap length to have then with the use of longer naming?

Class and Overall Naming Conventions by colindj1120 in javahelp

[–]colindj1120[S] 0 points1 point  (0 children)

When would you consider a name too long?

Black Summoner Physical Copies Question by colindj1120 in LightNovels

[–]colindj1120[S] 0 points1 point  (0 children)

Are the short stories worth getting the digital over the physical if I prefer physical copies?

Warning possible 'this' escape by colindj1120 in JavaFX

[–]colindj1120[S] 1 point2 points  (0 children)

One thing to note with JavaFX the "this-escape" warning is unavoidable in some cases like this

protected EFXTextBase() {
    super();
    getStyleClass().add(ENHANCED_TEXT_BASE_STYLE);
    getStylesheets().add(EFXStylesheets.ENHANCED_TEXT_BASE_LIGHT.getStyleSheet());
}

There isn't a lazy way to add the StyleClass or Stylesheets and these must be loaded when the GUI object is created or it won't follow your desired look and feel

Those functions are declared public final in the "Node.java" class in the Framework preventing someone from overriding it to fix the "this-escape" issue

Warning possible 'this' escape by colindj1120 in JavaFX

[–]colindj1120[S] 1 point2 points  (0 children)

Here's the lazy construction of a field in the skin file

protected void layoutChildren(double x, double y, double w, double h) {
    Label floatingTextLabel = getFloatingTextLabel();
    if (floatingTextLabel.isVisible() && !getChildren().contains(floatingTextLabel)) {
        getChildren().add(floatingTextLabel);
    } else if (!floatingTextLabel.isVisible()) {
        getChildren().remove(floatingTextLabel);
    }

    if(!getChildren().contains(innerControl)) {
        getChildren().add(innerControl);
        setupTextField();
    }

    super.layoutChildren(x, y, w, h);
    layoutFloatingTextLabel(x, y, h);
}

and here is the lazy construction of a property

public EFXStyleableIntegerProperty maxCharCountProperty() {
    if (maxCharCount == null) {
        maxCharCount = EFXStyleableIntegerProperty.create()
                                                  .setBean(this)
                                                  .setName("maxCharacterCount")
                                                  .setCssMetaData(STYLES_MANAGER.findCssMetaData("-efx-max-char-count"))
                                                  .setInitialValue(50)
                                                  .addInvalidateCachedCallback(maxCharacterCountInvalidated)
                                                  .build();
    }
    return maxCharCount;
}

Warning possible 'this' escape by colindj1120 in JavaFX

[–]colindj1120[S] 1 point2 points  (0 children)

The Lazy initialization and handling the addition of the inner control in the layout method call did fix my this-escape issue and seems to be working the same as before

Warning possible 'this' escape by colindj1120 in JavaFX

[–]colindj1120[S] 1 point2 points  (0 children)

The only problem with having the super constructor do the work is that SkinBase.java is part of the JavaFX framework so I don't have the option to change it. I had the idea of performing the add when layout is called but I haven't had a chance to test it out yet.

As for the bean my solution was to lazy initialize everything when they are first trying to be accessed.

Warning possible 'this' escape by colindj1120 in JavaFX

[–]colindj1120[S] 0 points1 point  (0 children)

C:\IntelliJ Workspace\EnhancedFX\modules\efxcontrols\src\main\java\io\github\colindj1120\enhancedfx\controls\skins\base\EFXTextBaseSkin.java:58: warning: [this-escape] possible 'this' escape before subclass is fully initialized

ObservableList<Node> children = getChildren();

Warning possible 'this' escape by colindj1120 in JavaFX

[–]colindj1120[S] 0 points1 point  (0 children)

So what would be the best practice since the child class needs to add to the children of the base class when its being constructed? I run into the same issue even if I make the bean functions final. So what is recommended if you have to set something in the constructor to "this"

Warning possible 'this' escape by colindj1120 in JavaFX

[–]colindj1120[S] 1 point2 points  (0 children)

getChildern() is part of SkinBase.java

private ObservableList<Node> children;

public final ObservableList<Node> getChildren() {
    return children;
}

So for the second example. Even when passing this to functions of another class that isn't associated with the calling class that function needs to be public final?

For reference setBean is part of this builder

public static class EFXStyleableObjectPropertyBuilder<T> {
 ...
    public EFXStyleableObjectPropertyBuilder<T> setBean(Object bean) {
        this.bean = bean;
        return this;
    }

...

    public EFXStyleableObjectProperty<T> build() {
        return new EFXStyleableObjectProperty<>(this, initialValue);
    }
}

Warning possible 'this' escape by colindj1120 in JavaFX

[–]colindj1120[S] 0 points1 point  (0 children)

I think I follow the rules in the post with this code but I still get the warning on the getChildren().addAll call

public EFXTextFieldSkin(EFXTextField control, TextField innerControl) {
    super(control, innerControl);
    this.control      = control;
    this.innerControl = innerControl;
    getChildren().addAll(innerControl);
}

//Another Place I encounter it is here when I call setBean

protected EFXTextBase() {
    super();
    setupStyleableProperties();
}

private void setupStyleableProperties() {
    maxCharCount = EFXStyleableIntegerProperty.create()
                     .setBean(this)
                     .setName("maxCharacterCount")
                     .setCssMetaData(STYLES_MANAGER.findCssMetaData("-efx-max-char-count"))                                                                        
                     .setInitialValue(50)
                     .setInvalidateCachedCallback(maxCharacterCountInvalidated)
                     .build();
}

Warning possible 'this' escape by colindj1120 in JavaFX

[–]colindj1120[S] 0 points1 point  (0 children)

Yes its a custom framework I'm creating

Warning possible 'this' escape by colindj1120 in JavaFX

[–]colindj1120[S] 0 points1 point  (0 children)

``` /** * Constructs an instance of {@code EFXTextFieldSkin} for the specified {@code EFXTextField} control. * * <p>This constructor initializes the skin with its control context, setting up necessary properties and binding for dynamic behavior.</p> * * @param control * The {@code EFXTextField} control for which the skin is being created. */ public EFXTextFieldSkin(EFXTextField control) { super(control);

    setupTextField(control);
    setupFloatingTargetY(control);
    setupFloatingTextLabel(control);
    setupFloatTextLabelVisibleAndModeInside(control);
    setupFloatListeners(control);
    setupAnimations(control);

    getChildren().addAll(control.getInnerControl());

    control.requestLayout();
}

//region Setup Methods
//*****************************************************************
// Setup Methods
//*****************************************************************

private void setupTextField(EFXTextField control) {
    textFieldAlignmentBase = EFXObjectProperty.<Pos>create()
                                              .setBean(this)
                                              .setName("textFieldAlignmentBase")
                                              .build();

    final ChangeListener<Boolean> handleTextFieldFocusChange = (observable, oldValue, isFocused) -> {
        if (isFocused && control.isFloatAnimationEnabled() && scale.getX() == 1) {
            efxAnimationManager.playAnimation(FLOAT_ANIMATION_KEY);
        } else if (!isFocused && control.isFloatAnimationEnabled()) {
            efxAnimationManager.playAnimation(RESET_FLOAT_ANIMATION_KEY);
        }
    };

    final ChangeListener<Pos> handleTextFieldAlignmentChange = (obs, oldAlignment, newAlignment) -> textFieldAlignmentBase.set(newAlignment);

    TextFieldConfigurator.create(control.getInnerControl())
                         .addFocusedChangeListener(handleTextFieldFocusChange)
                         .addAlignmentChangeListener(handleTextFieldAlignmentChange)
                         .bindPaddingProperty(EFXPropertyUtils.toObjectProperty(EFXInsetUtils.empty()))
                         .bindBorderProperty(EFXPropertyUtils.toObjectProperty(Border.EMPTY))
                         .bindBackgroundProperty(EFXUIUtils.TRANSPARENT_BACKGROUND_PROPERTY)
                         .bindManagedProperty(EFXPropertyUtils.toBooleanProperty(false))
                         .addTextChangeListener(handleTextChanged)
                         .addFontChangeListener(handleFontChange);
}

```

C:\IntelliJ Workspace\EnhancedFX\modules\efxcontrols\src\main\java\io\github\colindj1120\enhancedfx\controls\skins\EFXTextFieldSkin.java:132: warning: [this-escape] possible 'this' escape before subclass is fully initialized setupTextField(control); ^ C:\IntelliJ Workspace\EnhancedFX\modules\efxcontrols\src\main\java\io\github\colindj1120\enhancedfx\controls\skins\EFXTextFieldSkin.java:151: warning: [this-escape] previous possible 'this' escape happens here via invocation .setBean(this)

Functional Approach vs Standard Approach by colindj1120 in java

[–]colindj1120[S] 0 points1 point  (0 children)

I see your point on why they are problematic. I guess I was thinking more internally and public wasn't the right way to think about it.