Page 2 of 2

Re: Optional parameter requests - any more?

Posted: Thu Apr 23, 2015 6:20 am
by TI-994A
sancho2 wrote:I use a blank msgbox often during debugging...
Hi sancho. For the time being, you could simply use a macro:

Code: Select all

Macro Yo
  MessageRequester("", "")
EndMacro

Yo
:lol:

Re: Optional parameter requests - any more?

Posted: Thu Apr 23, 2015 6:45 am
by Danilo
WinAPI MessageBox_() caption defaults to "Error" (in User's system language).

Code: Select all

Procedure MsgBox(Title.s="",Text.s="", Flags=0, WindowID=0)
    Protected lpText, lpCaption
    If Text <> ""  : lpText    = @Text  : EndIf
    If Title <> "" : lpCaption = @Title : EndIf
    ProcedureReturn MessageBox_(WindowID,lpText,lpCaption,Flags)
EndProcedure

MsgBox()
MsgBox("","My Text")
MsgBox("","My Text",#MB_ICONERROR)
MsgBox("","",#MB_ICONERROR)
MsgBox("","",#MB_ICONEXCLAMATION|#MB_ABORTRETRYIGNORE)
MsgBox("","",#MB_ICONINFORMATION|#MB_YESNOCANCEL)

Re: Optional parameter requests - any more?

Posted: Thu Apr 23, 2015 1:38 pm
by Thunder93
Just add the following line into the procedure..

Code: Select all

If Title = "" : Title = " " : EndIf

Re: Optional parameter requests - any more?

Posted: Tue Jun 02, 2015 11:24 pm
by kenmo
kenmo wrote:

Code: Select all

OpenFileRequester
SaveFileRequester
PatternPosition could default to 0
Just re-discovered that PatternPosition does nothing on Mac OS X (and SelectedFilePattern() always returns 0?).

That's more reason that PatternPosition shouldn't be required 8)