new "at size" clause in export snapshot

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

new "at size" clause in export snapshot

Chris Sheffield-4
Has anybody tried out the new “at size” clause in the export snapshot command introduced in LC 6.6? I can’t get it to work. In fact, my script won’t even compile if I include it.

        export snapshot from tObj to tData as PNG at size tWidth, tHeight

I’ve tried various uses of parentheses and can’t get anything to work. Can anyone help? I can’t find a specific example anywhere in the dictionary or in the release notes. I need this in order to get a retina resolution snapshot on the retina iPad.

Thanks,
Chris
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: new "at size" clause in export snapshot

Chris Sheffield-4
Actually, the release notes do show an example using import snapshot. I might be able to use that instead, but my call to export snapshot is set up exactly the same way, so not sure why it won’t work…

On Mar 28, 2014, at 11:59 AM, Chris Sheffield <[hidden email]> wrote:

> Has anybody tried out the new “at size” clause in the export snapshot command introduced in LC 6.6? I can’t get it to work. In fact, my script won’t even compile if I include it.
>
> export snapshot from tObj to tData as PNG at size tWidth, tHeight
>
> I’ve tried various uses of parentheses and can’t get anything to work. Can anyone help? I can’t find a specific example anywhere in the dictionary or in the release notes. I need this in order to get a retina resolution snapshot on the retina iPad.
>
> Thanks,
> Chris
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: new "at size" clause in export snapshot

Thierry Douez
In reply to this post by Chris Sheffield-4
2014-03-28 18:59 GMT+01:00 Chris Sheffield <[hidden email]>:
> Has anybody tried out the new “at size” clause in the export snapshot command introduced in LC 6.6? I can’t get it to work. In fact, my script won’t even compile if I include it.
>
>         export snapshot from tObj to tData as PNG at size tWidth, tHeight

Hi Chris,

Could you try this instead?

     export snapshot from tObj to tData  at size tWidth, tHeight as PNG

HTH,

Thierry


------------------------------------------------
Thierry Douez - http://sunny-tdz.com
Maker of sunnYperl - sunnYmidi - sunnYmage - sunnYpdf

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

RE: new "at size" clause in export snapshot

John Dixon
In reply to this post by Chris Sheffield-4
Chris...

I have had a problem with 'import snapshot'... everything is good under LC 6.5.2 but the same script would not work under 6.6... I spoke to support about it and the asked me to submit a bug report, which I duly did... they have now confirmed it as a bug

I did notice however, that there were a few bug reports regarding 'export snapshot' and I saw a comment at the bottom of one that said it would be fixed in the next release... so, have you tried your script using LC 6.7 (dp 1) ?

> Actually, the release notes do show an example using import snapshot. I might be able to use that instead, but my call to export snapshot is set up exactly the same way, so not sure why it won’t work…
>
> On Mar 28, 2014, at 11:59 AM, Chris Sheffield <[hidden email]> wrote:
>
> > Has anybody tried out the new “at size” clause in the export snapshot command introduced in LC 6.6? I can’t get it to work. In fact, my script won’t even compile if I include it.
> >
> > export snapshot from tObj to tData as PNG at size tWidth, tHeight
> >
> > I’ve tried various uses of parentheses and can’t get anything to work. Can anyone help? I can’t find a specific example anywhere in the dictionary or in the release notes. I need this in order to get a retina resolution snapshot on the retina iPad.
> >
> > Thanks,
> > Chris

     
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: new "at size" clause in export snapshot

Jan Schenkel
In reply to this post by Chris Sheffield-4
Hi Chris,

It turns out to be a difference between the syntax as described in the dictionary, and the actual parser implementation.
The MCExport::parse method in cmdsf.cpp is written such that the 'at size' clause needs to come after the 'from' clause and before the 'to' clause.

A quick test showed that the following variant compiles and works:
##
export snapshot from tObj at size tWidth, tHeight to tData as PNG
##

In other words, you should go to the Quality Center and file a report.
RunRev needs to either update the dictionary or the parser code :-)

HTH,

Jan Schenkel.
=====
Quartam Reports & PDF Library for LiveCode
www.quartam.com

=====
"As we grow older, we grow both wiser and more foolish at the same time."  (La Rochefoucauld)

--------------------------------------------
On Fri, 3/28/14, Chris Sheffield <[hidden email]> wrote:

 Subject: new "at size" clause in export snapshot
 To: "How to use LiveCode" <[hidden email]>
 Date: Friday, March 28, 2014, 10:59 AM
 
 Has anybody tried out the new “at
 size” clause in the export snapshot command introduced in
 LC 6.6? I can’t get it to work. In fact, my script won’t
 even compile if I include it.
 
     export snapshot from tObj to tData as PNG
 at size tWidth, tHeight
 
 I’ve tried various uses of parentheses and can’t get
 anything to work. Can anyone help? I can’t find a specific
 example anywhere in the dictionary or in the release notes.
 I need this in order to get a retina resolution snapshot on
 the retina iPad.
 
 Thanks,
 Chris
 _______________________________________________
 use-livecode mailing list
 [hidden email]
 Please visit this url to subscribe, unsubscribe and manage
 your subscription preferences:
 http://lists.runrev.com/mailman/listinfo/use-livecode
 

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: new "at size" clause in export snapshot

