This forum can be browsed by the general public. Posting is no longer allowed as the product has been discontinued.
jshew
Posts: 11
Last visit: Tue Dec 24, 2013 11:42 am
Post
by jshew » Tue Sep 17, 2013 3:41 pm
I am using PrimalForms CE 1.0.10.0 to generate a Windows Form for PowerShell 3.0. The "IssueDetails.ps1" panel includes a tab control, which gets an error at execution, even if I do not edit the generated code.
Code: Select all
[powershell].\IssueDetails.ps1
Cannot find drive. A drive with the name 'handler_TabPage' does not exist.
At L:\Desktop\Scripts\SQLServer\issue\IssueDetails.ps1:94 char:1
+ $handler_TabPage:_Click=
+ ~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (handler_TabPage:String) [], DriveNotFoundException
+ FullyQualifiedErrorId : DriveNotFound[/powershell]
Here is the generated code that references "handler_TabPage." Thanks in advance.
Code: Select all
.
.
.
$handler_TabPage:_Click=
{
#TODO: Place custom script here
}
.
.
.
$form1.Controls.Add($tabControl1)
$tp_IssueInformation.DataBindings.DefaultDataSourceUpdateMode = 0
$System_Drawing_Point = New-Object System.Drawing.Point
$System_Drawing_Point.X = 4
$System_Drawing_Point.Y = 22
$tp_IssueInformation.Location = $System_Drawing_Point
$tp_IssueInformation.Name = "tp_IssueInformation"
$System_Windows_Forms_Padding = New-Object System.Windows.Forms.Padding
$System_Windows_Forms_Padding.All = 3
$System_Windows_Forms_Padding.Bottom = 3
$System_Windows_Forms_Padding.Left = 3
$System_Windows_Forms_Padding.Right = 3
$System_Windows_Forms_Padding.Top = 3
$tp_IssueInformation.Padding = $System_Windows_Forms_Padding
$System_Drawing_Size = New-Object System.Drawing.Size
$System_Drawing_Size.Height = 237
$System_Drawing_Size.Width = 842
$tp_IssueInformation.Size = $System_Drawing_Size
$tp_IssueInformation.TabIndex = 0
$tp_IssueInformation.Text = "Issue Information"
$tp_IssueInformation.UseVisualStyleBackColor = $True
$tp_IssueInformation.add_Click($handler_TabPage:_Click)
.
.
.
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Post
by davidc » Tue Sep 17, 2013 3:53 pm
FYI I moved this to the correct forum. We will look into the issue.
David
David
SAPIEN Technologies, Inc.
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Post
by davidc » Tue Sep 17, 2013 4:09 pm
This issue will be resolved in the next release of the tool. In the meantime remove the colon from the event name and it should work.
David
David
SAPIEN Technologies, Inc.
jshew
Posts: 11
Last visit: Tue Dec 24, 2013 11:42 am
Post
by jshew » Tue Sep 17, 2013 5:10 pm
Sorry, I tried that before posting. Commenting out the ":" (in one or both of two places) causes additional errors. However, I can comment out the following, and the panel displays without error:
Code: Select all
#$handler_TabPage:_Click=
#{
##TODO: Place custom script here
#
#}
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Post
by davidc » Thu Sep 19, 2013 8:54 am
If you are not using the event, yes you can simply remove it.
David
David
SAPIEN Technologies, Inc.
jvierra
Posts: 14706
Last visit: Sat Feb 27, 2021 5:46 am
Answers: 9
Has voted: 2 times
Been upvoted: 6 times
Post
by jvierra » Thu Sep 19, 2013 11:53 am
The code you posted is not exactly what was generated. It has been accidentally modified for sme reason.
See this:
$handler_TabPage:_Click=
Notice the ':' it should read:
$handler_TabPage_Click ={...
One word with an underscore and no colon.