Java/Active-X control problem

Madina Archives


Madinat al-Muslimeen Islamic Message Board

Java/Active-X control problem
bhaloo
07/20/01 at 02:02:29
slm

My fellow geeks out there, I need help!!!!

Ok, I was writting a program in java making use of the mscomm.ocx that's supplied with VB and I was using the setOuput property of mscomm.ocx.  First of all it needs a Variant and not a string, so I figured out how to create a variant in java.  But now I have my data in a string and I can't transfer it to a variant.  anyone know how to do that?

Re: Java/Active-X control problem
Kashif
07/20/01 at 04:18:39
wa alaikum us-salaam

Isn't it a simple declaration like:

Variant var = new Variant([i]yourString[/i]);
NS
Re: Java/Active-X control problem
Haseeba
07/20/01 at 07:13:02
greaT! i didnt know ne one here was into comp sci next time i need help i'll post the problem
Re: Java/Active-X control problem
bhaloo
07/20/01 at 12:43:36
slm

[quote]wa alaikum us-salaam

Isn't it a simple declaration like:

Variant var = new Variant(yourString);[/quote]

Yeah, hahahha, that was it. :p  Thanks.  But how come in the debugger its not displaying the contents for var???  Its just showing up as 3 dots after that initilization.

Here is my code:
           String str;
           str = edit1.getText();                  
           Variant var =  new Variant(str);
           MSComm1.setPortOpen(true);
           /* Transmit command */
           MSComm1.setOutput(var);      
Re: Java/Active-X control problem
Kashif
07/20/01 at 18:40:07
assalaamu alaikum

Damn it Microsoft. Do you have to do everything so crappy!?


Now i remember. I was using Visual J++ 6.0 when i was coding with the MFC classes, and i had the same problem too. Unfortunately, the debugger doesn't give you the values stored in the object, unless its the very simple classes from the JFC set. This is certainly true with regards to the Swing classes and i'm pretty sure its the same with Variants. But what you may find for Variant is that if you expand the tree (for that object in the debug window) somewhere in there you'll have the information you're looking for, insha'llah.

Anyhow, here is my question for Java Gurus. I'm posting form-data from a HTML page but setting the enctype to 'multipart/mixed' but on the other end it comes thru as 'application/x-www-form-urlencoded.' How come?

Kashif
Wa Salaam
NS


Individual posts do not necessarily reflect the views of Jannah.org, Islam, or all Muslims. All trademarks and copyrights on this page are owned by their respective owners. Comments are owned by the poster and may not be used without consent of the author.
The rest © Jannah.Org