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 |
|
|
|
|
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:
|
|
|
|
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
|
|
|
|
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
|
|
|
|
Rank: Member
Groups: Guest
Joined: 11/20/2005(UTC) Posts: 3
|
|
|
|
|
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.