[Gambas-user] ncurses fail. says Screen incorrectly overridden
Benoît Minisini
g4mba5 at gmail.com
Wed Dec 9 17:45:10 CET 2020
Le 09/12/2020 à 17:39, Tobias Boege a écrit :
> On Wed, 09 Dec 2020, Bruce Steers wrote:
>> If adding gb.ncurses component to any app when i try to run it says..
>>
>> Screen height is incorrectly overridden in class Screen.
>>
>
> The Screen class in gb.ncurses is static, as there is only one terminal
> that a gb.ncurses program can use[*], and therefore all of its properties
> are static as well. The project that you link gb.ncurses to seems to
> have its own Screen class with a conflicting definition of the Height
> property.
>
> My guess: you're trying to mix a gb.gui-style component (which brings
> a non-static Screen class) and gb.ncurses (with a static Screen class).
> If yes, then do you really need the two user interfaces in a single
> project?
>
> Without namespaces in Gambas, conflicts like these are bound to occur.
>>From an ncurses point of view, "Screen" was the right name to choose
> for that class, but it has a very different meaning than "Screen" in
> the GUI components.
>
> The only thing you can do is not to mix the two classes of components.
>
> Regards,
> Tobias
>
> [*] Not true for ncurses, but for gb.ncurses because it is not fully
> developed to ncurses's capabilities.
>
Maybe Screen could be dynamic and auto-creatable in gb.ncurses? It will
keep the backward-compatibility, and makes its interface compatible with
gb.gui interface.
My two cents.
--
Benoît Minisini
More information about the User
mailing list