• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2322
  • Last Modified:

PML (for PDMS) methods are not being recognized...

I'm pretty new to PML so I have a learning curve ahead of me.  

I am building a simple form that has a list and a view, along with two buttons.  The list is populated from a directore, the view is populated from a folder of plotfiles, based on which item in the list is selected.  The problem is, the methods are not being recognized.  

I am able to load the form, but when I try to show it, the init() method is not found.  Any ideas?

thanks,
sekans
0
Sekans
Asked:
Sekans
1 Solution
 
CJ_SCommented:
Is the init() method public?

Regards,
CJ
0
 
SekansAuthor Commented:
I don't know, how can I find out.  I'll post the form definition below.

setup form !!miscequi
   !!miscequi.formtitle = 'Build Misc Equipment'
   !!miscequi.initcall  = '!this.Init()'
   
   list     .equip 'Select Equipment' call '!this.LoadPlotfile()' width 20 length 15
   view     .plot plot hei 9 aspect 0.8 bord on

   button .build   'Create' at x0 ymax+1 call '!bekmiscequi.Build()'
   button .dismiss 'Dismiss' at x0 ymax+1 CANCEL
exit

define method .Init()
   !dir       = object FILE('\\pdmsws1\pdms\bek11.2ui\MiscEquipment')
   !FileList  = object ARRAY()
   !Descript  = object ARRAY()
   !FileNames = object ARRAY()
   !TmpFile   = object FILE()
   !count     = object REAL()
   
   !s = object STRING()

   !this.equip.Clear()

   !FileList = !dir.Files()
   !count = arraysize(!FileList)
   do !i from 1 to $!count
      !FileNames.Append(!FileList[$!i].Fullname())
      !s = !FileList[$!i].Entry()
      !s = !s.Before('.')
      !Descript.Append(!s)
   enddo
     
   !this.equip.dtext = !Descript
   !this.equip.rtext = !FileNames
endmethod

define method .LoadPlotFile()
   !s = object STRING()

   !this.plot.Clear()

   !dir       = object FILE('\\PDMSWS1\pdms\bek11.2ui\MiscEquipment\PlotFiles')
   !ext       = '.plt'
   
   !s = !this.equip.selection('DTEXT')

   !this.plot.add('$!dir\$!s$!ext')
   handle any
      !this.plot.add('$!dir\empty$!ext')
      $p No plot file for $!s
   endhandle
endmethod

define method .Build()
   $p Building...
   !s = object STRING()

   !s = !this.equip.selection()
   $m/$!s
$P $!s
endmethod



0
 
nico5038Commented:

No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
 - PAQ'd and pts refunded
Please leave any comments here within the
next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !

Nic;o)
0
 
moduloCommented:
Finalized as proposed

modulo

Community Support Moderator
Experts Exchange
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now