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
natebell  
#1 Posted : Wednesday, June 13, 2007 10:32:36 PM(UTC)
natebell

Rank: Member

Groups: Guest
Joined: 3/28/2007(UTC)
Posts: 56

the method _MakeInactive in the GraphicsMill.BaseViewer.prototype object is giving me an error

what I have done is created a custom button that does some work in our database to set an image as the main image, however, I get this error after the button event fires, the code works fine, the image is selected as the main image just fine, it just gives an error in this Graphics mill file after it is done

it says permission denied, I've tried running FileMon but don't see any permission failures

i'm using ajax to do this, so is there some conflict between Photo Editor and other ajax functions on the same page?

thanks,

Nate

natebell  
#2 Posted : Wednesday, June 13, 2007 11:13:21 PM(UTC)
natebell

Rank: Member

Groups: Guest
Joined: 3/28/2007(UTC)
Posts: 56

when viewing this same action in FireFox, I get no error, so it must be a problem with the ajax code as IE and FF has some differences.

the error is in the Aurigma ScriptResource.axd, so I'm not sure how I can fix the problem.

Dmitry  
#3 Posted : Thursday, June 14, 2007 6:00:32 PM(UTC)
Dmitry

Rank: Advanced Member

Groups: Guest
Joined: 8/3/2003(UTC)
Posts: 1,070

Thanks: 1 times
Was thanked: 12 time(s) in 12 post(s)
Hello,

Could you send us sample application which reproduces the problem?

Sincerely yours,

Dmitry Sevostyanov

UserPostedImage Follow Aurigma on Twitter!

natebell  
#4 Posted : Monday, July 2, 2007 9:42:37 PM(UTC)
natebell

Rank: Member

Groups: Guest
Joined: 3/28/2007(UTC)
Posts: 56

I was able to boil it down to single issue to cause error.

in sample application just add an UpdatePanel control and in it's ContentTemplate add a LinkButton control

(i added mine right under the ScriptManager control in Default.aspx of sample application)

create an OnClick event for this button that simply disables the LinkButton control

clicking the link will throw the permission denied error that I am getting.

I am trying to use ajax to update some photo data back to our database, but I am getting this error when I try to put more ajax buttons on the page

hopefully this reproduces the problem as I have found it

natebell  
#5 Posted : Thursday, July 5, 2007 2:42:50 AM(UTC)
natebell

Rank: Member

Groups: Guest
Joined: 3/28/2007(UTC)
Posts: 56

has this reproduced the problem?
Sergey Peshekhonov  
#6 Posted : Thursday, July 5, 2007 7:59:16 PM(UTC)
Sergey Peshekhonov

Rank: Advanced Member

Groups: Guest
Joined: 6/5/2007(UTC)
Posts: 57

Hello, Nate!

We confirm the problem, this issue wil be resolved in the next release.

Sincerely yours,

Sergey Peshekhonov.

Aurigma Technical Support Team.

natebell  
#7 Posted : Thursday, July 5, 2007 10:20:29 PM(UTC)
natebell

Rank: Member

Groups: Guest
Joined: 3/28/2007(UTC)
Posts: 56

Sergey,

while this fix is being worked, what would a good temporary solution be? the reason we wanted to use ajax for our buttons is so that it does not interfere with the image editing. if we take away ajax then it will ask the user if they want to navigate away from the page everytime they use our buttons and have already started editing the image.

for now I'll just set the PhotoEditorController object's ShowExitMessage property to False and try putting a message on my custom button and onunload of the window. any pointers to check if a change has occurred? my guess is if I can access the EditingOptions and check if it is empty or not, would that tell me if the image has changed?

thanks for looking into this for me

Nate

Sergey Peshekhonov  
#8 Posted : Sunday, July 8, 2007 5:31:48 PM(UTC)
Sergey Peshekhonov

Rank: Advanced Member

Groups: Guest
Joined: 6/5/2007(UTC)
Posts: 57

Hello, Nate.

To get know whether some effect was applied you can use property named Changed in PhotoEditorController on the server side. So, you can use for example the following code:

Code:
if (PhotoEditorSample1.PhotoEditorController.Changed)
{
   ...
   ... do something ...
   ...
}

On the client side you can use event named changed to get information about image changing.

