Welcome Guest! You need to login or register to make posts.

Notification

Icon
Error

Options
Go to last post Go to first unread
jeanphilippe.doyle  
#1 Posted : Thursday, July 8, 2010 6:02:15 AM(UTC)
jeanphilippe.doyle

Rank: Newbie

Groups: Member
Joined: 7/5/2010(UTC)
Posts: 6

I have setup an Image Uploader according to the provided examples, which mostly works properly with the original settings. Now I would like to use the more user friendly TwoPanes modes but the upload loops on the first picture as the following snippet seems to be buggy with the TwoPanes modes :

deselectAllFiles();
selectFile(1);
u.RemoveFromUploadList();

I have try a few options and look carefully at the documentation but found no notice about the TwoPanes mode and the file upload list management.

I noticed the TreePanes mode is similar but works properly -- I will use it for now.
Dmitry.Obukhov  
#2 Posted : Thursday, July 8, 2010 6:43:59 PM(UTC)
Dmitry.Obukhov

Rank: Advanced Member

Groups:
Joined: 5/29/2010(UTC)
Posts: 1,310

Thanks: 8 times
Was thanked: 111 time(s) in 111 post(s)
Hello,

Thank you for your question.

There is no upload pane in the TwoPanes mode. Thus you should use the following code to get the same effect:
Code:

   if (iu.getControlType() == "Java") {
//For Java version   
 u.setPaneItemChecked(1, false);
   } else {
//For ActiveX version
    u.PaneItemChecked(1) = false;
   }

instead of the code:
Code:

deselectAllFiles();
selectFile(1);
u.RemoveFromUploadList();

If you have any questions, please feel free to let me know.

Edited by user Monday, July 12, 2010 12:04:43 PM(UTC)  | Reason: Not specified

Best regards,
Dmitry Obukhov
Technical Support. Aurigma, Inc.
jeanphilippe.doyle  
#3 Posted : Friday, July 9, 2010 4:08:49 AM(UTC)
jeanphilippe.doyle

Rank: Newbie

Groups: Member
Joined: 7/5/2010(UTC)
Posts: 6

Thanks for the hint but this is not working because the index of setPaneItemChecked(index, value) is not the index of the currently uploaded item. To fix this, I found that you may find the first checked item index like this :

Code:

			// Find first checked item
			var checkIndex = 0
			var items = getImageUploader("ImageUploader1").getPaneItemCount(0)
			for(var i = 1; i < items; i++)
			{
				if(u.getPaneItemChecked(i))
				{
					checkIndex = i;
					break;
				}
			}
			if (iu.getControlType() == "Java") 
			{
				//For Java version   
				u.setPaneItemChecked(checkIndex, false);
			} 
			else 
			{
				//For ActiveX version
			    u.PaneItemChecked(checkIndex) = false;
			}


PS for other developers : notice the difference betwen U an IU : IU is the ImageUploaderWriter class and U is the actual upload controller (Java or ActiveX).

Edited by user Friday, July 9, 2010 4:10:02 AM(UTC)  | Reason: Not specified

Dmitry.Obukhov  
#4 Posted : Sunday, July 11, 2010 2:37:43 PM(UTC)
Dmitry.Obukhov

Rank: Advanced Member

Groups:
Joined: 5/29/2010(UTC)
Posts: 1,310

Thanks: 8 times
Was thanked: 111 time(s) in 111 post(s)
Jean-Philippe,

Thank you for your comment.

If you have any questions, please let me know.

Edited by user Monday, July 12, 2010 12:05:09 PM(UTC)  | Reason: Not specified

Best regards,
Dmitry Obukhov
Technical Support. Aurigma, Inc.
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.