Chris Sheffield-4
Thanks, Jan. Making that change at least allowed my script to compile. Unfortunately, I got a run-time error. So something is still up. However, import snapshot works. I just had to take an extra step to deal with the created image.

I’ll get a bug report submitted asap.

Thanks,
Chris

On Mar 28, 2014, at 12:35 PM, Jan Schenkel <[hidden email]> wrote:

> Hi Chris,
>
> It turns out to be a difference between the syntax as described in the dictionary, and the actual parser implementation.
> The MCExport::parse method in cmdsf.cpp is written such that the 'at size' clause needs to come after the 'from' clause and before the 'to' clause.
>
> A quick test showed that the following variant compiles and works:
> ##
> export snapshot from tObj at size tWidth, tHeight to tData as PNG
> ##
>
> In other words, you should go to the Quality Center and file a report.
> RunRev needs to either update the dictionary or the parser code :-)
>
> HTH,
>
> Jan Schenkel.
> =====
> Quartam Reports & PDF Library for LiveCode
> www.quartam.com
>
> =====
> "As we grow older, we grow both wiser and more foolish at the same time."  (La Rochefoucauld)
>
> --------------------------------------------
> On Fri, 3/28/14, Chris Sheffield <[hidden email]> wrote:
>
> Subject: new "at size" clause in export snapshot
> To: "How to use LiveCode" <[hidden email]>
> Date: Friday, March 28, 2014, 10:59 AM
>
> Has anybody tried out the new “at
> size” clause in the export snapshot command introduced in
> LC 6.6? I can’t get it to work. In fact, my script won’t
> even compile if I include it.
>
>     export snapshot from tObj to tData as PNG
> at size tWidth, tHeight
>
> I’ve tried various uses of parentheses and can’t get
> anything to work. Can anyone help? I can’t find a specific
> example anywhere in the dictionary or in the release notes.
> I need this in order to get a retina resolution snapshot on
> the retina iPad.
>
> Thanks,
> Chris
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage
> your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: new "at size" clause in export snapshot

Jan Schenkel
That's odd, I tested it earlier on a Windows machine, and again just now on a Mac, with LC 6.6

Here's my recipe:
- create a new stack
- drag an image and a button on it
- set the button script to:
##
on mouseUp
   local tObj, tData, tHeight, tWidth
   put the long id of me into tObj
   put 4 * the height of tObj into tHeight
   put 4 * the width of tObj into tWidth
   export snapshot from tObj at size tWidth, tHeight to tData as PNG
   put tData into image 1
end mouseUp
##

Click on the button and the image gets set without any issues.

Jan Schenkel.
=====
Quartam Reports & PDF Library for LiveCode
www.quartam.com

=====
"As we grow older, we grow both wiser and more foolish at the same time."  (La Rochefoucauld)

--------------------------------------------
On Fri, 3/28/14, Chris Sheffield <[hidden email]> wrote:

 Subject: Re: new "at size" clause in export snapshot
 To: "How to use LiveCode" <[hidden email]>
 Date: Friday, March 28, 2014, 2:21 PM
 
 Thanks, Jan. Making that change at
 least allowed my script to compile. Unfortunately, I got a
 run-time error. So something is still up. However, import
 snapshot works. I just had to take an extra step to deal
 with the created image.
 
 I’ll get a bug report submitted asap.
 
 Thanks,
 Chris
 

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: new "at size" clause in export snapshot

Chris Sheffield-4
Odd. Yes, this does work just fine. Not sure what I did earlier. All is well again. Thanks.


On Mar 28, 2014, at 3:49 PM, Jan Schenkel <[hidden email]> wrote:

> That's odd, I tested it earlier on a Windows machine, and again just now on a Mac, with LC 6.6
>
> Here's my recipe:
> - create a new stack
> - drag an image and a button on it
> - set the button script to:
> ##
> on mouseUp
>   local tObj, tData, tHeight, tWidth
>   put the long id of me into tObj
>   put 4 * the height of tObj into tHeight
>   put 4 * the width of tObj into tWidth
>   export snapshot from tObj at size tWidth, tHeight to tData as PNG
>   put tData into image 1
> end mouseUp
> ##
>
> Click on the button and the image gets set without any issues.
>
> Jan Schenkel.
> =====
> Quartam Reports & PDF Library for LiveCode
> www.quartam.com
>
> =====
> "As we grow older, we grow both wiser and more foolish at the same time."  (La Rochefoucauld)
>
> --------------------------------------------
> On Fri, 3/28/14, Chris Sheffield <[hidden email]> wrote:
>
> Subject: Re: new "at size" clause in export snapshot
> To: "How to use LiveCode" <[hidden email]>
> Date: Friday, March 28, 2014, 2:21 PM
>
> Thanks, Jan. Making that change at
> least allowed my script to compile. Unfortunately, I got a
> run-time error. So something is still up. However, import
> snapshot works. I just had to take an extra step to deal
> with the created image.
>
> I’ll get a bug report submitted asap.
>
> Thanks,
> Chris
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode