4DQuiz


Structure file View from small screen devices!  

4D Script

4D method and wrapper to 4D command Structure File to find .4DC files in case of merged applications

 Method 'StructureFile starts here

`(void) -> void

  `-> StructureFile, Returns the file Path for Structure File (.4DC in case of compiled database)
  `In case of merged applications on Mac OS X it returns the path to .4DC file from inside the .app directory

  `©developer-source.com Sat, Dec 30, 2006 balinderwalia
  `<chain>`</chain>

  `<param>
C_TEXT($0)

  `</param>

  `<locals>
C_TEXT($structureFileTxt)
C_TEXT($applicationText)
C_LONGINT($n)
C_LONGINT($nAppType)
ARRAY STRING(80;$documentsStrArr;0)

  `</locals>
  `<process> `</process>  `<interproc> `</interproc>

  `<code>

$nAppType:=Application type
$structureFileTxt:=""

If (($nAppType=4D Runtime Volume License ) & (sys_isPlatformMac ))  `mac engine structure sits inside .app dir
   
    $applicationText:=Application file
   
    If (Test path name($applicationText)=Is a directory )
        $applicationText:=$applicationText+":Contents:Database"
       
        If (Test path name($applicationText)=Is a directory )
            DOCUMENT LIST($applicationText;$documentsStrArr)
            $n:=1
            While (($n<=Size of array($documentsStrArr)) & (Test path name($structureFileTxt)#Is a document ))
                If ($documentsStrArr{$n}="@.4DC")
                    $structureFileTxt:=$applicationText+":"+$documentsStrArr{$n}
                End if
                $n:=$n+1
            End while
        End if
    End if
   
Else
    $structureFileTxt:=Structure file
End if
  `</code>

  `<return>
$0:=$structureFileTxt
  `</return>








Topics of Interest
4D Unix timestamp methods
 

Published date: Fri, 14 Jul 2006 02:47:20 GMT   → View XML Version
Edit this page now

© 2005 - 2006 4dquiz.com, All trademarks accepted. All Rights Reserved!
Site Index