Re: Problem with plpython editing - Mailing list pgadmin-support

From Luigi Lumento
Subject Re: Problem with plpython editing
Date
Msg-id 001301c3568c$375cbaa0$030210ac@digiboxluigi
Whole thread Raw
In response to Re: Problem with plpython editing  ("frank_lupo" <frank_lupo@email.it>)
List pgadmin-support
Thanks to Frank Lupo and Hiroshi Saito for modifying frmSQLInput.frm. Now it works good with writing plpython functions.
However the problem still remains with frmFunction.frm. For this form to work with plpython we need to do the same work. I did try and works.

This is the code. (Hope it doesn't break something else).

frmFunction.frm

Private Sub cmdOK_Click()
.....

  If bNew Then
    StartMsg "Creating Function..."
    Set objNewFunction = frmMain.svr.Databases(szDatabase).Namespaces(szNamespace).Functions.Add(txtProperties(0).Text, szArguments, cboProperties(1).Text, Replace(hbxProperties(1).Text, vbCrLf, vbLf), cboProperties(0).Text, Bin2Bool(chkProperties(0).Value), Bin2Bool(chkProperties(1).Value), hbxProperties(0).Text, cboProperties(3).Text, Bin2Bool(chkProperties(3).Value), Bin2Bool(chkProperties(2).Value))
   
    'Add a new node and update the text on the parent
    On Error Resume Next
    Set objNode = frmMain.svr.Databases(szDatabase).Namespaces(szNamespace).Functions.Tag
    Set objNewFunction.Tag = frmMain.tv.Nodes.Add(objNode.Key, tvwChild, "FNC-" & GetID, txtProperties(0).Text & "(" & szArguments & ")", "function")
    objNode.Text = "Functions (" & objNode.Children & ")"
    If inIDE Then: On Error GoTo 0: Else: On Error GoTo Err_Handler
   
  Else
    StartMsg "Updating Function..."
    If hbxProperties(0).Tag = "Y" Then objFunction.Comment = hbxProperties(0).Text
    ' luigi
    If hbxProperties(1).Tag = "Y" Then objFunction.Source = Replace(hbxProperties(1).Text, vbCrLf, vbLf)
  End If
 
 
 
Regards
Luigi Lumento

pgadmin-support by date:

Previous
From: "Hiroshi Saito"
Date:
Subject: Fw: Migration error: Provider not found
Next
From: "Donald Fraser"
Date:
Subject: pgAdmin III - bug with reverse engineered SQL with function indexes