QB64 Phoenix Edition v3.4.0 Released!
#31
I created #234 on GitHub for the
_DESKTOPHEIGHT
and
_DESKTOPWIDTH
issues on Linux, it needs some investigation but I think I get the general idea of the problem.

Additionally we're working on various fixes to the tinyfiledialogs library (which underpins the new dialog support), that will likely be out in the next release.
Reply
#32
Looking for a suggestion and I got a hellish don't do that situation.

While playing with new stuff re: _InputBox$.  I noticed I can use strings as part of the three passed variables. Separation by comma.  Need not apply quotes.

I can build a string for the message part of the box.  This way I can pass a true question with different messages based on the built string.  Then I noticed my message string was getting long and longer.  (expected result of building the string).  It looked ugly in the popup box.  I mean really ugly.  So I tried to make it pretty.  Well I exceeded to make it pretty.  And I mean pretty "D E A D L Y".

Do not, and I really mean do not.  Use CR/LF control codes in the message part.  Likely other codes won't work either.  Unicode maybe alright. (did not test).  The result is a hung program window.  Really hung program window.  Needs task manager to clear it.

My needed suggestion how can I manage my message part of the popup box, and not make it look like a run on sentence ?
Reply
#33
Write a function that does word-wrap, set a limit of number of characters, use CHR$(13) + CHR$(10) as the soft breaker, and use that as return value to the "message". This is something that could affect the "_MESSAGEBOX" also. What I used to prefer instead of "_MESSAGEBOX" was a contribution from somebody in the Purebasic forums writing such a dialog from scratch, but using the text-entry "gadget" with scrollbars to place the "message". The advantage of it was being able to select all of it quickly and copy it to the clipboard. The problem was, when the user didn't like all the text selected...

EDIT: This is what I did in Purebasic. Should work in v6 and on Linux as well.
Code: (Select All)
Procedure MessageWindow(Titel.s, Text.s)
    xwidth = 320
    xheight = 160
    ewindow = OpenWindow(#PB_Any, 0, 0, xwidth, xheight, Titel, #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
    If ewindow
        pip = 0
        Repeat
            pip = FindString(Text, "|", pip + 1)
            If pip
                If Mid(Text, pip + 1, 1) = "0"
                    ch = Val(Mid(Text, pip + 2, 3))
                    If ch = 124: ch = 1: EndIf
                    If ch
                        Text = Left(Text, pip - 1) + Chr(ch) + Mid(Text, pip + 5)
                    EndIf
                EndIf
            EndIf
        Until pip = 0
        Text = ReplaceString(Text, "|", Chr(13) + Chr(10))
        Text = ReplaceString(Text, #SOH$, "|")
        ewindowcontent = StringGadget(#PB_Any, 0, 0, xwidth, xheight - 32, Text, #PB_String_ReadOnly | #ES_MULTILINE | #PB_String_BorderLess | #WS_VSCROLL | #WS_HSCROLL)
        okbut = ButtonGadget(#PB_Any, xwidth / 2 - 60, xheight - 28, 120, 28, "OK")
        Repeat
            ev = WaitWindowEvent()
            If (ev = #PB_Event_Gadget) And (EventGadget() = okbut)
                Break
            EndIf
        Until ev = #PB_Event_CloseWindow
        CloseWindow(ewindow)
    EndIf
EndProcedure

This one allows the user to use "|" pipe symbol to indicate the soft-returns. I did this years ago so I'm not sure how to put a pipe as part of the message...
Reply
#34
(11-05-2022, 07:51 PM)Doppler Wrote: Auf der Suche nach einem Vorschlag und ich bekam eine höllische Situation.

Beim Spielen mit neuen Sachen bezüglich: _InputBox$. Mir ist aufgefallen, dass ich Zeichenfolgen als Teil der drei übergebenen Variablen verwenden kann. Trennung durch Komma. Anführungszeichen müssen nicht angewendet werden.

Mein benötigter Vorschlag, wie ich meinen Nachrichtenteil des Popup-Fensters verwalten kann und es nicht wie einen Satzlauf aussehen lassen kann?

Es funktioniert auch einfach mit chr$(13)


Code: (Select All)
$If VERSION > 3.3 Then
    _MessageBox "About", "Meine Demo APP" + Chr$(13) + Chr$(13) + "Copyright (c) 2022 Norbert Koll" + Chr$(13) + Chr$(13) + "Diese wurde in QB64-PE  Ver.3.4 geschrieben"
$End If




[Anhang=1057]


Attached Files Image(s)
   
Reply
#35
(11-05-2022, 10:37 PM)Steffan-68 Wrote:
(11-05-2022, 07:51 PM)Doppler Wrote: Auf der Suche nach einem Vorschlag und ich bekam eine höllische Situation.

Beim Spielen mit neuen Sachen bezüglich: _InputBox$. Mir ist aufgefallen, dass ich Zeichenfolgen als Teil der drei übergebenen Variablen verwenden kann. Trennung durch Komma. Anführungszeichen müssen nicht angewendet werden.

Mein benötigter Vorschlag, wie ich meinen Nachrichtenteil des Popup-Fensters verwalten kann und es nicht wie einen Satzlauf aussehen lassen kann?

Es funktioniert auch einfach mit chr$(13)


Code: (Select All)
$If VERSION > 3.3 Then
    _MessageBox "About", "Meine Demo APP" + Chr$(13) + Chr$(13) + "Copyright (c) 2022 Norbert Koll" + Chr$(13) + Chr$(13) + "Diese wurde in QB64-PE  Ver.3.4 geschrieben"
$End If




[Anhang=1057]

Achtung, ich spreche kein Deutsch, aber ich kenne DeepL.  Ich werde messagebox auf Sparflamme halten, mein Problem ist mit InputBox.
Reply
#36
(11-04-2022, 02:08 PM)Spriggsy Wrote: @mpgcan
I think Samuel said this is due to a bug in tinyFileDialogs itself.

@mpgcan This is getting fixed. And yeah, this is bug in the tinyfiledialogs library.

@DSMan195276 has already done a lot of work to fix the Linux issues and now is working on the Windows ones as well.

@Spriggsy See #237. You'll like it.  Smile
Reply
#37
hello @DSMan195276 Smile
in the latest git repo, in the file QB64pe-main/internal/c/parts/gui/tinyfiledialogs.c line 3159 you have again
Code: (Select All)
    char lBuff[MAX_PATH_OR_CMD];
    char * p;
also, you have 4 unused variables in lines 1299, 1300, 1301, 1302
just one more thing, if I build QB64 with gcc-13 from Equation Solutions I get an error when compiling a basic program in libqb.h, something like int_t not defined, #include <stdint.h> fixes the problem
this does not happen with the toolchain that the QB64 setup_win.bat downloads
Reply
#38
In regards to the warnings and missing
static
those are addressed in a PR I currently have open Smile

In regards to the
stdint.h
, it does look like you're right that for Windows
stdint.h
never gets included, that got missed (and apparently it must get included from elsewhere with the gcc version we're using). I'll see about fixing that.
Reply
#39
Was there a bug in the "FIND" feature in 3.3? I'm still using it, but I noticed with multiple IDEs opened, it doesn't add the latest finds (Searches) to the list, like the older versions did.

Pete
Reply




Users browsing this thread: 3 Guest(s)