Page MenuHomePhabricator

efl_model: stablized child,added child,removed events.
AcceptedPublic

Authored by SanghyeonLee on Dec 20 2019, 12:42 AM.

Details

Summary

these two event can be stablized after
Efl.Model_Children_Event is out of beta.
Depends on D11187

Diff Detail

Repository
rEFL core/efl
Branch
devs/cedric/model_children
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 15847
SanghyeonLee created this revision.Dec 20 2019, 12:42 AM
SanghyeonLee requested review of this revision.Dec 20 2019, 12:42 AM
SanghyeonLee added a comment.EditedDec 20 2019, 12:43 AM

@segfaultxavi,
One question about event stabilizing,
the class of efl_model is since 1.23
but these events beta and being stabilized in 1.24,
so do we have to put the @since tag on the event either?

@segfaultxavi,
One question about event stabilizing,
the class of efl_model is since 1.23
but these events beta and being stabilized in 1.24,
so do we have to put the @since tag on the event either?

I would do it like that, yes.
And then, we'll probably need to update the doc generators to take this information into account :)

I have a concern here. Is it still acceptable at this point to rename and change Efl.Model_Children_Event into Efl.Model_Childrens_Event with an array of index/child object and also rename this events to childrens,added and childrens,removed. This way we can generate one event for a storm of children being added. It should be significantly more efficient. If everyone is ok with this idea, I will do the change ASAP.

NO, it is not acceptable. Children is already the plural of Child.
Childrens is a misspelling :)

Since this is still beta, I think we could add ranges to the event struct. And consistently use the correct children spelling which now is mixed.

Based on the above discussion, how about the followings in efl_model.eo?

child,added : Efl.Model_Child_Event;
child,removed : Efl.Model_Child_Event;
children,added : Efl.Model_Children_Event;
children,removed : Efl.Model_Children_Event;

struct Efl.Model_Child_Event {
   index: int;
   child: Efl.Object;
}

struct Efl.Model_Children_Event {
   children: array<Efl.Model_Child_Event>;
}
SanghyeonLee added a comment.EditedJan 12 2020, 11:19 PM

I think it would better to have only one way to get the event for user,
so they don't need to care about child or children,
so if it has to be changed,

children,added
children,removed

seems better to me.

good point @cedric thx.

I will work on this this week then.

cedric updated this revision to Diff 28484.Jan 24 2020, 11:40 AM
cedric retitled this revision from efl_model : Stablized child,added child,removed events. to efl_model: stablized child,added child,removed events..
cedric edited the summary of this revision. (Show Details)

update with the new event name

No more doc comments.

bu5hm4n accepted this revision.Jan 30 2020, 9:03 AM
This revision is now accepted and ready to land.Jan 30 2020, 9:03 AM

This overall looks good. However, it is currently breaking mono bindings with mono-beta = false @felipealmeida.