论坛: Forum of Decimal BASIC (Thread #700642)

confirm$ not working in ParactBASIC (2024-02-11 01:30 by toml12953 #747272)

A statement such as this

LET a$=confirm$("Any more to do?")

will wait for the user to click yes or no when executed in the interpreter. In the compiler, however, it flashes the message box so fast I can't read it and doesn't wait for a button press.

回复到 #747272×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) 登录

Re: confirm$ not working in ParactBASIC (2024-02-11 08:12 by SHIRAISHI Kazuo #748379)

Reply To Message #747272

The confirmation dialog may hide itself behind another window.

> A statement such as this
>
> LET a$=confirm$("Any more to do?")
>
> will wait for the user to click yes or no when executed in the interpreter. In the compiler, however, it flashes the message box so fast I can't read it and doesn't wait for a button press.
回复到 #747272

回复到 #748379×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) 登录

Re: confirm$ not working in ParactBASIC (2024-02-11 12:09 by toml12953 #748975)

Reply To Message #748379
> Reply To Message #747272
>
> The confirmation dialog may hide itself behind another window.
>
No, that's not what's happening. Try this. It should never end but it does:

540 LET a$=confirm$("Any more to do?")
545 GOTO 545
550 END
回复到 #748379

回复到 #748975×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) 登录

Re: confirm$ not working in ParactBASIC (2024-02-11 17:19 by SHIRAISHI Kazuo #749845)

Reply To Message #748975
try
535 PRINT 535
540 LET a$=confirm$("Any more to do?")
545 PRINT 545
550 END

> Reply To Message #748379
> > Reply To Message #747272
> >
> > The confirmation dialog may hide itself behind another window.
> >
> No, that's not what's happening. Try this. It should never end but it does:
>
> 540 LET a$=confirm$("Any more to do?")
> 545 GOTO 545
> 550 END

回复到 #748975

回复到 #749845×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) 登录

Re: confirm$ not working in ParactBASIC (2024-02-11 23:49 by toml12953 #750937)

Reply To Message #749845
> Reply To Message #748975
> try
> 535 PRINT 535
> 540 LET a$=confirm$("Any more to do?")
> 545 PRINT 545
> 550 END
>
First the output window appears. Next the confirm$ dialog box pops up
Then an error message pops up but all the windows and messages disappear before I can read anything.

All this happens too fast to read anything.
回复到 #749845

回复到 #750937×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) 登录

Re: confirm$ not working in ParactBASIC (2024-02-11 23:49 by toml12953 #750938)

Reply To Message #749845
> Reply To Message #748975
> try
> 535 PRINT 535
> 540 LET a$=confirm$("Any more to do?")
> 545 PRINT 545
> 550 END
>
First the output window appears. Next the confirm$ dialog box pops up
Then an error message pops up but all the windows and messages disappear before I can read anything.

All this happens too fast to read anything.
回复到 #749845

回复到 #750938×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) 登录

Re: confirm$ not working in ParactBASIC (2024-02-12 09:50 by SHIRAISHI Kazuo #752000)

Reply To Message #750938

I cannot reproduce the problem, but this problem suggests
Lazarus function MessageDlg might be not thread safe.
https://lazarus-ccr.sourceforge.io/docs/lcl/dialogs/messagedlg.html
https://stackoverflow.com/questions/26718030/delphi-application-hangs-while-showmessage-or-messagedlg



> Reply To Message #749845
> > Reply To Message #748975
> > try
> > 535 PRINT 535
> > 540 LET a$=confirm$("Any more to do?")
> > 545 PRINT 545
> > 550 END
> >
> First the output window appears. Next the confirm$ dialog box pops up
> Then an error message pops up but all the windows and messages disappear before I can read anything.
>
> All this happens too fast to read anything.

回复到 #750938

回复到 #752000×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) 登录

Re: confirm$ not working in ParactBASIC (2024-02-12 13:47 by toml12953 #752314)

Reply To Message #752000
> Reply To Message #750938
>
> I cannot reproduce the problem, but this problem suggests
> Lazarus function MessageDlg might be not thread safe.
> https://lazarus-ccr.sourceforge.io/docs/lcl/dialogs/messagedlg.html
> https://stackoverflow.com/questions/26718030/delphi-application-hangs-while-showmessage-or-messagedlg

By running over and over in quick succession, i was able to read the error message:

Check synchronize called from non-main thread "$1D4C"

The hex number in quotes changes every time I run it. The second link you give above seems to explain it but I wonder
why it works for you.
回复到 #752000

回复到 #752314×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) 登录

Re: confirm$ not working in ParactBASIC (2024-02-12 16:59 by SHIRAISHI Kazuo #752510)

Reply To Message #752314

Thanks for the infomation.
"Check synchronize called from non-main thread" means the problem lies in which
Lazarus function MessageDlg is invoked in working thread.


> Reply To Message #752000
> > Reply To Message #750938
> >
> > I cannot reproduce the problem, but this problem suggests
> > Lazarus function MessageDlg might be not thread safe.
> > https://lazarus-ccr.sourceforge.io/docs/lcl/dialogs/messagedlg.html
> > https://stackoverflow.com/questions/26718030/delphi-application-hangs-while-showmessage-or-messagedlg
>
> By running over and over in quick succession, i was able to read the error message:
>
> Check synchronize called from non-main thread "$1D4C"
>
> The hex number in quotes changes every time I run it. The second link you give above seems to explain it but I wonder
> why it works for you.

回复到 #752314

回复到 #752510×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) 登录

Re: confirm$ not working in ParactBASIC (2024-02-13 11:26 by toml12953 #752958)

Reply To Message #752510
> Reply To Message #752314
>
> Thanks for the infomation.
> "Check synchronize called from non-main thread" means the problem lies in which
> Lazarus function MessageDlg is invoked in working thread.

I still wonder why you can run with no error but I can't. Is there a way to limit the number of threads ParactBASIC uses?
I've tried Lazarus 2.2.6 and 3.0 and both give the error. Have you turned off threads in Lazarus?
回复到 #752510

回复到 #752958×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) 登录

Re: confirm$ not working in ParactBASIC (2024-02-13 12:11 by SHIRAISHI KAzuo #752959)

Reply To Message #752958
> Reply To Message #752510
> > Reply To Message #752314
> >
> > Thanks for the infomation.
> > "Check synchronize called from non-main thread" means the problem lies in which
> > Lazarus function MessageDlg is invoked in working thread.
>
> I still wonder why you can run with no error but I can't. Is there a way to limit the number of threads ParactBASIC uses?
> I've tried Lazarus 2.2.6 and 3.0 and both give the error. Have you turned off threads in Lazarus?

BASICAcc 1.2.1.3 Rev.1 and Paract BASIC 2.1.3.3 Rev.2 released.
https://hp.vector.co.jp/authors/VA008683/english/index.htm
I expect them to resolve the problem.
回复到 #752958

回复到 #752959×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) 登录

Re: confirm$ not working in ParactBASIC (2024-02-14 05:31 by toml12953 #753009)

Reply To Message #752959

> BASICAcc 1.2.1.3 Rev.1 and Paract BASIC 2.1.3.3 Rev.2 released.
> https://hp.vector.co.jp/authors/VA008683/english/index.htm
> I expect them to resolve the problem.
>
Perfect! Thank you very much. You can be sure that if I find any other anomalies, I'll post them here.

Thanks again,

Tom Lake
回复到 #752959

回复到 #753009×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) 登录