!
! Show the problem with adding a sub-Macro panel to the parent via the config
! popup menu.
!
! @bug     2013, 2014
! @author  J Bauer
! @since   NeXtMidas 2.7.3
!
startmacro

call setDatDir

pipe on
  
  panel/setup/controls=gc/msgid=main/id=panelchild
  ! Since 3.8.1 for NXM-3213 make this a panel with 2 panes
  plot ^{datDir}.world.prm
  list2 ^{datDir}.cities.prm
  
pipe off

endmacro

!******************************************************************************!
! Set the dat directory
!******************************************************************************!
procedure setDatDir
  invoke nxmMajor env.nmversion.subString(0,1)
  invoke major java.lang.Integer.valueOf(nxmMajor)
  if major GE 4 then
    invoke s:datDir           nxm.sys.test.DatLocator.getDatDirLocation()
    invoke s:datDirSlash      nxm.sys.test.DatLocator.getDatDirSlashLocation()
    invoke z:sysDatFull       nxm.sys.test.DatLocator.sysDatFull()
    invoke z:sysTestDatExists nxm.sys.test.DatLocator.sysTestDatExists()
  else
    set s:datDir           "nxm.sys.dat"
    set s:datDirSlash      "nxm/sys/dat"
    set z:sysDatFull       true
    set z:sysTestDatExists false
  endif
return
