Javascript GetRectValues issue (use by-reference val?)

Feature Requests for GdPicture.NET.
Post Reply
whisper81
Posts: 1
Joined: Tue Dec 04, 2007 9:34 pm

Javascript GetRectValues issue (use by-reference val?)

Post by whisper81 » Tue Dec 04, 2007 9:55 pm

Hi all,

I'm Max from Italy, congratulations for the really nice job done with GdPciturePro product family.

I'm working with gdPicturePro OCX but I'm not able to get over this problem.

My aim is to gather an image from a scanner (done), show the full image through GDViewer (done), get a Selection and crop only the interesting part (no preview available).

I'm working with Javascript invokations of OCX.
All seems to go seamlessy but I'm not able to use the method GetRectValues() on my GdViewer instance.

How can i supply a byReference val as input for this method?

GetRectValues (*nLeft, *nTop, *nWidth, *nHeight)

that's a piece of my code:

oImaging = document.getElementById('gdViewerPro');
oImaging.GetRectValuesObject(top,left,h,w);

where variables has been declared as follows:

var top = new Object();
top = 1; (became a Long variable)

What can I do?
I found no answer on the Web, Javascript cannot supply single variable by reference (a simple trick is to supply an Object, but the target function should access its properties).

Regards

Max

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Post by Loïc » Tue Dec 04, 2007 10:15 pm

Hi Max.

To be honest, I don't know how you can pass several parameters by reference using javascript.

However, into the next release I will add 4 methods:


GetRectX()
GetRectY()
GetRectWidth()
&
GetRectHeight()

I think it will be more easy for you with these new methods
:wink:


Best regards,

Loïc

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest