This forum contains outdated content and is available for reading only. Please contact technical support if you have any questions.

Notification

Icon
Error

Options
Go to last post Go to first unread
jcavaliere  
#1 Posted : Wednesday, November 2, 2005 3:20:32 AM(UTC)
jcavaliere

Rank: Member

Groups: Guest
Joined: 11/1/2005(UTC)
Posts: 8

here's another weird one... I keep gettign an error saying that Strings are not supported as paremeter types

C#

Code:
[Aurigma.GraphicsMill.WebControls.RemoteScriptingMethod]
public void AddMosaic(System.String filterType)
{
	BitmapViewer1.Bitmap.Transforms.Mosaic(10, 10);
}

JavaScript

Code:
function addFilter(filterType)    
{   		
	bitmapViewer1.invokeRemoteMethod("AddFilter",new Array(filterType));		
	bitmapViewer1.addStatusChanged(ProcessUpdates,this);	
}

Error Returned in debug window

Code:
Aurigma.GraphicsMill.WebControls.RemoteScriptingTypeNotSupportedException

The returned type 'System.String' is not supported for the remote scripting marshalling.

Edited by user Sunday, December 23, 2007 4:49:12 PM(UTC)  | Reason: Not specified

cfd_bv  
#2 Posted : Sunday, November 20, 2005 10:36:15 PM(UTC)
cfd_bv

Rank: Member

Groups: Guest
Joined: 11/20/2005(UTC)
Posts: 3

I'm having the same problem. I need send String types, but it fails by timeout. It only works when I send number types and as minimun two elements into array, because if I don't send their by array it doesn't work...... :crying:
cfd_bv  
#3 Posted : Monday, November 21, 2005 3:08:53 AM(UTC)
cfd_bv

Rank: Member

Groups: Guest
Joined: 11/20/2005(UTC)
Posts: 3

I read http://www.aurigma.com/Forums/Topic2580-15-1.aspx, and I try again, but it doesn't work...... :(

When I use:

-----------------------------------------------------------------------------------

[JavaScript]

Code:
function aplicarEfecto(){
    var myArray= new Array();
    myArray[0]="string1";
    myArray[1]="string2";
    bitmapViewerFoto.invokeRemoteMethod("AplicarEfecto", myArray);
}

[Visual Basic]

Code:
Public Function AplicarEfecto(ByVal string1 As String, ByVal string2 As String) As String
    Efectos("DrawingString", 0, 100, 100, 250, 50, "Escribir")
    
    Return getEfectos()
End Funtion

[ERROR]

Code:
Aurigma.GraphicsMill.WebControls.RemoteScriptingTypeNotSupportedException
The returned type 'System.String' is not supported for the remote scripting marshalling.

-----------------------------------------------------------------------------------

When I use number type, it works.

[JavaScript]

Code:
function aplicarEfecto(){
    var myArray= new Array();
    myArray[0]=22;
    myArray[1]=33;
    bitmapViewerFoto.invokeRemoteMethod("AplicarEfecto", myArray);
}

[Visual Basic]

Code:
Public Function AplicarEfecto(ByVal string1 As Int16, ByVal string2 As Int16) As String
    Efectos("DrawingString", 0, 100, 100, 250, 50, "Escribir")
    
    Return getEfectos()
End Funtion

Edited by user Sunday, December 23, 2007 4:50:03 PM(UTC)  | Reason: Not specified

Fedor  
#4 Posted : Tuesday, November 22, 2005 9:16:22 PM(UTC)
Fedor

Rank: Advanced Member

Groups: Guest
Joined: 7/28/2003(UTC)
Posts: 1,660

Thanks: 5 times
Was thanked: 76 time(s) in 74 post(s)
Hello,

I am very sorry for such long answer delay.

The string parameters are really not supported in Graphics Mill 3.1 for .NET. String type is supported only in method return. We will fix it in further versions, but right now you can use either numerical types or use workaround with hidden input field.

For it just declare somewhere in you code hidden input field:

Code:
<input type="hidden" id="filterType" value="">

And then before method call set this hidden field value to your remote scripting method param value:

Code:
function addFilter(filterType)    
{   	
	document.getElementById("filterType").value=filterType;	

	bitmapViewer1.invokeRemoteMethod("AddFilter",new Array());		
	bitmapViewer1.addStatusChanged(ProcessUpdates,this);	
}

After it you can access to posted value of hidden field using usual Request.Form collection:

Code:
[Aurigma.GraphicsMill.WebControls.RemoteScriptingMethod]
public void AddMosaic()
{
	System.String filterType = Request.Form["filterType"];
	BitmapViewer1.Bitmap.Transforms.Mosaic(10, 10);
}

Edited by user Sunday, December 23, 2007 4:50:40 PM(UTC)  | Reason: Not specified

Best regards,

Fedor Skvortsov

cfd_bv  
#5 Posted : Monday, November 28, 2005 8:02:36 PM(UTC)
cfd_bv

Rank: Member

Groups: Guest
Joined: 11/20/2005(UTC)
Posts: 3

thanks
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.