Computed Property Error and project Crash


I`m using the pictureViewer sample of Alex Restrepo and unfortunately i cannot find details about him anymore to see the changes from RS to xojo.

I put the project on a dropbox and can be found here pictureViewer and it seems that the code from the computed property it creates error .

I did tested different samples with that computed property and some have same error.

Thanks again and hope that the project will help fixing the error. I will try to debug that and if in case i find a resolution for that i will post it here for helping others that use same code .


If the code Alex posted (which I assume was from long ago)… refers to the GRAPHIC object of a CANVAS control OUTSIDE of the Canvas Paint event… this most likely is the root of the issue. That was problematic then, and not allowed now.

IF that is the issue, it will require redesign and coding of the functions involved.

This is just a guess, since it is a pictureviewer, but I have not the time right now to investigate the code.

It’s allowed, it’s just a slow path that should be migrated away from.

well except the Delta that i have no idea from where it comes , the part where it crashes is in the visible property on the code

pictureCanvas.Visible=value options.Visible=value horizontalScroll.Visible=value verticalScroll.Visible=value

so logically it is just a statement based on the visibility of the container control.

I don`t see the logic here but as you said it needs refactoring , but until that gets done, i need to understand the principle of the current one.

Here is the project with corrections :

Thanks a lot, you saved my day, i will start to look on both to see the changes.

Thanks again.

take a look into property (change visible to mevisible) and in PictureViewer.PictureCanvas.Paint (change if not visible then Return into if not mevisible then Return