bug-ncurses
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Dialog editbox bug


From: dmitry maybe
Subject: Re: Dialog editbox bug
Date: Fri, 31 May 2019 10:12:36 +0300


Dialog editbox bug
D
dmitry maybe
Hello! If I create editbox after form, it works inproperly and app crashes. In this case it impossible to fill entire line. Only about 3/5 and afte...
T
Thomas Dickey
... > Code: > actually that's not compilable - This should have been directed to bugs.debian.org (since it's presumably reporting a problem in one ...
D
dmitry maybe
to dickey, bug-ncurses
7 hours ago
Details
Thank you for response.
I use cdialog (ComeOn Dialog!) version 1.3-20190211
D
dmitry maybe
to dickey, bug-ncurses
7 hours ago
Details
#include "dialog.h"
#include "dlg_keys.h"
#include <stdio.h>
using namespace std;

int main(int argc, char** argv) {
int status;
init_dialog(stdin, stdout);
DIALOG_FORMITEM dlg_items_ip[1];
                dlg_items_ip[0].name = "Server:";
                dlg_items_ip[0].type = 0;
                dlg_items_ip[0].text = "" ;
                //dlg_items[1].help = "";
                dlg_items_ip[0].help_free = true;
                dlg_items_ip[0].name_x = 1;
                dlg_items_ip[0].name_y = 1;
                dlg_items_ip[0].name_len = 20;
                dlg_items_ip[0].name_free = 0;
                dlg_items_ip[0].text_flen = 30;
                dlg_items_ip[0].text_free = false;
                dlg_items_ip[0].text_ilen = 0;
                dlg_items_ip[0].text_len = 40;
                dlg_items_ip[0].text_x = 10;
                dlg_items_ip[0].text_y  = 1;
                int r;
                status = dlg_form("Sign in","Server:",12,60,0,1,dlg_items_ip,&r);

int tmp_status:
tmp_status=-1;
                char input_post[] ="/tmp/term_based_tmp_XXXXXX";
                tmp_status = mkstemp(input_post);
                status = status=dialog_editbox("Post",input_post,20,30);
return 1;
}

On Friday, May 31, 2019, Thomas Dickey <address@hidden> wrote:
On Thu, May 30, 2019 at 11:53:31PM +0000, dmitry maybe wrote:
> #include "dialog.h"
> #include "dlg_keys.h"
> #include <stdio.h>
> using namespace std;
>
> int main(int argc, char** argv) {
> int status;
> init_dialog(stdin, stdout);
> DIALOG_FORMITEM dlg_items_ip[1];
>                 dlg_items_ip[0].name = (char *)"Server:";
>                 dlg_items_ip[0].type = 0;//0 - text, 1- password
>                 dlg_items_ip[0].text = server_ip;
>                 //dlg_items[1].help = "";
>                 dlg_items_ip[0].help_free = true;
>                 dlg_items_ip[0].name_x = 1;
>                 dlg_items_ip[0].name_y = 1;
>                 dlg_items_ip[0].name_len = 20;
>                 dlg_items_ip[0].name_free = 0;
>                 dlg_items_ip[0].text_flen = 30;
>                 dlg_items_ip[0].text_free = false;
>                 dlg_items_ip[0].text_ilen = 0;
>                 dlg_items_ip[0].text_len = 40;
>                 dlg_items_ip[0].text_x = 10;
>                 dlg_items_ip[0].text_y  = 1;
>                 int r;
>                 status = dlg_form("Sign in",help,12,60,0,1,dlg_items_ip,&r);
>
> int tmp_status;
>        tmp_status = -1;
>                 char input_post[] ="/tmp/term_based_tmp_XXXXXX";
>                 tmp_status = mkstemp(input_post);
>
>                 if(tmp_status<1)//error creating
>                 {
>                     cout<<"error tmp"<<endl;
>                     return 1;
>                 }
>                 status = dialog_editbox("Post",input_post,20,30);
> return 1;
> }

But it doesn't compile:

$ g++-min -o foo -g foo.cpp -I/tmp/dialog-1.3-20190211 -L/tmp/dialog-1.3-20190211 -ldialog
foo.cpp: In function ‘int main(int, char**)’:
foo.cpp:12:40: error: ‘server_ip’ was not declared in this scope
                 dlg_items_ip[0].text = server_ip;
                                        ^
foo.cpp:26:45: error: ‘help’ was not declared in this scope
                 status = dlg_form("Sign in",help,12,60,0,1,dlg_items_ip,&r);
                                             ^
foo.cpp:35:21: error: ‘cout’ was not declared in this scope
                     cout<<"error tmp"<<endl;
                     ^
foo.cpp:35:40: error: ‘endl’ was not declared in this scope
                     cout<<"error tmp"<<endl;
                                        ^


>
>
> On Thu, May 30, 2019 at 11:24 PM dmitry maybe <address@hidden>
> wrote:
>
> > Thank you for response.
> > I use cdialog (ComeOn Dialog!) version 1.3-20190211
> >
> > On Thu, May 30, 2019 at 11:11 PM Thomas Dickey <address@hidden> wrote:
> >
> >> On Thu, May 30, 2019 at 10:33:50PM +0000, dmitry maybe wrote:
> >> > Hello!
> >> > If I create editbox after form, it
> >> > works inproperly and app crashes.
> >> ...
> >>
> >> > Code:
> >> >
> >> actually that's not compilable -
> >>
> >> > OS:
> >> > PRETTY_NAME="Debian GNU/Linux 9 (stretch)"
> >> > NAME="Debian GNU/Linux"
> >> > VERSION_ID="9"
> >> > VERSION="9 (stretch)"
> >>
> >> This should have been directed to bugs.debian.org (since it's presumably
> >> reporting a problem in one of their packages).  There's no information
> >> in this message about the actual version of dialog...
> >>
> >> --
> >> Thomas E. Dickey <address@hidden>
> >> https://invisible-island.net
> >> ftp://ftp.invisible-island.net
> >>
> >

--
Thomas E. Dickey <address@hidden>
https://invisible-island.net
ftp://ftp.invisible-island.net

reply via email to

[Prev in Thread] Current Thread [Next in Thread]