« first day (1433 days earlier)      last day (3732 days later) » 

03:44
too li'l people to ask, even less to answer..
 
2 hours later…
05:31
Even less on weekends...
+1
@Unihedron back from school ?
 
2 hours later…
07:29
Yo
07:54
heya
@ItachiUchiha I have been a good boy(man really), and read the blog post
@miniHessel What did you understand ?
@ItachiUchiha Not much really, hahaha
Or I understood that for using multiple controllers you have to bind
and controllers should only access relevant elements.
Ok, no problem, didn't make any sense to me when I read it the first time!
yes, that really good !
But I beleive my drag class is pure bad java design, so ye, not just JavaFX
07:57
No problem with that, now I have one more post for you !
this will enlighten the way you look at JavaFX
But I really can't understand how I should design it in a "proper" way.. As the class is meant for one specific thing?

Should I remove all the specific thngs like " mainFXMLController.mapOverKolonnerOgTreItems.get(treeCell.getTreeItem()).
add(
mainFXMLController.getTablesList().get(hvilkenTabell).listofColumns.get(DRAGGEDINDEX)
);" ?
Don't read the answer or the comments, just read the question stackoverflow.com/questions/26022398/…
We will come to your problem after you are done with this read
okayokay
All I am trying to do is handle a 'open file' operation from the 'root' fxml (which contains a MenuBar) and then pass that file to the other controller, which should 'parse' it and then display it in the designated TextArea. <--- WTF?
So if I understand him correctly, he want to open FXML files ?
@miniHessel compare it with your problem, you were trying to load TreeItem in some other controller and then show it in the main controller
@miniHessel he just wants to popluate a textArea reading a file (that has been created in some other fxml)
Then he needs to pass the textArea from that FXML
08:03
Why the textArea and not the file location ?
@miniHessel you always think in terms of passing the UI controls, instead of passing the data
you mean, I do that, but I sohuld instead think of passing the data?
Okay, then he should just pass the file to the main controller(FXML) where the textarea is.
cool
now how does he do it ?
then he don't have to expose his main controller... and the controller opening the file dosnt really need to know anything about the main controller.
By creating a binding ? :P
08:06
lolz, you read the answer.
I havent
promise!
well then you are very close to the answer
but, I would do it this way;
1. Create a method in the main controller that takes one file
2. In the openFile crap, call that method and pass the file
so a method :
loadFileToTextField(File file){
this.TextField = file.getText() ;
how wud you call the main controller method from the openFile CrapControlleR ?
by doing my stupid intialize crap, that always go wrong...
MainController mainController = new MainController();
mainController.loadFileToTextField(myFile);
08:10
this is what he tried, he was wrong !

EditorOverviewController controller = new EditorOverviewController();
try {
controller.loadXmlFile(xmlFile);
but I guess that's the wrong way to do it.. Instead I should createa a binding.
yes it is the wrong way
coz using this EditorOverviewController controller = new EditorOverviewController();
so my way - is the wrong way.
will always return the TextArea as null
could you explain that once more?
always
ok, then I am with you
Could you explain why it always returns null?
So what we actually did with my example, was to pass the mainController when calling the addDragg method? This makes sure we pass the class, instead of initiating it empty
08:17
Look, we write our controls inside the FXML file, correct ?
you mean this; <AnchorPane id="AnchorPane" minHeight="-Infinity" minWidth="-Infinity" prefHeight="871.0" prefWidth="1311.0" stylesheets="@StyleSheet.css" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="Controller.MainFXMLController">
<children>
yes, the AnchorPane, TextField, all the controls
we define them in the fxml, right ?
<AnchorPane id="AnchorPane" prefHeight="200" prefWidth="320" xmlns:fx="http://javafx.com/fxml/1" fx:controller="client.WindowMainController">
    <children>
        <Button layoutX="126" layoutY="90" text="Click Me!" onAction="#handleButtonAction" fx:id="button" />
        <Label layoutX="126" layoutY="120" minHeight="16" minWidth="69" fx:id="label" />
    </children>
</AnchorPane>
Consider this FXML
its consider will be something similar to
public class WindowMainController implements Initializable {

	@FXML
	private Button button;
	@FXML
	private Label label;
}
Now as its just
`Button button`
and not
`Button button = new Button()`,

how do you think the Button is initialized ?
morning
08:23
@fahdijbeli hya
@ItachiUchiha hi
thinking
Time's up !
Its called as a new button in the 2nd example
in Button button you tell the code that button is the element in the FXML file(so it already exists), you don't initiate it as a new element
@miniHessel so where do you initialize it ??? Inside the constructor ??? Inside the initialize() ??
08:32
Hi people! Here is anyone who worked with Socket ?
@Override
public void start(Stage stage) throws Exception {
Parent root = FXMLLoader.load(getClass().getResource("/View/MainFXMLDocument.fxml"));

Scene scene = new Scene(root);

stage.setScene(scene);
stage.show();
}

/**
* @param args the command line arguments
*/
public static void main(String[] args) {
launch(args);
}

}
First you load your FXML file, then in your controller you say that in your FXML file, there is a button with the name button. You basically reference to an element inside the FXML file.
You don't say anything in the FXML file, it is done @FXML annotation !
You create the element in the FXML file, then in your controller you point to it by using a FXML annotation?
thats what I meant atleast
When you write FXMLLoader.load(getClass().getResource("/View/MainFXMLDocument.fxml"));, the controller is initialized ! A new object of your controller is created and all the elements are initailized !
08:38
On loading the FXML, it does something like this, reading the data from the FXML

button = new Button();
button.setLayoutX(126);
button.setLayoutY(90);
button.setText("Click Me!");
button.setOnAction(...);
all these attributes we specified in the fxml
I have server and client. Client connect to server success and send message. Server receive this message and send response back.
if (inputStream.read(inBuf) > 0) {
processReceivedData(inBuf);
outputStream.writeUTF(inBuf.toString());
outputStream.flush();
}
But on client side nothing happened.
while (!Thread.interrupted()) {
responseLine = inputStream.readUTF();
if (responseLine != null) {
break;
}
Log.e("resp", responseLine);
}
Please help me
@ItachiUchiha lunch break
yep, so we dont have to intialize it in the controller as a new button, as the FXML did this
@Unihedron may be you can help @smail2133
@miniHessel yes, and this reference is binded to the Button in the fxml
@Unihedron please help me
08:40
yep, I am with you! :)
Sorry for spamming chat @smail2133 , hope you get help :)
@smail2133 what's wrong?
@miniHessel So what do you think will happen when I use WindowMainController controller = new WindowMainController(); ?
@ItachiUchiha You are stupid, you should use binding instead :D
@miniHessel and how do I do that ?
@Unihedron please see my prev message
08:41
@ItachiUchiha Just joking, you intialize a new controller, instead of referencing to the exiisting one?
@smail2133 It says: "@Unihedron please help me"
I have server and client. Client connect to server success and send message. Server receive this message and send response back.
if (inputStream.read(inBuf) > 0) {
processReceivedData(inBuf);
outputStream.writeUTF(inBuf.toString());
outputStream.flush();
}
But on client side nothing happened.
while (!Thread.interrupted()) {
responseLine = inputStream.readUTF();
if (responseLine != null) {
break;
}
Log.e("resp", responseLine);
}
Please help me
so... what's wrong?
@ItachiUchiha I believe that depends on what you want to bind?
@smail2133 I don't understand how that code would make anything happen, how are you invoking it?
08:43
@Unihedron When server receive message from client, server send some message back. But message don't receive from client side
@ItachiUchiha For example if you have a textField in another class, then it's NOT a good way to say :

