Page 1 of 1 1
Topic Options
#181997 - 2007-10-26 06:25 PM showmodal method for a form
Spinner Offline
Just in Town

Registered: 2007-10-26
Posts: 3
I support a large application. A modification has been requested and coded to have the code reside under "C:\Program Files\SupportAssistants". Note the space in "Program Files". SupportAssistants is simply the name of the app.

I don't know if there is a relationship, but code that worked before does not work now. See code below. After the BeginUpdate / EndUpdate methods, the Showmodal method is called. When called, the statement "$frmLoadFile.ShowModal" will completely shut down the application. Does anyone have an idea of what is causing this?

FUNCTION fnLoad_Click()
DIM $Nul, $frmLoadFile, $LineComputerList, $aColumnNames, $ColumnName, $ColumnIndex, $Item, $Index
IF Exist($FileComputerList)
IF Open(10, $FileComputerList, 2) = 0
$frmRTA.BeginUpdate
$frmLoadFile = $System.Form($frmRTA)
$frmLoadFile.ClientWidth = 275
$frmLoadFile.ClientHeight = 30
$frmLoadFile.BackColor = $frmRTA.BackColor
$frmLoadFile.Text = "Loading " + $NameComputerList
$frmLoadFile.FormBorderStyle = 5
$frmLoadFile.ControlBox = 0
$frmLoadFile.Center
$frmLoadFile.KeyPreview = 1
$frmLoadFile.OnKeyDown = "fnForm_KeyboardDetect()"

$frmLoadFile.lblLoadFile = fnCreateLabel($frmLoadFile, $iMargin, ($frmLoadFile.ClientHeight - $iHeight) / 2, $frmLoadFile.ClientWidth - (2 * $iMargin), $iHeight,,
"",,,,,)
$frmLoadFile.lblLoadFile.Alignment = 2

$frmRTA.EndUpdate
$frmLoadFile.ShowModal

Top
#181999 - 2007-10-26 06:36 PM Re: showmodal method for a form [Re: Spinner]
Witto Offline
MM club member
*****

Registered: 2004-09-29
Posts: 1828
Loc: Belgium
I don't get the problem...
But if you need double quotes as a part of a string, just wrap them in single quotes.
 Code:
BREAK ON
'"Show the quotes"' ?
Get $SO

Top
#182013 - 2007-10-27 09:31 AM Re: showmodal method for a form [Re: Witto]
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
I don't get it as well \:\)

If Witto's suggestion doesn't fix your problem, please show us the complete code.
_________________________



Top
#182060 - 2007-10-29 07:45 PM Re: showmodal method for a form [Re: Jochen]
Spinner Offline
Just in Town

Registered: 2007-10-26
Posts: 3
Many apologies. Thanks Witto and Jochen for your replies.

Please look at the code above. When the last line ($frmLoadFile.ShowModal) is executed, it shuts down the whole application. When that line is commented, processing continues. The problem does not occur when the resident directory is C:\Temp\SupportAssistants. The problem only occurs when the directory is C:\Program Files\SupportAssistants (note the space). The ShowModal method above does not reference the directory - thus there is no reason to quote ("") the statement.

Top
Page 1 of 1 1


Moderator:  Shawn, ShaneEP, Ruud van Velsen, Arend_, Jochen, Radimus, Glenn Barnas, Allen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 1362 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.042 seconds in which 0.017 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org