bgrabitmap / lazpaint

🎨 Cross-platform image editor with raster and vector layers similar to Paint.Net written in Lazarus (Free Pascal)
https://lazpaint.github.io/
GNU General Public License v3.0
406 stars 57 forks source link

Compiling in trunk #28

Closed lainz closed 5 years ago

lainz commented 5 years ago

umultiimage.pas(74,30) Error: Only static methods and static variables can be referenced through an object type

circular17 commented 5 years ago

Fixed on dev-vectorial branch, I will merge it soon with dev-bgrabitmap (to solve it locally, simply add static keyword after the called method definition)

lainz commented 5 years ago

Hi, I switched to dev-vectorial and still not working. I added static to the end of the method TFMultiImage.ShowAndChoose and says that static is not allowed here.

lainz commented 5 years ago

Sorry I found the problem was I switched only to dev-vectorial of lazpaint and not to dev-vectorial of bgrabitmap.

circular17 commented 5 years ago

Hmmm I am surprised I believe there is nothing in dev-vectorial of bgrabitmap. In fact I did not intend to create this branch. I created it from LazPaint and from some reason it was added in bgrabitmap too.

And the method TFMultiImage.ShowAndChoose is not meant to be static.

lainz commented 5 years ago

Still not compiling but for another reasons not static, maybe there are files missing?

What combination of branches should I use to test?

circular17 commented 5 years ago

What error do you get?

lainz commented 5 years ago

Using dev-vectorial in both sources I get: ustatetype.pas(1058,19) Error: Identifier idents no member "SaveOriginalToStream" ustatetype.pas(1075,72) Error: Wrong number of parameters specified for call to "AddOriginalFromStream" bgralayers.pas(1262,29) Error: Found declaration: AddOriginalFromStream(TStream):LongInt; ustatetype.pas(1084,65) Error: Identifier idents no member "OriginalGuid" ustatetype.pas(1102,72) Error: Wrong number of parameters specified for call to "AddOriginalFromStream" bgralayers.pas(1262,29) Error: Found declaration: AddOriginalFromStream(TStream):LongInt; ustatetype.pas(1105,64) Error: Identifier idents no member "OriginalGuid" ustatetype.pas(1112,64) Error: Identifier idents no member "OriginalGuid"

circular17 commented 5 years ago

Hmm try setting branch to dev-bgrabitmap and pull the last changes

lainz commented 5 years ago

If I switch back to dev branch I get the original problem of static. Even pulling all new stuff.

circular17 commented 5 years ago

Ok. What error do you get ?

lainz commented 5 years ago

umultiimage.pas(74,30) Error: Only static methods and static variables can be referenced through an object type

circular17 commented 5 years ago

Ok. When you CTRL-Click to get the definition of Empty, what do you have?

lainz commented 5 years ago

Oh I see, I fixed it adding static into 2 class functions. class function Empty: TImageEntry; static; class function NewFrameIndex: integer; static;

circular17 commented 5 years ago

Those are already on the latest dev-vectorial branch of LazPaint.

lainz commented 5 years ago

Ok thanks for adding it. Seems that I had missing the 2 latest commits.

circular17 commented 5 years ago

Ok. Sorry for the confusion, I don't know why there is a dev-vectorial on bgrabitmap.

lainz commented 5 years ago

Ok, no problem. You can easily delete it from the web gui. But check if there is nothing inside that can be lost.

circular17 commented 5 years ago

Yeah I don't want to loose my changes. Maybe I will wait after I merge LazPaint branch to be sure.

circular17 commented 5 years ago

So in this dev-vectorial, I am making LazPaint compatible with the vector layers. Not adding yet the vectorial tools. Just that if you load something that contains an original, it will preserve it. For example something from vectoredit or the file generated by test/layeroriginal.

lainz commented 5 years ago

Cool =)