WindowMainController controller = new WindowMainController();
controller.textField.setText("bla");

Instead you should have a String in that second class whos binded to the mainclass textField
@smail2133 gotcha, where's the protocol?
controller.textField.setText("bla"); will give you a nullpointer exception. do you know why ?
to be honest, no
Perhaps because that textField doesn't exist? Since you are "creating" a new controller ?
@miniHessel Nope that textField exists, but it has not been initialized !
08:45
Trying to read them.
@smail2133 stop spamming and use pastie.org to drop long codes
@ItachiUchiha gists are better.
@Unihedron Whatever :P
just dont spam the room
Because you are now speaking to a "new" textField, instead of the existing textField annotated in the main Controller?
@miniHessel here textField is just an attribute of the class
@miniHessel correct !
Bingo !
08:47
@ItachiUchiha okay, thanks and sorry
So you can kind of say that each class(the main and the 2nd) holds it's own local textField
So in my example, instead of doing mainFXMLController.mapOverKolonnerOgTreItems.get(treeCell.getTreeItem()).
add(
mainFXMLController.getTablesList().get(hvilkenTabell).listofColumns.get(DRAGGEDINDEX)
);


I should instead just put that inside a method the main controller and call that method ?
@Unihedron the BOSS of the trash
@ItachiUchiha Do you feel like you are teaching a kid in kindergarten the difference on apples and peaches?
@miniHessel Everyone goes through this phase while trying FXML ! I went through it as well :)
@ItachiUchiha phew
08:51
@Unihedron So, what you can say about my problem ?
I'm still reading your code, it's not really that easy to understand uncommented code.
@Unihedron Sorry about this, I have short time limit to implement it.
@ItachiUchiha but in my example, I can't really create a binding, right?
@smail2133 It still should be commented so you understand it afterwards :)
@miniHessel important just implement, and after maybe refactored and added comments :)
08:58
@ItachiUchiha Is this also foolish then:pastie.org/9593051
@Unihedron what is this ?
@miniHessel where did you get mainFXMLController from ?
@ItachiUchiha Check here for my new approach : pastie.org/9593072
Could be both a breakthrough or a "you just moved the problem elsewhere" :P
atleast now everything in that class has to do with adding functionality for dragg and drop.. If the user drops we call on the method in the main controller to actually add the column to the combined column list
09:15
@ItachiUchiha So, what you can say about my problem ?
@miniHessel where is the handle() located ?? Are you loading your mainController in the same class ?
@smail2133 I say I have no idea !
Sorry @ItachiUchiha The handle is in that DragAbleTreeview class
how are you getting the mainFXMLController reference in DragAbleTreeview class ?
@ItachiUchiha it's bad! Thanks.
From the "thing" you showed me yesterday.
private void addDragAndDrop(TreeCell<String> treeCell, MainFXMLController mainFXMLController) {
09:20
hmm ok !
now i remember
though you can use this approach, this is not the best design
I am getting closer atleast?
Would love some feedback :)
I can't user bindings here, as I am only adding?
for you Treeview is the data
so if you can give it back to the MainFXMLController or bind both the treeviews, you are good to go !
addColumnToCombinedColumn(treeCell, whichTable, whichIndexDragged);

