Microsoft KB Archive/66690

= ALERT Function in Basic 7.10 UI Toolbox Destroys TEXT$ =

Article ID: 66690

Article Last Modified on 11/21/2006



This article was previously published under Q66690



SYMPTOMS
The ALERT function in the User Interface (UI) Toolbox destroys the string sent to it in the TEXT$ field of the function call.



WORKAROUND
Any one of the following workarounds will correct the problem but choices 1 and 2 may be easiest because they don't require recompiling WINDOW.BAS or building new UI Toolbox support libraries:

  Enclose the TEXT$ parameter in parentheses. For example, the following statement Alert(4, a$, 6, 20, 15, 60, &quot;OK&quot;, &quot;CANCEL&quot;, &quot;&quot;) should be changed to the following: Alert(4, (a$), 6, 20, 15, 60, &quot;OK&quot;, &quot;CANCEL&quot;, &quot;&quot;)   Make a copy of the string before calling the ALERT function, as follows: temp$ = a$     ALERT(4, a$, 6, 20, 15, 60, &quot;OK&quot;, &quot;CANCEL&quot;, &quot;&quot;) a$ = temp$  Modify the ALERT function in WINDOW.BAS as follows:

  Right after the line that says FUNCTION Alert (style, text$... put the following statement:            TempText$ = test$                                  Right before the END FUNCTION at the bottom of the function, put the following statement:              test$ = TempText$ You should then make a new Quick library (.QLB) and a new LINK library (.LIB) that use the new version of ALERT, as shown in the following:

BC /X/FS GENERAL.BAS;

BC /X/FS WINDOW.BAS;

BC /X/FS MOUSE.BAS;

BC /X/FS MENU.BAS

LIB UITB+GENERAL+WINDOW+MOUSE+MENU+UIASM+QBX.LIB;

LINK /Q UITB.LIB, UITB.QLB,, QBXQLB.LIB;

Invoke QBX.EXE using the new UITB.QLB Quick library, as follows:

QBX /L UITB

 </ol>

<div class="status_section">

STATUS
Microsoft has confirmed this to be a bug in Microsoft Basic Professional Development System (PDS) versions 7.00 and 7.10 for MS-DOS. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

Additional query words: BasicCom SR# S901030-181 buglist7.00 buglist7.10

Keywords: KB66690

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.