You are not logged in.

Search results

Search results 41-60 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.

Tuesday, March 22nd 2011, 10:41pm

Author: A1880

Exceptions

Here is a simple example: The Jabaco code Jabaco Source 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 Option Explicit Public Sub Command1_Click() Dim tb As TextBox = Null On Error Goto ErrHandler ' the following line provokes a nullpointer exception tb.Text = "a text" Exit Sub ErrHandler: MsgBox "got it wrong!" End Sub The de-compiled Java code: Source code 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 Couldn't fully decompile method Command1_Click Couldn't resolve all exception handlers in method Command1...

Friday, March 18th 2011, 2:15pm

Author: A1880

formating numbers and decimals

Jabaco's implementation of Format() is not fully compatible to the VB6 format. You can use your own formatting function from the Java API as follows: Jabaco Source 1 2 3 4 5 6 7 8 9 10 11 12 13 14 Option Explicit Public Sub Command1_Click() Debug.Print "1.414 " & nformat(1.414, "#.#") Debug.Print "0.99 " & nformat(0.9937, "##.0###%") End Sub Public Function nformat(value As Double, Format As String) As String ' see http://download.oracle.com/javase/6/docs/api/java/text/DecimalFormat.html Dim df ...

Thursday, March 17th 2011, 3:05pm

Author: A1880

Outlook On Jabaco Using JACOB

Great! I tried it with Outlook 2007. It worked without problems. A slightly reformatted version which makes use of the import statement: Jabaco Source 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 Option Explicit Import com#jacob#activeX Import com#jacob#com Public Sub JSendEmailFromOutlook( cTo As String, cSubject As String, cBody As String, Optional arrAttachments() As String, Optional lReadReceiptConfirmation As Boolean...

Wednesday, March 16th 2011, 9:02am

Author: A1880

Outlook On Jabaco Using JACOB

As far as I know, the red snippets cannot be migrated to Jabaco. The reason is that Jabaco does not support passing Java arrays as parameters when calling a method. One could write the code in question in Java, export it into a Jar file and import this into the Jabaco project. To simply send mails from a Jabaco application, you could use an external tool like blat Using the "Interaction.Shell()" method, such external tools can be started as subprocess of your application. Have fun! A1880

Tuesday, March 15th 2011, 5:11pm

Author: A1880

Outlook On Jabaco Using JACOB

This code snippet is using Outlook as ActiveX control. This is not directly feasible in Jabaco. Jabaco does not offer direct support for ActiveX. JACOB (= Java COM Bridge) can be linked into Jabaco programs. Use the search facility of this forum to find a JACOB/Jabaco sample. Another option would be to use a Java-based mailing framework. Please post your findings! A1880

Saturday, March 12th 2011, 6:05pm

Author: A1880

Project continuity is a valid concern.

The Jabaco project actually consists of two parts: the Jabaco IDE and the Jabaco framework. The IDE was developed by Manuel Siekman. The source is not open. External contributions to the IDE have to be handled by Manuel. The framework - although also developed by Manuel - is now open source. There is a Google site where enthusiasts can look at and work on the code. Unfortunately, the creation of new Jabaco.jar framework files is complicated and troublesome. Manuel Siekman provides the www.jabaco...

Saturday, February 26th 2011, 12:23pm

Author: A1880

What is a good program structure?

The idea of the TabStrip is to add one usercontrol per Tab as explained here. Then you can use the event handlers of the user controls to find out what Tab has been clicked. Please correct me if I'm wrong. I haven't tried this myself yet. Greetings A1880

Friday, February 25th 2011, 10:24am

Author: A1880

What is a good program structure?

The object-oriented way to launch an activity in object A from within object B is to implement a public method in A and call it from B. To do that, you have to pass B a reference to A. If the objects are forms and controls, the situation is rather static and the object references can be passed during initialization. During my experiments with Jabaco I've come across one pecularity of Java swing: event handlers of controls have to make sure that they don't spawn follow-up events. I used flag vari...

Thursday, February 24th 2011, 8:37am

Author: A1880

What is a good program structure?

You could write an init() method per UserControl to tell this usercontrol about the other controls it is supposed to interact with. Using init() you could pass objects to the usercontrol. These objects are then stored as local private variables of the usercontrol. Another approach is to use global variables. If you declare a variable as public in a Module, this variable becomes visible everywhere. You might want to have a look at the SplitPane control. Use the forum search facility to find detai...

Wednesday, February 23rd 2011, 7:40pm

Author: A1880

Sense of VBArray?

Yes, the same question occurred to me. It might have been better to go for pure Java arrays. But I'm not sure regarding the implications in terms of compatibility. Greetings A1880