So I should't pass the treecell?
The treeview isn't the data actually, the treeView is only the visual part of it..In the code behind this happens:


List<Kolonne> targetCombinedColumn = mapOverKolonnerOgTreItems.get(treeCell.getTreeItem());
Kolonne sourceDraggedColumn = getTablesList().get(hvilkenTabell).listofColumns.get(DRAGGEDINDEX);
targetCombinedColumn.add(sourceDraggedColumn);
(translated) Kolonne = column, mapOverKolonnerOgTreItems = mapOverColumnsandTreeItems, hvilkenTabell = whichTable
@miniHessel ????????
@ItachiUchiha I make a good explenation
One treeview represents one Table, each treeitem in the treeview represents a column
the user drags one treeitem over to another treeview(a treeview with combined columns).
If the user drops the treeitem(column) on to a tree item that is a "combined" column, I run the method mainController.addColumnToCombinedColumn(treeCell, whichTable, whichIndexDragged);
09:32
Ahh ! Get it !
in the main controller, this is how the method looks:


public void addColumnToCombinedColumn(TreeCell treeCell, int whichTable, int DRAGGEDINDEX) {
List<Kolonne> targetCombinedColumn = mapOverKolonnerOgTreItems.get(treeCell.getTreeItem());
Kolonne sourceDraggedColumn = getTablesList().get(whichTable).listofColumns.get(DRAGGEDINDEX);
targetCombinedColumn.add(sourceDraggedColumn);
}
mapOverKolonnerOgTreItems is just a map over columns and treeitems
Why not bind the Table columns data with the TreeItems data ?
can i? Remember that I have defined what columns and tables is in my own classes called Table and Column
how are you adding you defined column to a tableView, with creating a TableView ?
targetCombinedColumn.add(sourceDraggedColumn);

