Need Help with PrimalForms CE Tab Control

This forum can be browsed by the general public. Posting is no longer allowed as the product has been discontinued.
Locked
User avatar
jshew
Posts: 11
Joined: Sun Mar 03, 2013 12:43 pm

Need Help with PrimalForms CE Tab Control

Post by jshew »

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)
.
.
.

User avatar
davidc
Posts: 5913
Joined: Thu Aug 18, 2011 4:56 am

Re: Need Help with PrimalForms CE Tab Control

Post by davidc »

FYI I moved this to the correct forum. We will look into the issue.

David
David
SAPIEN Technologies, Inc.

User avatar
davidc
Posts: 5913
Joined: Thu Aug 18, 2011 4:56 am

Re: Need Help with PrimalForms CE Tab Control

Post by davidc »

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.

User avatar
jshew
Posts: 11
Joined: Sun Mar 03, 2013 12:43 pm

Re: Need Help with PrimalForms CE Tab Control

Post by jshew »

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
#
#}

User avatar
davidc
Posts: 5913
Joined: Thu Aug 18, 2011 4:56 am

Re: Need Help with PrimalForms CE Tab Control

Post by davidc »

If you are not using the event, yes you can simply remove it.

David
David
SAPIEN Technologies, Inc.

jvierra
Posts: 14459
Joined: Tue May 22, 2007 9:57 am
Contact:

Re: Need Help with PrimalForms CE Tab Control

Post by jvierra »

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.

Locked