You are not logged in.

Search results

Search results 401-420 of 500.

Dear visitor, welcome to Jabaco - Community. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

Thursday, July 23rd 2009, 2:00pm

Author: A1880

Save RTF File

Hi, if you "save" your RichTextBox before it has an EditorKit attached to ist, this exception can happen. Please consult the LoadRTF() code how to attach a proper RTFEditorKit. If you "load" before you "save", everything should be OK. I am no expert in Java Swing. If I look at the Swing samples around the Internet, I'd rather leave it that way! It could be one of the big merits of Jabaco to hide away the Swing secrets from ordinary developers. Cheers! A1880

Thursday, July 23rd 2009, 1:12pm

Author: A1880

Save RTF File

Hi, my version compiles free of bugs in my Jabaco 1.4.2. What kind of bugs did you see? Make sure that you use a full path for your file name. Sample: "c:\myFiles\test.rtf". Otherwise, you have to rely on your program to be executed in the corrrect working directory. Success! A1880

Thursday, July 23rd 2009, 1:06pm

Author: A1880

DateDiff, DateSerial

Hi, außer an der Sommerzeit kann es auch an der aktuellen Zeitzone liegen, die Dein System annimmt. Zur Kontrolle: Source code 1 2 3 4 5 6 7 8 9 Dim tz As TimeZone Dim dst Dim calendar = java#util#Calendar.getInstance tz = TimeZone.getDefault dst = (calendar.get(java#util#Calendar.DST_OFFSET))/1000 Label1.Caption = now & " " & tz.getDisplayName & " " & dst & "s" Bei Deiner DateDiff-Implementierung gibt es noch einen Haken: Man kann die Zeitdifferenzen nicht einfach auf einen Faktor zurückführen....

Thursday, July 23rd 2009, 12:12pm

Author: A1880

Save RTF File

Hi, my suggestion: Source code 1 2 3 4 5 6 7 8 9 Public Sub SaveRTF(RTB As RichTextBox, RTFFileName As String) Dim fos As New FileOutputStream(New File(RTFFileName)) Dim Doc As Document = RTB.Parent.getDocument Dim kit As EditorKit = RTB.Parent.getEditorKit Call kit.Write(fos, Doc, 0,0) fos.close End Sub You might want to add an "option explicit" as first line of your code to help detecting/preventing errors. Cheers! A1880

Wednesday, July 22nd 2009, 12:16pm

Author: A1880

How to read multi lined documents

Hi, sorry, but I haven't been able to find a simpler solution for your LoadFile() question: Source code 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 Option Explicit Import javax#swing#text#rtf Public Sub Command1_Click() Dim kit As RTFEditorKit Dim doc As DefaultStyledDocument Dim fis As FileInputStream kit = Cast(RichTextBox1.Parent.getEditorKitForContentType("text/rtf"), RTFEditorKit) doc = Cast(kit.createDefaultDocument, DefaultStyledDocument) fis = New FileInputStream(New File("test.rtf")...

Monday, July 20th 2009, 7:39pm

Author: A1880

Control arrays LBound

Hi, looking through the de-compiled code of an array-of-controls sample, I've found that LBound() is actually correct returning 0. The error is that the array is always created with LBound() 0 in the first place regardless of the index figures declared in the form. So, an easy workaround is to actually use a zero-based index interval 0..n If you do insist on a non-zero limit, you can use something like "Redim Preserve Command1(11 To 12)" in your Form1.Load() routine. For Manuel's to-fix list: th...

Sunday, July 19th 2009, 3:27pm

Author: A1880

VB6 editing features missing in Jabaco: automatic case changes in variable names; automatic space insertion

Hi, VB6 changes the case of variable names to yield a unified source appearing. This feature was raising some dispute, but I would love to have it back in Jabaco. In the same direction goes the auto-insertion of space characters. From "a=b+1", VB6 would automatically make "a = b + 1". Likewise, VB6 adds spaces in numerous other places. Perhaps a matter of taste, but very helpful for me! Cheers A1880

Saturday, July 18th 2009, 9:55pm

Author: A1880

ZOrder, CTRL+A, TabIndex, Fonts

Hi again, you can select multiple controls by dragging a selection area across, Deselection with shift click does not work (yet). Well, Jabaco does not reach the full comfort and maturity of VB6 yet. But it is for free. And it helps you to avoid the Java AWD complexity. Do you know of any Java GUI IDE as simple and elegant as Jabaco/VB6? Cheers! A1880

Saturday, July 18th 2009, 9:09pm

Author: A1880

ZOrder, CTRL+A, TabIndex, Fonts

Hi, you've raised valid points. The ZOrder issue can be solved as discussed here. Regards A1880

Sunday, July 5th 2009, 11:35pm

Author: A1880

Rectangle2D.Float missing

