Giter Site home page Giter Site logo

Comments (22)

circular17 avatar circular17 commented on June 3, 2024 1

Well in theory if you have the define BGRABITMAP_USE_MSEGUI that would not happen.

from bgragui.

lainz avatar lainz commented on June 3, 2024 1

I did not define nothing. I just used the latest mseide that says is compatible with BGRABitmap, maybe is defined in the ide automatically?

Or maybe is because I copied the entire bgrabitmap folder inside lib/common?

from bgragui.

fredvs avatar fredvs commented on June 3, 2024

Hola.

OK, for TSize, it is fixed adding "Types" in uses section of BGButtonDrawer.pas

But now there is a other error:

bgbutton.pas(56,26) Error: Incompatible type for arg no. 3: Got "ShortInt", expected "Boolean"

---->

fbgra.Draw(canvas, 0, 0);

;-(

from bgragui.

fredvs avatar fredvs commented on June 3, 2024

IMHO, when all is ok, I think the best would be to create in MSEide the bgragui tab and all the components in Component Palette.

So people have to add the required BGRA*** directory in the search path in project option if they want use one of the bgragui components .

For ideU maybe the source of BGRA*** can be included in ideU source.
But maybe too it is better to have all the BGRA*** source independent and do, like for MSEide: create the BGRAgui tab + components and use the external source of BGRA***, so if there is new commit in BGRAgui source, people have more independence.

from bgragui.

fredvs avatar fredvs commented on June 3, 2024

Here how to create a global macro: in Settings, Configure MSEide:

Capture d’écran_2020-05-11_13-29-21

And then in your project, you may use it like this:

Capture d’écran_2020-05-11_13-31-46

OK, I let you in peace.

Have fun!

Fre;D

from bgragui.

lainz avatar lainz commented on June 3, 2024

Hi, thanks for all the suggestions, when I have time I will check.

Maybe I will switch to a release compiler for mseide instead of trunk, to ensure things are working, like the Types not found, seems that is directly available in trunk without the uses, but not on current release of FPC.

from bgragui.

fredvs avatar fredvs commented on June 3, 2024

Maybe I will switch to a release compiler for mseide instead of trunk,

Normally, msegui is compatible with fpc trunk and it should not have problems.

, but not on current release of FPC.

I did the test with fpc 3.2.0 RC1

from bgragui.

lainz avatar lainz commented on June 3, 2024

Ok, I will download 3.2.0 RC1 to test.

from bgragui.

fredvs avatar fredvs commented on June 3, 2024

like the Types not found,

Hum, maybe it is due to the fact that MSEgui has his own msetypes and if you use fpc declartion-types, you need to add types

from bgragui.

lainz avatar lainz commented on June 3, 2024

Ok, yes I prefer to use FPC types for the drawer unit, for the control itself there are no problems.

from bgragui.

fredvs avatar fredvs commented on June 3, 2024

Ok, yes I prefer to use FPC types for the drawer unit,

Yes, of course.
Is it a problem for you to add types , do it cause conflict if you use the code for LCL for example?

from bgragui.

lainz avatar lainz commented on June 3, 2024

I've added the Types unit in the last commit.

I have a question, for example if I add a global macro, like you said {BGRAGUIDIR} for my ide. Then you open the project in your IDE and you don't have the global macro. What happens then? I should add in the readme that the user must configure first that macro, instead of copying the units? Or both are interchangeable, say I can copy the directory or use the macro?

I say for the examples folder that comes with bgragui.
I mean if the macro is not set, there is an error displayed or the project will compile anyways?

from bgragui.

lainz avatar lainz commented on June 3, 2024

I will check that later. But I think is better using the macro than copying the directory. I'm copying every time I'm making a change, so better don't do that =)

from bgragui.

lainz avatar lainz commented on June 3, 2024

Hola.

OK, for TSize, it is fixed adding "Types" in uses section of BGButtonDrawer.pas

But now there is a other error:

bgbutton.pas(56,26) Error: Incompatible type for arg no. 3: Got "ShortInt", expected "Boolean"

---->

fbgra.Draw(canvas, 0, 0);

;-(

What happens if you do like this:

fbgra.Draw(canvas, 0, 0, False)

from bgragui.

fredvs avatar fredvs commented on June 3, 2024

Then you open the project in your IDE and you don't have the global macro. What happens then?

It will simply fail to compile with some errors "file not found"...

I should add in the readme that the user must configure first that macro, instead of copying the units?

Imho, it is the good way to do.
One note in readme.txt in BIG :

Please, create first a global macro BGRAGUIDIR that point to the root directory of BGRAgui.
For this, on menu "Settings" add in "name": BGRAGUIDIR and in value, for example /home/you/bgragui

For ideU, I will add a integrated BGRAGUIDIR macro, like for FPGUIDIR, LCLDIR and BGABITMAPDIR.

But I think is better using the macro than copying the directory.

I think it is better too.

from bgragui.

fredvs avatar fredvs commented on June 3, 2024

What happens if you do like this:
fbgra.Draw(canvas, 0, 0, False)

Aaargh, I get this:

bgbutton.pas(56,20) Error: Incompatible type for arg no. 1: Got "MSEGRAPHICS.tcanvas", expected "BGRAGRAPHICS.TCanvas"

So it is a problem of conflict with classes.
Circular had the same problem with BGRABitmap.

I hope he will see this because he knows how to fix it.
I will try but sure Circular is much better than me.

from bgragui.

fredvs avatar fredvs commented on June 3, 2024

By the way, is it ok with your system, does it accept fbgra.Draw(canvas, 0, 0), can you compile it?
If yes, could you give me the command line that you use?
On project option, make, click on "Show command line"

image

from bgragui.

fredvs avatar fredvs commented on June 3, 2024

Well in theory if you have the define BGRABITMAP_USE_MSEGUI that would not happen.

Ooops, I forgot the theory...

I will try with -dBGRABITMAP_USE_MSEGUI

Write you later....

from bgragui.

fredvs avatar fredvs commented on June 3, 2024

Hum, here adding -dBGRABITMAP_USE_MSEGUI in compiler make option did not help.

from bgragui.

fredvs avatar fredvs commented on June 3, 2024

I just used the latest mseide that says is compatible with BGRABitmap, maybe is defined in the ide automatically?

We did not try to use BGRABitmap for MSEide himself, only for some demos.

So you confirm that you can compile the code that is in bgragui github without problems.

That is a excellent news.

Now, why it is not working for me, maybe it is, like you said, because of folders location?
I will try but I have doubt.

from bgragui.

fredvs avatar fredvs commented on June 3, 2024

Or maybe is because I copied the entire bgrabitmap folder inside lib/common?

Yep, you get it, indeed after copy bgrabitmap folder inside lib/common it works:

Capture d’écran_2020-05-11_20-29-59

So, maybe there is a hierarchy that must be respected in the list of search directories?

Hum, strange, I will try to change the order, first BGRAbitmap directory, then MSEgui/lib directoriy?

OK, I let that for later (but it is very strange).

from bgragui.

fredvs avatar fredvs commented on June 3, 2024

Hola.

Sorry, it was my fault, the macro that I used pointed to a old BGRABitmap code.
Now all is ok, no problem of hierarchy or something else.

I apologize for the noise.

from bgragui.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.