|
|
Tech Note 35: Issues and WorkaroundsApril 3, 2006© 2010 NS BASIC Corporation. All rights reserved. |
Notes and Warnings
Known Problems that are Microsoft's
INPUTBOX does not size properly on Palm-size PC screen and does not work on Pocket PC and HPC 2000. This command is built into Microsoft's software. You can use the InputBox function that is part of the DialogX control to do the same thing. Putting this in your program will override the faulty InputBox function. (DialogX also provides additional functionality not contained in InputBox.)
FUNCTION INPUTBOX(prompt, title, default)
IF ISEMPTY(NSBIB) THEN
ADDOBJECT "DialogX", "NSBIB_Dlg", 0, 0, 0, 0
SET NSBIB=NSBIB_Dlg
END IF
INPUTBOX = NSBIB.InputBox(prompt, title, default)
END FUNCTION 'INPUTBOX
X=InputBox("Message area", "INPUTBOX Example", "Default Text")
showColor method is not supported and the showFont method not resized for Palm-size screen. Microsoft has admitted this is a result of working to get that product out quickly.
INPUTBOX function causes an Out of Memory error. The cause appears to be HP using a bad build of VBScript.dll in their ROM. Use the Script68 install module to fix this.
EVAL statement doen't work on some devices. This appears to be a problem in Microsoft's compiler. Workaround: use Execute instead.
Function formatNum(n,d,l,p,g)
formatNum=fixformat(formatnumber(abs(n),d,l),n,d,l,p,g,0)
End Function
Function formatCur(n,d,l,p,g)
formatCur=fixformat(formatcurrency(abs(n),d,l),n,d,l,p,g,1)
End Function
Function fixformat(fn,n,d,l,p,g,a)
If g Then
g=mid(",.",instr(".,",mid(cstr(1/10),2,1)),1)
l=Len(fn)
If d Then l=l-d-1
While l>3+a
l=l-3
fn=mid(fn,1,l) & g & mid(fn,l+1)
Wend
End If
If n<0 Then
If p Then
fn="(" & fn & ")"
Else
fn="-" & fn
End If
End If
fixformat=fn
End Function