Hi, there are several reasons for the "." as unified separator: 1.) I always seem to get it wrong selecting the proper separator. Maybe I have not properly understood the underlying concepts (namespaces vs. classes) 2.) All other programing languages familiar to me are using "." 3.) "#" and "$" are typically used for other purposes: - c/c++ uses "#" to indicate meta commands like #include and #define - "$" is often used to indicate variables - "$" relates to strings in VB6 4.) I can't see any ad...

Sunday, July 5th 2009, 7:36pm

Author: A1880

Rectangle2D.Float missing

Good to know, how to access nested classes. I am dreaming of a future Jabaco which will use simple periods "." rather than "#" and "$". Cheers! A1880

Sunday, July 5th 2009, 12:45pm

Author: A1880

Rectangle2D.Float missing

Hi, "Float" is a nested (or inner) class defined in Rectangle2D. Nested classes should be supported from Jabaco 1.4.2 onwards. Are you stil using the 1.4.0 version? Then an update should be your remedy. But "Float" is invisible in the 1.4.2 project class reference tree. So, there might be some gap in Jabaco. A workaround could be to invent your own sub-class of Rectangle2D: Source code 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 ...

Friday, July 3rd 2009, 11:21am

Author: A1880

Could not find the main class: Module1. Program will exit

Hi, on my Windows PC, I have no references to Java in environment variables like JAVA_HOME or PATH. So, Jabaco seems to take the Windows registry as pointer to the current Java installation. On my system: Source code 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 [HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment] "CurrentVersion"="1.6" "BrowserJavaVersion"="1.6.0_10" "Java6FamilyVersion"="1.6.0_10" ... [HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment\1.6] "JavaHome"="C:\\Progr...

Friday, July 3rd 2009, 12:11am

Author: A1880

Could not find the main class: Module1. Program will exit

Hi, if you create a new SDI Application project in Jabaco, you automatically get a Form1 and a Module1. Content of Module1 by default: Source code 1 2 3 4 5 6 7 8 Public Form1 As New Form1 Public Sub main(ByJava args() As String) Dim myArgs() As String myArgs = args Form1.SetDefaultClose() Form1.show() End Sub Content of Form1 for a little test: Source code 1 2 3 Public Sub Command1_Click() msgbox "hello world!" End Sub I have absolutely no clue what could have gone wrong in your first step. The...

Wednesday, July 1st 2009, 7:32pm

Author: A1880

Considering the move to Jabaco

You might select the form with the ... ... biggest *.frm/*.bas source file(s) ... highest number of interdependent source files ... highest number of "declare" statements to access external DLLs ... most complicated createObject/getObject construction to access ActiveX/OCX objects ... highest number of controls ... trickiest database access ... most advanced graphics output Good choice! A1880

Wednesday, July 1st 2009, 10:46am

Author: A1880

Dynamic Arrays in Structures possible?

Hi, the following example works in VB6: Source code 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 Option Explicit Private Type MYTABLE Name As String Bytes() As Byte 'pointer to dynamic array Value As Long End Type Private Hallodri() As MYTABLE 'dynamic array Private s As String Private Sub sh() Dim lb As Integer Dim t As String lb = LBound(Hallo...

Tuesday, June 30th 2009, 8:57pm

Author: A1880

Considering the move to Jabaco

Hi, well, give it a try and port your hardest form from VB6 to Jabaco to get an impression ;-) The issue of arrays of controls has been discussed here. The latest Jabaco beta version 1.4.2 is capable to handle arrays of controls See the feature list. There is no real handbook, but the Jabaco community will give you a helping hand and answer your questions. Success! A1880

Saturday, June 27th 2009, 2:56pm

Author: A1880

Working directory

Hi, Jabaco 1.4.2 creates a project specific temporary working directory under "%TMP%" (or %TEMP%? example: C:\...\tmp\Jabaco10393078 ) This is better than the central temp directory used before under ..\program files\jabaco\temp However, the created directories are not cleaned up properly. They should be deleted, once the IDE gets closed. Regards A1880

Saturday, June 27th 2009, 2:51pm

Author: A1880

Backslash

Hi, in 1.4.2, I can't enter backslash "\" in the code window. As a workaround, I enter ALT 92 via numpad. Regards A1880

Saturday, June 27th 2009, 2:43pm

Author: A1880

Beta 1.4.2: Call Close(hFile) funktioniert nicht mehr

Hallo, folgendes funktioniert bei mir: Source code 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 Public Sub Command1_Click() Dim hFile As VBFileHandler Dim fileName As String fileName = system.getenv("TMP") & "\test1.tmp" hFile = open(fileName) hFile.writeString "ein Test" hFile.close hFile = open(fileName) msgbox hFile.Filename & ": " & hfile.readLine hFile.close End Sub Merkwürdigerweise kann ich neuerdings in Jabaco keinen Backslash "\" mehr eingeben. Als Workaround gebe ich Alt 92 über den...

WoltLab Burning Board