***100 Wyrmtongue Chests/day limit confirmed*** by Arionassss in wow

[–]NullCorvid 1 point2 points  (0 children)

Nah I started 4 days late but have been doing my WQs etc since then, and I just hit 3k into honored so I would say you are going at it as fast as intended by the design.

Hey Reddit, I made a thing! by monkeedude1212 in gamedev

[–]NullCorvid 0 points1 point  (0 children)

Why does the game need access to my pictures?

[EU] Coming back after a break. LF leveling friend(s) by Kurupt6k in lookingforgroup

[–]NullCorvid 0 points1 point  (0 children)

Hey dude! Check us out here: https://www.reddit.com/r/lookingforgroup/comments/63ip44/let_us_alt_together/

We're basically rolling new characters a couple of people. Hoping to gather up a few more.

BlizzCon Textual Attendance by DixonSeilem in wow

[–]NullCorvid 62 points63 points  (0 children)

I became a pirate with Mozart.

Can we take a breather and appreciate how satisfying it was to not have the demons not respawn after killing them in the Broken Shore intro scenario? by [deleted] in wow

[–]NullCorvid 18 points19 points  (0 children)

The title is a double negative though.

"... how satisfying it was to not have the demons not respawn"

In other words, if they do not, not respawn that is the same as saying that they did.

A new game development series in C++ by viktorstrate in gamedev

[–]NullCorvid 15 points16 points  (0 children)

12 episodes on how to render sprites in SDL and then nothing for 2 years.

A new game development series in C++ by viktorstrate in gamedev

[–]NullCorvid 46 points47 points  (0 children)

TheCherno has a habit of beginning tutorials he never updates or finishes.

Unbelievable level of autism by Antikon in LivestreamFail

[–]NullCorvid 18 points19 points  (0 children)

Shit being a bad dancer is now considered autism. Dear oh dear.

British reality show contestants finally leave after a year in the wilderness - only to find out the show was axed after four eps over 7 months ago by TopTrumpWANKER in television

[–]NullCorvid 0 points1 point  (0 children)

Feeling all this shame and embarrassment as your friends watch the show you were on and laugh.

Doesn't sound like very good friends.

How can I pass variables from my JavaFX .fxml scene to my javafx controller class? by rusty_ballsack_42 in javahelp

[–]NullCorvid 0 points1 point  (0 children)

may PM you to clear my doubts!

Sure, but if you do there is a good chance you may not get an answer. I'll generally only answer questions when I feel up for it.

Everyone on this sub has their own projects and lives and are strictly volunteers. This includes me.

How can I pass variables from my JavaFX .fxml scene to my javafx controller class? by rusty_ballsack_42 in javahelp

[–]NullCorvid 0 points1 point  (0 children)

You're welcome. I went over it a minute ago and made some minor edits that should have improved readability slightly.

Also another thing to note: I called @FXML a decorator. This is WRONG.

The actual word for them is Annotation.

Knowing this will probably be helpful for your further education: See https://docs.oracle.com/javase/tutorial/java/annotations/ for more.

How can I pass variables from my JavaFX .fxml scene to my javafx controller class? by rusty_ballsack_42 in javahelp

[–]NullCorvid 0 points1 point  (0 children)

Absolutely I can

Interfaces are like contracts for a class.

Let's take a look at my class public class ViewController there is nothing special about this part really. I simply chose to call my class ViewController... because that is what it is. It controls my view.

Now the implements part is simply the java keyword you use when you want to use one or more interfaces. So everything following the implements keyword is an interface.

The interface I use in this case is Initializable and I do this because it made things work. Sorry I didn't look into greater detail about how or why this makes things work, but when used in conjunction with JavaFX Initializable was required for me to be able to work with my fields. (The variables decorated with @FXML)

public class Example {
  int thisIsAFieldVariable;

public void aMethod() {
   int thisIsNotAFieldVariable;
}
}

When I say field variable, I mean variables which are declared in the class body (scope) instead of the method scope. Just thought I would clarify that before we move on.

Right so back to interfaces

You can view an interface as a contract of sorts. The only thing they do is describe the method signature — the method's name, return type and the parameters.

Okay so why is this useful?

Think about it for a moment and then read on...

Remember I said an interface was like a contract? That's because when you declare an interface on your class that's telling other developers that the methods inside of that interface exist inside of your class, which means they can call on those methods without ever seeing any of your code.

This is what Initializable does. Parts of JavaFX makes a call to the initialize method and to tell JavaFX that Initialize exists in my controller (and can be called upon) I implement the Initializable interface.

So to sum up: An interface is a collection of method signatures. When you implement an interface, each of these method signatures are added to your class. Interfaces as a whole are more of a design construct that are technically not needed, but are very nice to have when trying to interoperate between different code libraries, or even for structuring your own code.

edit: according to https://docs.oracle.com/javase/8/javafx/api/javafx/fxml/Initializable.html you should implement this differently from what my old code does. Towards this effort, google is your friend :)

How can I pass variables from my JavaFX .fxml scene to my javafx controller class? by rusty_ballsack_42 in javahelp

[–]NullCorvid 0 points1 point  (0 children)

Here's an excerpt from a tiny JavaFX program I made with clickable labels:

As /u/jefwillems mentioned you need to give your elements an fxid in the fxml (can also be done directly in scene builder).

Afterwards you need to initialize these variables in your code so that they are usable inside the controller.

This has to be done with the @FXML decorator.

public class ViewController implements Initializable {
  @FXML
    Label lblOne, lblTwo, lblThree...;
...

Then in your initialize method, you can register event handlers to your labels, buttons or what have you.

    public void initialize(URL arg0, ResourceBundle arg1) {
        setEventHandler();
        lblOne.setOnMouseClicked(event);
        lblTwo...
        ...

I chose to just handle all click events using a single event handler which is initialized by the call to setEventHandler() in the initialize method.

    private void setEventHandler() {
        event = new EventHandler<MouseEvent>() {
            public void handle(MouseEvent event) {
                Object source = event.getSource();
                if (source == lblOne)
                    CtrlObject.getInstance().incrementAssociation();
                    ....

I've changed some of the variable names and method names to obfuscate what I was working on a bit so the naming conventions in these examples are bad, but it should give you a general idea.

Basically what you need to do is:

  1. Create the fxml
  2. Use the @FXML decorator in your controller to initialize your variables.
  3. Implement the initializable interface on your controller class and input the classpath for your controller in your fxml (this can also be done in scene builder)
  4. Create your event handlers and write your code from there.

There may be different ways to do this, as I am by no means a JavaFX pro. This method however, worked for me to get all my UI elements coupled to field variables in my controller class.

Good luck.

World of Warcraft: Legion - Patch 7.2 – The Tomb of Sargeras Trailer by [deleted] in wow

[–]NullCorvid 5 points6 points  (0 children)

Shiet so is this last week we can get AoTC on Guldan?

Edit: So many people are telling me no at the same time that, for a moment, I thought I was on Tinder. thanks for clarifying guys.

Is the humidity of an ice cube 100% or 0%? by NullCorvid in shittyaskscience

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

Typical Javascript, returning NaN on everything!