This basically adds this column to the target Combined Column
09:35
Combined Column ?
yep, a combined column has two or more columns in it.
have two constructors in the column class, one for single column and one for combined
works great actually, runs great as well
Please don't give me TONS of work by saying things sucks!
Its Itachi, not Itacho :P
@ItachiUchiha I know :P
Sorry for the Norwegian comments and labels
@ItachiUchiha by the way, this is 1 and a half month of work, so dont destroy me mentally!
@miniHessel haha
I am not gonna do anything
@ItachiUchiha hope you laugh with me, not the code
@ItachiUchiha I know, I meant verbally
09:42
@miniHessel chill, so hows Norway ?
Cold !
I live in a city with PMS, so rain, sun,rain, sun and it goes on
Its kinda similar weather here
Not a dream situation for a photographer
where's here?
are you a photographer ?
yeps :-)
By the way, do I miss a "model" ? Does every javafx application need to have a model class which holds the data?
09:45
Yes, basically they should as you are using the MVC approach
But the data stored in the Kolonne and Table class can stay there, right?
List<List<Kolonne>> listOfCombinedColumns = new ArrayList<List<Kolonne>>(); So for example this one, does it go in to Kolonne or do I create a model class for it?
hello
@miniHessel What to do after this
@getlost heya !
@getlost Hi there
haha, do you have a database to connect to ?
09:49
nope
then you cant use it actually :P
How about those button on the left, looks wonderfull , right ? :D
@ItachiUchiha that's my first time came to chat
@Unihedron hello
@miniHessel The effect on buttons are good !
@ItachiUchiha woho! something is actually good!
@getlost Hope you understood Map in class today :P
@miniHessel Now that I have your app, I need to understand what exactly is your requirement
09:51
@ItachiUchiha For the whole application, or for the combine part or?
@ItachiUchiha "maps" ?
1. The user connects to a database with his entered connection info
2. The user selects a table and fetch data
3. The data gets shown in a tableView
4. The user is happy, choses visualizations and smiles!
5. The user connects to another database, and fetch data
6. The user thinks, hmmm, I have two tables with column Name, and two with column value, I want to combine those
7. User goes to the combine button, drags columns on to the right tree view you see. The "name " and "adress" you have created are two combined columns. But you have no columns inside them, thats the part where the user dr
@ItachiUchiha different person
@Unihedron yeah
09:56
9. ???
10. profit!
@ItachiUchiha don't confuse
10:40
Hi
There is any convention for error codes?
like 1 for EJBException?
2 for BadRequest?
ASR
ASR
11:11
Hi
@miniHessel I still dont clearly understand point 7.
You have a two tableColumn's with "name" and "address"
ASR
ASR
I am extending SimpleFormController, configured commandClass and spring container is responsible for invoking setter methods by populating the values from the form. But it is not happening, where getter method on command object returns null value.
You understand the need for combining columns, right?
The columns can be dragged into the box
I am currently changing my code to be better btw :P
11:15
and for each drag, you create a tableView?
The user has two tables, both tables has a column named NAME and VALUE
so, you see the need for the user to get ONE tableview with both tables combined, right?
ASR
ASR
I am extending SimpleFormController, configured commandClass and spring container is responsible for invoking setter methods by populating the values from the form. But it is not happening, where getter method on command object returns null value. can anyone help me how to read values from command object.
@ASR never worked on Command Objects
I want reputation but I can't find good questions!
ASR
ASR
@ItachiUchiha ok
11:24
@Unihedron lolz
12:11
Can I @SuppressWarnings("deprecation") on one line of method? Such as wrapping it in a code block, label it and suppress the label (which I've tried but doesn't work)
12:48
@Unihedron I guess that should work
docs.oracle.com/javase/7/docs/api/java/lang/… it says it can be used on @Target(value={TYPE,FIELD,METHOD,PARAMETER,CONSTRUCTOR,LOCAL_VARIABLE})
so you can use it on TYPE or FIELD or LOCAL_VARIABLE
@spoulson heya
@miniHessel a nice question for you to answer stackoverflow.com/questions/26038381/…
FYI it's a void method so I can't make a placeholder field or type...
Then you will have to place it on the top the method name inside which this line of code is written
"As a matter of style, programmers should always use this annotation on the most deeply nested element where it is effective. If you want to suppress a warning in a particular method, you should annotate that method rather than its class." javadocs for SuppressWarnings
I usually make a new method just to wrap the deprecated method line, so I decided to ask if anyone have ideas on how to do it.
I usually make a new method just to wrap the deprecated method line this is not required, but can annotate the method inside which its is used !
I only want to suppress the line. That's the problem. Our project guidelines (which was written by me btw) follows that.
Just so we can look into switching away from deprecated methods easier - they're all annotated in their own lines.
13:02
@ItachiUchiha what is his question really ?
51 mins ago, by Unihedron
Can I @SuppressWarnings("deprecation") on one line of method? Such as wrapping it in a code block, label it and suppress the label (which I've tried but doesn't work)
Cant he just use TableView?
Hello
Hello, hello!
I have a terrible for loop that I could use some tips on.pastie.org/9593553 Any tips?
It's so slow..
it's the fields.addAll(kol.allFields()); that's slow.
13:05
@miniHessel If you ever want to optimize code, avoid loops.
It depends on what fields is and what allFields() returns.
@Unihedron @miniHessel @spoulson A new auto-complete
@ItachiUchiha
Much nicer
no-repro
The old variation was a bit clunky
@Unihedron Refesh the page
13:06
List<String> allFields() {
    return new ArrayList<>(fields);
}
Thats what allFields is
@miniHessel If you ever go for good code, never invoke new in a loop.
thats outside the loop
check here
Today I was doing a code clean up using Sonar, and found that the code has used

