On Tue, 3 Jan 2017 19:42:23 +0900 Conrad Um <[email protected]> said:

> Dear all,
> 
> When edje program is removed by "program_remove", queued program lookups
> will be removed also. However, it seems that required program lookups that
> should be kept are also removed.

program_remove? what? where? you mean in edc files? i will assume that...

> For example, three program lookups will be queued after parsing this
> programs block.
> programs {
>    program { "pr0";
>       after: "pr1"; // LOOKUP[0]
>    }
>    program { "pr1";
>       script {
>          run_program(PROGRAM: "pr2"); // LOOKUP[1]
>       }
>       after: "pr3"; // LOOKUP[2]
>    }
> }
> 
> If "pr1" is removed, it is right to remove LOOKUP[1] & LOOKUP[2], but
> LOOKUP[0] should be kept.

according to the documentation:

        This will break program sequences if a program in the middle of the
sequence is removed.

so yes... removing a program in a sequence is going to lead to "bad stuff". ...
ummm... don't do it? :)

> In normal case, if "pr1" doesn't exist in group, edje_cc complains about
> non-existence of "pr1", but "program_remove" removes all program lookups
> for "pr1".
> 
> "pr0" still tries to execute "pr1" in runtime, but it will execute
> arbitrary program having index of "0". Because "pr0"'s lookup for "pr1" is
> removed by "program_remove" and the id of "Edje_Program_After" will remains
> as 0 after calloc'ed.

well the docs did warning of this breaking sequences... :)

> It is easy to make program lookups for removed program alive, but the
> change can cause compilation error for edje_cc.
> Is it allowed to change code in this case, or should I find the way not
> causing build error?

well if anything cause edje_cc to build error. "this program you remove is part
of a sequence. it's looked up by another program".

also note embryo script will also break. as you have lookup 1 will break as
edje_cc looks up programs at edje_cc compile time and this may indeed also have
issues if this was pr1 instead of pr2... (well pr1 would look itself up - my
point is if script points to a deleted program... actually edje_cc may fail to
compile as edje_cc lookup will fail... :/)

> Regards,
> conr2d (Jee-Yong Um)
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most 
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> _______________________________________________
> enlightenment-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> 


-- 
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler)    [email protected]


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to