Code:
Sys.Application.add_load(function() {	
    var controller = $find(<% = "\"" + PhotoEditorController1.ClientID + "\"" %>);
    var changed = false;
    controller.add_changed(function() {
        changed = true;
    });
    // ... use changed variable ...
});

The problem with UpdatePanel will be resolved with the next minor release which will be available soon. If you need for this update now, please submit case.

Edited by user Thursday, May 22, 2008 6:42:29 PM(UTC)  | Reason: Not specified

Sincerely yours,

Sergey Peshekhonov.

Aurigma Technical Support Team.

natebell  
#9 Posted : Sunday, July 8, 2007 11:51:23 PM(UTC)
natebell

Rank: Member

Groups: Guest
Joined: 3/28/2007(UTC)
Posts: 56

ShowExitMessage is set to false but I still get the following message:

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

Windows Internet Explorer

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

Are you sure you want to navigate away from this page?

Changes are not saved.

Press OK to continue, or Cancel to stay on the current page.

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

OK Cancel

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

I was hoping ShowExitMessage="False" would suppress this, it seems to happen just before the window is closed

Sergey Peshekhonov  
#10 Posted : Monday, July 9, 2007 6:54:19 PM(UTC)
Sergey Peshekhonov

Rank: Advanced Member

Groups: Guest
Joined: 6/5/2007(UTC)
Posts: 57

Unfortunately we cannot duplicate your issue. Could you submit case woth complete sample application which reproduces the problem?

Edited by user Thursday, May 22, 2008 6:40:50 PM(UTC)  | Reason: Not specified

Sincerely yours,

Sergey Peshekhonov.

Aurigma Technical Support Team.

natebell  
#11 Posted : Monday, July 9, 2007 10:17:38 PM(UTC)
natebell

Rank: Member

Groups: Guest
Joined: 3/28/2007(UTC)
Posts: 56

Which message is ShowExitMessage?

All I did to reproduce it was take sample application and change ShowExitMessage to False. I get the same message if it is set to True or False. So I don't know what that does. I just changed the Photo then went to close the window and it asks the same message both times.

Let me know if it is the same for you.

Thanks,

Nate

natebell  
#12 Posted : Tuesday, July 10, 2007 6:24:53 AM(UTC)
natebell

Rank: Member

Groups: Guest
Joined: 3/28/2007(UTC)
Posts: 56

Sergey,

I applied the changes in the PhotoEditor/scripts and bin directories. This fix seems to fix the error problem with the ajax buttons, but a new issue has come up, the cancel changes button doesn't seem to be working, it no longer gets activated when i change the image.

Let me know if you notice same issue, if not I'll try to boil it down to reproduce it for you.

Thanks,

Nate

Edit: http://www.origma.ru/Forums/FindPost6784.aspx is link to post

Sergey Peshekhonov  
#13 Posted : Tuesday, July 10, 2007 4:59:28 PM(UTC)
Sergey Peshekhonov

Rank: Advanced Member

Groups: Guest
Joined: 6/5/2007(UTC)
Posts: 57

Hello Nate.

Yes, ShowExitMessage allows to show "Changes are not saved" message. Thanks for your description of "ShowExitMessage" bug, we have reproduced it and resolution of this issue will be available with next minor release. We will send a link to updated version of the product by email today.

As for problem with "cancel all changes" button I tried to reproduce it in the following way:

1. install PhotoEditorFull.msi;

2. install PhotoEditorSample;

3. replace all files in bin and PhotoEditor/Scripts directories with files which you have downloaded from our site;

4. add the following code to Default.aspx after ScriptManager:

Code:
<asp:UpdatePanel runat="server" ID="UpdatePanel1">
    <ContentTemplate>
        <asp:Button runat="server" ID="Button1" OnClick="Button1_Click" Text="blabla" />
    </ContentTemplate>
</asp:UpdatePanel> 

5. add the following code to Default.aspx.cs:

Code:
protected void Button1_Click(object sender, EventArgs e)
{
    Button1.Text = "TTTTTT";
}

But it does not reproduce the problem. Please, could you modify this sample or send us application which reproduces the issue?

Edited by user Tuesday, December 18, 2007 2:15:29 AM(UTC)  | Reason: Not specified

Sincerely yours,

