Fwd: [FYI] Using Graphic Commands on Server

stephen barncard stephenREVOLUTION2 at barncard.com
Sun Jun 30 16:39:07 EDT 2013


On Sun, Jun 30, 2013 at 1:26 PM, Richard Gaskin
<ambassador at fourthworld.com>wrote:

> I wouldn't have imagined that template objects could be exported from -
> does that work on the desktop?
>

I don't know but it works on the server!  I changed all references to
"image xxx" to the templateImage in the desktop version.



>
> I was going to experiment with this myself to see if I can export group
> objects, but I can't turn up the link to the latest LC Server.  How did I
> miss that?  I'm sure it's on livecode.com somewhere, no?
>


here:


http://downloads.livecode.com/livecode/server/6_1_0/


let me know if you can do it...



this is what my (sloppy and failed) code looked like  (in a stack for this
test, originally written for image objects which failed)

*on* createLabledTGraphic pFileName

   *set* the filename of the templateImage to pFileName



   *set* the topLeft of the templateImage to "38,132"



   *--create field "textField"*

   *set* the text of the templatefield to  "shmengie"

   *set* the textsize of the templatefield to 24

   *set* the width of the templatefield to  200

   *set* the height of the templatefield to 100



   *group* the templatefield and templateImage

   *set* the name of last *group* to "thegroup"

   *relayer* the templatefield after the templateImage

   *set* the loc of the templatefield to the loc of grp "theGroup"

   *export* snapshot from the templateGroup to file "groupThing.png" as PNG

   *ungroup* templateGroup

   *-- delete fld "textField"*

   *-- put the result*
*end* createLabledTGraphic

error reporting on the server is excellent.

stack "/home/cranbus/media.barncard.com/photo/servergraphics.rev"
  row 124, col 1: group: object cannot be grouped
  row 124, col 1: Handler: error in statement (createLabledTGraphic)
file "/home/cranbus/media.barncard.com/photo/test.iRev"
  row 25, col 1: Handler: can't find handler (createLabledTGraphic)








-- 



Stephen Barncard
San Francisco Ca. USA

more about sqb  <http://www.google.com/profiles/sbarncar>



More information about the use-livecode mailing list