Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!

Hosh Nasi

Ranch Hand
+ Follow
since Sep 10, 2004
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Hosh Nasi

Yes stan for some reason I believe '\\t' is also spliting whitespace. I would think there would be a tab object. However.. No luck.
15 years ago
I need to parse strings from a TDF filethat contains fields of sentences.. example



Up until recently I had just put an underscore in the all spaces. However I want it to work right without that workaround. First is it possible to only token by tabs? if so how? This is what I have been trying.



thanks guys!
15 years ago

Originally posted by Vlado Zajac:
You can use html in Swing components.

will be displayed in two lines.



I tried to test this is many ways. No luck however, now all I see is the my tags <HTML><BR></HTML> when I expect a new line.

thanks,
15 years ago
Very interesting. So if I user the br to to break the row will this display in my JTable?

thanks,

::EDIT:: I mean display within my JTable that is on my Gui.
[ January 30, 2005: Message edited by: Hosh Nasi ]
15 years ago
Sorry about that. I am using jTable not the borland implemenation.. Does anyone have any ideas on this one? I heard a CellRenderer might be useful. Anyone have a good link on how to use them?

Thanks!
15 years ago
I have a storageDataSet that is being displayed in a GUI through a jTable. The columns are being manipulated by row through a DataRow object. One particular column is a string that is concatinated from many other stings and each string ends in '\n'. How can I get this to be displayed? Right now the returns are just ignored, and all is lumped together.

Thanks!
[ January 27, 2005: Message edited by: Hosh Nasi ]
15 years ago
I got a little farther. I created a Database object and used it to send some SQL commands to the datastore.

However now I am getting errors for having already defined a primary key. How do I make this work?



thank you,
My current project requires me to accept a filepath from a user and create a JdataStore database there. Everything is working fine I can create column objects and add them to my StorageDataSet Object and then add those to my Store object.

However one that simply will not work is setting the index/primary key/RowID. for example:



After setting rowID to true I can still commit duplicate records to the table.. Which in my case is very bad, and I really need to replace the currently held record with the new inserted on.. Can anyone point me in the right direction? If you need more info let me know

Thanks!!
I am very perplexed.. I am not sure where the error handleing is happeing within my program. I have put in many break points and added diffrent dialog boxes to test which exception path is being followed but nothing works I am confused..

As you can see the blanket exception catch has a diaglo message before the printstack. However this is never displayed.



[ November 02, 2004: Message edited by: Hosh Nasi ]

[ November 02, 2004: Message edited by: Hosh Nasi ]
[ November 02, 2004: Message edited by: Hosh Nasi ]
15 years ago
Thanks guys for the replies. Upon further inspection I have learned that when the program does in fact throw the JDataStore dupplicate error it automatically selects the row with the dupe data. I can attribute this to only two things.

1. JDataStore inputs data row by row from the resultset.
2. There is some kind of internal handle that is using the JDataStore error to figure out what record is duped. If that is the case I just need to plug into that..

Part of the TraceStack says

15 years ago
I have a gui program that displays a table and allows users to click on diffrent fields and change the data. Almost all these fields are unique to one record though. If the use input a duplicate unique value and tries to comit the changes the database throws an error that basically does nothing but say "Dupplicate key" What I want to do is put the cursor in the second duped field keeping the first one.

It sounds like I am not sure on the exception scheme because I am not. I made this in JBuilder, and I am not very proficiant in Java GUI developement.

Thank you!

**Looks like this is main source of exception catching.**

catch(Exception e) {
e.printStackTrace();
}
[ October 29, 2004: Message edited by: Hosh Nasi ]
15 years ago
I was hoping it would be that easy.. Thanks!
15 years ago
I want to do a simple runtime test on a program I just completed. I am going to iterate through it 1000 times and I want to capture the time at start and at end then subtract them to determine how long the program ran.

I want to basically run it for enough time to see what performance issues it has. Say garbage collection.

thanks!
15 years ago
Sure, the byte array is just filled with some random Ascii/Hex string.



at this point I would want to perform some bit manipulation to pull out some bits that start at bit five and are a size of 8.

so from the string "Random Message #05" or the Binary value of

0101001001100001011
0111001100100011011
1101101101001000000
1001101011001010111
0011011100110110000
1011001110110010100
1000000010001100110
00000110101

pull out = 01001100

and put it into some variable then print it out in Ascii in this example print out "L". The trouble is the size of the pulled out bits needs to be Dynamic. So I can't use a long like I was before, and I am not sure how to do it in a String. I am not even sure I need a Byte array. I just used it because it made my work with other datatypes eassier

Thanks!
[ September 30, 2004: Message edited by: Hosh Nasi ]
15 years ago
I have a byte array created from an ASCII/HEX string and I have the ability to pull out a bunch of bits through bit shifting, and up till recently I was storing these values in a Long variable.

However When it comes to taking these values and storing them in a string and printing them to some kind of Output as ASCII/HEX I am lost.

So recap. I have a byte array and I pull out any number of bits. I want to then print out these bits in an ASCII format.

I tried this multipl ways, nothing is doing what I need it to do, and frankly I think I am going about this wrong..

I have posted a question similar to this, but it was only about going from a Long to ASCII string, which I know now is not long enough in some cases.

Thank you everyone.
15 years ago