Sergey Peshekhonov.

Aurigma Technical Support Team.

natebell  
#14 Posted : Tuesday, July 10, 2007 10:13:54 PM(UTC)
natebell

Rank: Member

Groups: Guest
Joined: 3/28/2007(UTC)
Posts: 56

Sergey,

with the sample app that I have, the UpdatePanel fix is not in it. I applied the fix for it, but had to change things to get it to compile. Once I got it to compile I reproduced the problem by:

* rotate the image, cancel changes button is now active (correct)

* click the blabla button, text is changed on button (correct), but cancel changes button is now inactive (incorrect), no message received about changes (correct)

* close window, I get message saying I have unsaved changes (correct)

It would probably be best if we can both start with a sample app that has the fix from 2007.07.11 that Tatyana sent me. I will try using that as my sample app and start there and add your button.

thanks,

Nate

natebell  
#15 Posted : Tuesday, July 10, 2007 10:26:01 PM(UTC)
natebell

Rank: Member

Groups: Guest
Joined: 3/28/2007(UTC)
Posts: 56

Sergey,

I started with sample app that Tatyana sent me 2007.07.11 it seems to include the button and update panel already.

I ran app and rotated the photo, then clicked the blabla button. Doing this disables the Cancel Changes button incorrectly, and when I closed the window it did not ask me about unsaved changes (edit: correct because it is set to false).

So the blabla button breaks the cancel all changes button, even if I change the photo again, the cancel all changes button is still disabled, so something is happening to the cancel all changes button's state.

hope this helps, and reproduces the problem,

Nate

Sergey Peshekhonov  
#16 Posted : Wednesday, July 11, 2007 6:19:55 PM(UTC)
Sergey Peshekhonov

Rank: Advanced Member

Groups: Guest
Joined: 6/5/2007(UTC)
Posts: 57

Nate,

Just replace the following code in PhotoEditorSample.ascx:

Code:
Sys.Application.add_load(function() {
    <% = ClientID.ToString() %>_changed = function() 
    {
        var butRestore = document.getElementById(<% = "\"" + butRestore.ClientID + "\"" %>);
        butRestore.disabled = false;
    }
    ...

with

Code:
Sys.Application.add_load(function(e, t) {

    if (t.get_isPartialLoad()) return;

    <% = ClientID.ToString() %>_changed = function()
    {
        var butRestore = document.getElementById(<% = "\"" + butRestore.ClientID + "\"" %>);
        butRestore.disabled = false;
    }
    ...

And replace:

Code:
// WORKAROUND for disabled elements in IE.
// Using Ms.Ajax we get exception on disabled input element.
// To prevent it we disable bubbling of events.
if (Sys.Browser.agent == Sys.Browser.InternetExplorer) {
    butRestore.parentNode.onmouseup =
    butRestore.parentNode.onclick = function()
    {
        if (butShow != window.event.srcElement) {
            window.event.cancelBubble = true;
        }
    };
}

with:

Code:

// WORKAROUND for disabled elements in IE.
// Using Ms.Ajax we get exception on disabled input element.
// To prevent it we disable bubbling of events.
if (Sys.Browser.agent == Sys.Browser.InternetExplorer) {
    butRestore.parentNode.onmouseup =
    butRestore.parentNode.onclick = function()
    {
        if ((window.event.srcElement != butShow) && (butRestore.disabled)) {
            window.event.cancelBubble = true;
        }
    };
}

I hope this will resolve this problem. If you have some functions which are called from Sys.Application.load event you should add the following code to the beginning of each one:

Code:
if (t.get_isPartialLoad()) return;

Because load event is fired every time when some part of page is updated, but we need to call this function just once when the whole page is loaded.

Edited by user Thursday, May 22, 2008 6:41:39 PM(UTC)  | Reason: Not specified

Sincerely yours,

Sergey Peshekhonov.

Aurigma Technical Support Team.

natebell  
#17 Posted : Wednesday, July 11, 2007 8:31:04 PM(UTC)
natebell

Rank: Member

Groups: Guest
Joined: 3/28/2007(UTC)
Posts: 56

Sergey,

This seems to be the missing piece thanks!

Thanks for the tip on the AJAX loading, that will help me understand it more.

Nate

Users browsing this topic
Guest (2)
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.