ArrayList list = new ArrayList();
@ItachiUchiha Yeah?
13:08
whats rejected ? :o
It was without Generics and without List on the left side. I hate such coders :-X
I dont like eclipse showing me the yellow indicator on a class
@ItachiUchiha There are options for that.
@Unihedron Well it indicates, I like code to be clean :)
Go to preferences, somewhere under code style or compiler warnings, turn them all off
Then get CheckStyle :P
is something I posted rejected?
woot
13:11
@miniHessel do you understand how to find out which message a message is replying to?
then do that?
sorry, understood it now.
had to refresh the page, then it showed.
@Unihedron he doesn't ! He replies me to the message that I had tagged someone else..
13:12
I do now!
Yeah!
cuts himself emo style
I fixed it!
replaced addAll with (int i = 0; i < kol.fields.size(); i++)
Insanely much faster ! stackoverflow.com/questions/21710465/… Here is the reason
1
A: Show profile picture in chat autocomplete

balphaHere you go: I've made multiple improvements to the tab autocompleter: The autocompleter now shows avatars. The autocompleter now shows the user name including spaces (small change, but it looks nicer). The actually inserted name will still be stripped of spaces, of course. The people that s...

13:29
Btw, @itachiuchiba thanks a lot for all your help !
you misspelled the name :(
14:05
Hi! I'm using Socket connect between client and server. And sometimes first character is disappeared. Why and how to fix it ?
Hi every one i need help in android
 
1 hour later…
15:20
hi guys, does anyone know what the best way to do a daily rollover of a fileoutputstream? I was looking at log4j but I'm not too entirely sure how to use it (or if it's even appropriate in this case :/ )
15:52
Hi guys facing some problem with tar inputstream
While reading entries , if entry contains archive with no extension then without throwing exceptions it throws bom characters
Any solution?
16:35
Somebody please explain to me why "new javax.naming.InitialContext()" isn't working in an embedded GroovyShell: pastebin.com/Qv8hAUm0
As far as I can tell, the classloaders are set up as they should be and the class can be loaded manually.
 
2 hours later…
18:32
hey guys
 
3 hours later…
21:43
heya

« first day (1433 days earlier)      last day (3732 days later) »