Page MenuHomePhabricator

efl_mono: move Eina.Error.Init() to a static constructor
ClosedPublic

Authored by bu5hm4n on Jan 7 2019, 10:06 AM.

Details

Summary

this removes the need for the calling a Init function.
Depends on D7555

Diff Detail

Repository
rEFL core/efl
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
bu5hm4n created this revision.Jan 7 2019, 10:06 AM

It seems that this patch has no reviewers specified. If you are unsure who can review your patch, please check this wiki page and see if anyone can be added: https://phab.enlightenment.org/w/maintainers_reviewers/

bu5hm4n requested review of this revision.Jan 7 2019, 10:06 AM

@lauromoura @felipealmeida After the previous revision and this, there are only c calls in the init calls.

I also tried to remove those, however, they are used in the intree examples. Which brought up the questions:

  • why we have those intree examples in efl AND additionally out of tree examples in the examples repository?
  • What do you think of having something like a Tutorial class, which ensures the correct init calls in the background? In the class in the end only the class calls are there, to me it seems that a user should only use the application internface, but never bother with the subsystems in detail. Which would be ensured with that, is that fine to you ?

@bu5hm4n I do not understand what would the Tutorial class do. Who would use it? Only the tutorials?

@bu5hm4n I do not understand what would the Tutorial class do. Who would use it? Only the tutorials?

Only the tutorials, it is only used to simulate a running EFL application :)

Why wouldn't the tutorials use the same classes as regular EFL apps? I am confused.

After an IRC chat I finally understood it. @bu5hm4n is saying that some of the tutorials (like the Eina ones) do not need to initialize the whole EFL, but they won't be able to initialize Eina alone if Eina.Config.Init() is removed.

I think initializing the whole EFL is not a big deal for these tutorials. They are already using Efl.All.Init() anyway, so let's just turn them into regular EFL apps using the new App interface. I certainly prefer this to creating a Tutorial class which will be more confusing.

felipealmeida accepted this revision.Jan 16 2019, 3:21 AM
This revision is now accepted and ready to land.Jan 16 2019, 3:21 AM
Closed by commit rEFL66824da950c0: efl_mono: move Eina.Error.Init() to a static constructor (authored by Marcel Hollerbach <mail@marcel-hollerbach.de>). · Explain WhyJan 16 2019, 5:24 AM
This revision was automatically updated to reflect the committed changes.