XML Library and Windows
Karen
Karen at curlypaws.com
Thu Mar 2 13:50:29 EST 2006
On 2 Mar 2006, at 14:20, use-revolution-request at lists.runrev.com wrote:
>
> A popular cross-platform function to get the
> appropriate path was written by Richard Gaskin:
> ##
> function AppPath
> put the filename of this stack into tPath
> set the itemdel to "/"
> If (IsOSX()) then
> get offset(".app/Contents/MacOS/", tPath)
> if it > 0 then -- 2.4.3 or later
> delete char it to len(tPath) of tPath
> end if
> end if
> delete last item of tPath
> return tPath &"/"
> end AppPath
>
> function IsOSX
> if the platform is not "MacOS" then return false
> get the systemversion
> set the itemdel to "."
> if item 1 of it >= 10 then return true
> return false
> end IsOSX
> ##
> (for a more complete explanation, go to:
> <http://www.sonsothunder.com/devres/revolution/tips/file008.htm>)
>
> So, armed with the function above, you can change the
> path to the report layout file as follows:
> ##
> on mouseUp
> -- prep all the variables
> put AppPath() & "reports/myreport.qrl" \
> into tLayoutPath
> put "MyDataStack" into tStackName
> put true into tPreviewFlag
> put "all" into tCardRange
> -- and print the data stack
> qrtReports_PrintReportFromStack \
> tLayoutPath,tStackName,tPreviewFlag,tCardRange
> end mouseUp
> ##
>
> Hope this helped,
>
> Jan Schenkel.
>
> Quartam Reports for Revolution
> <http://www.quartam.com>
Jan,
Thanks for all your help with this - it is very much appreciated. I
now have my program generating attractive reports on both the Mac and
Windows :-). I'm very pleased with Quartam Reports and I'm looking
forward to seeing what v1.1 brings.
Thanks,
Karen
More information about the use-livecode
mailing list