Page MenuHomePhabricator

efl_model : Stablized child,added child,removed events.
Needs ReviewPublic

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.

Diff Detail

Repository
rEFL core/efl
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 15071
Build 10384: arc lint + arc unit
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.EditedSun, Jan 12, 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.