Wednesday, February 23rd 2011, 3:42pm

Author: A1880

jbgrid

To get a reaction of JBGrid, the JBGrid1 control has to have the "focus". I am not sure how to set the focus automatically. To find out what is happending, you could add event handlers and issue "debug.print" statements which show the presence of the events. As mentioned in my previous post: It takes additional thought and experiments to get this to work. What do you want to achieve? A 0% mouse and 100% keyboard usage? A1880

Wednesday, February 23rd 2011, 3:21pm

Author: A1880

jbgrid

Yes, that is what I was trying to demonstrate with my sample. The "JTable.autoStartsEdit" property is responsible for how the JTable in JBGrid reacts on keyboard events. It probably takes some experiments to get this to work properly. Read the source code of JBGrid in the Jabaco framework to find out about the inner workings. Greetings A1880

Wednesday, February 23rd 2011, 3:07pm

Author: A1880

Serial Port

First, you have to make sure that all relevant jar files are actually present in the list of project classpath jar archives. "Jar-Archiv" is the german word for "jar archive". The file extension for jar archives is ".jar" by default. Technically, jar files are zip files. You can open them using tools like Winzip or 7zip. The search window in the bottom left of the classpath dialog is used to locate a certain class in the hierarchy of the various jar files. Example: Searching for "Boolean" will s...

Wednesday, February 23rd 2011, 10:07am

Author: A1880

Serial Port

The search facility of the project classpath dialog is meant for classes. You entered a filename rather than a class. Be aware of Jabaco's Cast() operation. You might need it to convert object types. Use the forum search to find examples for Cast(). I can imagine that "this is a little complex". This is always the case for Java libraries involving native routines with hardware access. Good luck! A1880

Tuesday, February 22nd 2011, 11:39am

Author: A1880

Serial Port

You have to add all necessary *.jar archives to the project classpath. Use Key F1 in the Jabaco IDE, followed by "add Jar-Archive". You can check if a class is known by using the search function in the project classpath dialog. Success! A1880

Monday, February 21st 2011, 4:12pm

Author: A1880

jbgrid

The "Parent" of a JBGrid is a JTable which knows ClientProperties. Look at the following sample: Jabaco Source 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 Option Explicit Public Sub Form_Load() Dim row As Integer Dim col As Integer Dim rowIndex As Integer = 2 Dim columnIndex As Integer = 3 JBGrid1.Parent.putClientProperty "JTable.autoStartsEdit", java#lang#Boolean.TRUE JBGrid1.Cols = 4 JBGrid1.Rows = 16 JBGrid1.SelectionMode =...

Monday, February 21st 2011, 8:48am

Author: A1880

Error: Java.lang.NoSuchMethodError

VB.JBCLookAndFeel has the following source: Jabaco Source 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 Implements IJabacoClass Public Sub Class_Initialize Call setDefaultLookAndFeel() End Sub Public Sub setDefaultLookAndFeel() setLookAndFeel( getSystemLookAndFeelClassName() ) Dim myOS As String = LCase(SysInfo.OperatingSystem) If InStr(1, myOS, "windows") > 0 Then If SysInfo.SecurityMode = False Then 'If LCase(myOS) <> "windows vista" Then Call net#java#plaf#LookAndFeelPa...

Saturday, February 19th 2011, 6:10pm

Author: A1880

how call javascript from applet

The following applet shows how to pass information between applet and javascript in both ways. The applet Jabaco source: Jabaco Source 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 Option Explicit ' the applet has a Button "cmdSetLocal" Public Sub cmdSetLocal_Click() ' copy text of textbox "tbLocalInput" SetText Me.tbLocalInput.Text End Sub ' the applet has a button "cmdSetRemote" Public Sub cmdSetRemote_Click() Dim s As String Dim...

Friday, February 18th 2011, 9:14pm

Author: A1880

Error: Java.lang.NoSuchMethodError

What is the effect of modifying Module1 to something like this? Jabaco Source 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 Option Explicit Public Form1 As Form1 Public Sub main(ByJava args() As String) Dim laf As String Dim myArgs() As String myArgs = args ' laf = javax#swing#UIManager.getCrossPlatformLookAndFeelClassName() laf = javax#swing#UIManager.getSystemLookAndFeelClassName() ' laf = "com.sun.java.swing.plaf.windows.WindowsLookAndFeel" Debug.Print "laf=" & laf UIManager.setLookAn...

Friday, February 18th 2011, 9:05pm

Author: A1880

Error: Java.lang.NoSuchMethodError

Would it help to define the default look&feel as described here? Greetings A1880

WoltLab Burning Board