Re: Handlers for reading/writing image density info in PNG/JPEG?

2014-06-13 Thread John Craig

Hi, Trevor.  Check out http://splash21.com/downloads/sQuiRtGPL.zip
There's a function in the library for creating PNG images and also the 
required functions for deflate compression and crc32 checksums - maybe 
those will help  you getting started on the PNG side of things.


:)


On 12/06/2014 18:16, Trevor DeVore wrote:

Hi everyone,

Now that LiveCode has high-dpi support we can create images using export
snapshot whose physical pixels dimensions are not the dimensions the image
should be displayed at. For example, on an OS X retina computer with a
screen pixel scale of 2 you could create an image that has 600x300 pixels
of data but should be displayed at 300x150.

Currently the engine does not provide a way to embed the pixel density
information in the PNG/JPEG files that it can create. In addition, the
engine cannot read pixel density information from images on the clipboard.
This means we can't determine what dimensions the clipboard image should be
displayed at.

I'm wondering if anybody has already created handlers for reading and
writing pixel density information to JPEG and PNG data that they would be
willing to share?

If not I'll take a look at the file formats and come up with something but
if someone already did this that would be great.

Thanks,




___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Put a stack into a variable?

2014-06-13 Thread Richard Gaskin
I'd like to put a stack into a variable, but without reading the stack 
file from disk.


Is there a way to do this?

I'm considering a scenario in which we have a standalone with the 
securityPermissions all turned off except network.  At that point we 
have a app more secure than any browser.  So far so good:  we can 
download and run any stack with complete safety for the local system.


In that environment I'd like to be able to let the user modify the 
stacks, and save those back to the server.


I have the POST worked out with encryption and all that, so that much is 
good - for data within the stack, but not the stack itself.


It would be very convenient in this scenario if I could somehow get the 
data that comprises the stack from memory and put it into a variable to 
send back to the server.


Stephen Barncard has done some experiments with the copy command, but 
I'm unable to find a way to obtain the binary date from the clipboard 
contents when they contain LC objects.  Also, it would be nice to be 
able to also get any substacks, but the copy command only copies the 
stack itself.


Ideally what I'd have is the same as we get from doing this:

  put url tPathToSomeRemoteStack into tVar
  go stack tVar

At that point, tVar contains the stack data - substacks and all, just as 
if it were read from disk.


So now the trick is to find a way to get that from the current copy of 
the stack file in memory - any ideas?


--
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 Follow me on Twitter:  http://twitter.com/FourthWorldSys

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Be, OpenDoc, P S and...

2014-06-13 Thread Wolfgang Keller
 Remember OpenDoc? Publish and subscribe? :-)

http://www.linkbackproject.org/

MacOSX-specific afaik.

Sincerely,

Wolfgang

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Put a stack into a variable?

2014-06-13 Thread Richard Gaskin
In case anyone needs this, this works in a button but not in the Message 
Box, which is why I had missed this before:


on mouseUp
   copy this stack
   put the clipboardData[objects] into tVar
   put tVar
end mouseUp

--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 
 ambassa...@fourthworld.comhttp://www.FourthWorld.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Put a stack into a variable?

2014-06-13 Thread Mark Schonewille

How do you paste the stack?

--
Best regards,

Mark Schonewille

Economy-x-Talk Consulting and Software Engineering
Homepage: http://economy-x-talk.com
Twitter: http://twitter.com/xtalkprogrammer
KvK: 50277553

Installer Maker for LiveCode:
http://qery.us/468

Buy my new book Programming LiveCode for the Real Beginner 
http://qery.us/3fi


LiveCode on Facebook:
https://www.facebook.com/groups/runrev/

On 6/13/2014 23:10, Richard Gaskin wrote:

In case anyone needs this, this works in a button but not in the Message
Box, which is why I had missed this before:

on mouseUp
copy this stack
put the clipboardData[objects] into tVar
put tVar
end mouseUp



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Put a stack into a variable?

2014-06-13 Thread Richard Gaskin

Mark Schonewille wrote:

How do you paste the stack?


If you use the copy command on a stack, the paste command will do the 
same as the clone command, duplicating the stack with a name prepended 
with Copy of.


That said, it appears there's a difference in the binary data of a 
copied stack and a saved copy of the same stack file.  For starters, LC 
6.6.2 saved in the v5 format, but copied stacks have a 2700 header for 
the old 2.7 format.  Bug maybe?


But worse, even when I save a stack in the old 2.7 format, the data in 
the stack file still differs from the data in the clipboard is a 
surprisingly large number of ways, including an apparent replication of 
nearly the entire data in the clipboard, and with a different header 
than used in the stack file.


So right now, my dream of being able to get a stack's data from RAM to 
save to a server without going to disk as an intermediary step is hosed. :(


--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 
 ambassa...@fourthworld.comhttp://www.FourthWorld.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Put a stack into a variable?

2014-06-13 Thread Dr. Hawkins
On Fri, Jun 13, 2014 at 2:17 PM, Mark Schonewille 
m.schonewi...@economy-x-talk.com wrote:

 How do you paste the stack?


It seems to me that I played around with this a while back (or did someone
else play around on my musings?), and found that cards could be
cut/moved/paste like this.


-- 
Dr. Richard E. Hawkins, Esq.
(702) 508-8462
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Put a stack into a variable?

2014-06-13 Thread Mark Schonewille

Hi,

If you want to move cards within a stack, you can just set the number.

--
Best regards,

Mark Schonewille

Economy-x-Talk Consulting and Software Engineering
Homepage: http://economy-x-talk.com
Twitter: http://twitter.com/xtalkprogrammer
KvK: 50277553

Installer Maker for LiveCode:
http://qery.us/468

Buy my new book Programming LiveCode for the Real Beginner 
http://qery.us/3fi


LiveCode on Facebook:
https://www.facebook.com/groups/runrev/

On 6/13/2014 23:59, Dr. Hawkins wrote:

On Fri, Jun 13, 2014 at 2:17 PM, Mark Schonewille 
m.schonewi...@economy-x-talk.com wrote:


How do you paste the stack?



It seems to me that I played around with this a while back (or did someone
else play around on my musings?), and found that cards could be
cut/moved/paste like this.




___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Put a stack into a variable?

2014-06-13 Thread Dr. Hawkins
On Fri, Jun 13, 2014 at 3:06 PM, Mark Schonewille 
m.schonewi...@economy-x-talk.com wrote:

 If you want to move cards within a stack, you can just set the number.


My interest is actually in passing forms from my service to a compiled
customer application.  So if the Western District of Lincoln has it's own
form, the customer could get it from my server, stash it to a local
database, and it would get inserted on program run.  Possibly even for
saving customer generated forms to the local db to be inserted at runtime.


-- 
Dr. Richard E. Hawkins, Esq.
(702) 508-8462
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Put a stack into a variable?

2014-06-13 Thread Mark Schonewille

Hi,

If you want to add a new form to an existing application, you can save 
the card with the form on your server and download and save it locally 
when the app starts. No database involved.


If your app needs to get new form data from the server, that's even 
easier. Just download the data and save them in the local database.


It is important to treat interface and data separately.

--
Best regards,

Mark Schonewille

Economy-x-Talk Consulting and Software Engineering
Homepage: http://economy-x-talk.com
Twitter: http://twitter.com/xtalkprogrammer
KvK: 50277553

Installer Maker for LiveCode:
http://qery.us/468

Buy my new book Programming LiveCode for the Real Beginner 
http://qery.us/3fi


LiveCode on Facebook:
https://www.facebook.com/groups/runrev/

On 6/14/2014 00:09, Dr. Hawkins wrote:

On Fri, Jun 13, 2014 at 3:06 PM, Mark Schonewille 
m.schonewi...@economy-x-talk.com wrote:


If you want to move cards within a stack, you can just set the number.



My interest is actually in passing forms from my service to a compiled
customer application.  So if the Western District of Lincoln has it's own
form, the customer could get it from my server, stash it to a local
database, and it would get inserted on program run.  Possibly even for
saving customer generated forms to the local db to be inserted at runtime.




___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Put a stack into a variable?

2014-06-13 Thread Mark Schonewille
It means that you can make it work. Go to url won't work, but you can 
download the data, set clipboarddata[objects] and paste.


Not sure if it is a bug. It is if copied stacks lose properties that 
aren't part of the old format. Otherwise I'd call it a feature request.


--
Best regards,

Mark Schonewille

Economy-x-Talk Consulting and Software Engineering
Homepage: http://economy-x-talk.com
Twitter: http://twitter.com/xtalkprogrammer
KvK: 50277553

Installer Maker for LiveCode:
http://qery.us/468

Buy my new book Programming LiveCode for the Real Beginner 
http://qery.us/3fi


LiveCode on Facebook:
https://www.facebook.com/groups/runrev/

On 6/13/2014 23:48, Richard Gaskin wrote:

Mark Schonewille wrote:

How do you paste the stack?


If you use the copy command on a stack, the paste command will do the
same as the clone command, duplicating the stack with a name prepended
with Copy of.

That said, it appears there's a difference in the binary data of a
copied stack and a saved copy of the same stack file.  For starters, LC
6.6.2 saved in the v5 format, but copied stacks have a 2700 header for
the old 2.7 format.  Bug maybe?

But worse, even when I save a stack in the old 2.7 format, the data in
the stack file still differs from the data in the clipboard is a
surprisingly large number of ways, including an apparent replication of
nearly the entire data in the clipboard, and with a different header
than used in the stack file.

So right now, my dream of being able to get a stack's data from RAM to
save to a server without going to disk as an intermediary step is hosed. :(



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Put a stack into a variable?

2014-06-13 Thread Alain Farmer
This may seem off-topic, sort-of, but it might be simpler to transmit an 
exhaustive DESCRIPTION of the stack, and have their LiveCode create it all from 
scratch. Then it gets filled with content that is gotten by URL. Kind-of like 
how web-pages work. It's all text, no binaries.



On Friday, June 13, 2014 7:00:08 PM, Mark Schonewille 
m.schonewi...@economy-x-talk.com wrote:
 


It means that you can make it work. Go to url won't work, but you can 
download the data, set clipboarddata[objects] and paste.

Not sure if it is a bug. It is if copied stacks lose properties that 
aren't part of the old format. Otherwise I'd call it a feature request.

--
Best regards,

Mark Schonewille

Economy-x-Talk Consulting and Software Engineering
Homepage: http://economy-x-talk.com
Twitter: http://twitter.com/xtalkprogrammer
KvK: 50277553

Installer Maker for LiveCode:
http://qery.us/468

Buy my new book Programming LiveCode for the Real Beginner 
http://qery.us/3fi

LiveCode on Facebook:
https://www.facebook.com/groups/runrev/


On 6/13/2014 23:48, Richard Gaskin wrote:
 Mark Schonewille wrote:
 How do you paste the stack?

 If you use the copy command on a stack, the paste command will do the
 same as the clone command, duplicating the stack with a name prepended
 with Copy of.

 That said, it appears there's a difference in the binary data of a
 copied stack and a saved copy of the same stack file.  For starters, LC
 6.6.2 saved in the v5 format, but copied stacks have a 2700 header for
 the old 2.7 format.  Bug maybe?

 But worse, even when I save a stack in the old 2.7 format, the data in
 the stack file still differs from the data in the clipboard is a
 surprisingly large number of ways, including an apparent replication of
 nearly the entire data in the clipboard, and with a different header
 than used in the stack file.

 So right now, my dream of being able to get a stack's data from RAM to
 save to a server without going to disk as an intermediary step is hosed. :(


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Put a stack into a variable?

2014-06-13 Thread Dr. Hawkins
On Fri, Jun 13, 2014 at 3:42 PM, Mark Schonewille 
m.schonewi...@economy-x-talk.com wrote:

 If you want to add a new form to an existing application, you can save the
 card with the form on your server and download and save it locally when the
 app starts. No database involved.


There is a local database for preferences, data, and so forth.  Also, it is
intrinsically networked.  The installation at my office, for example, has
the postgres server on my desk, which serves to itself, my paralegal, my
laptop over vpn, a remote assistant via vpn, etc.  When this is complete,
it and every other central machine would also periodically update with the
upstream root machine for updates (whether forms, dictionary of creditor
additions, finding out if there's a new version, license keys, etc.).

Anyway, for however many machines there are at a law office, they all need
to have access to the same cards, and tho.se cards are going to come from
an upstream postgreSQL server.  Keeping them on the corporate db server
(where they may well cache down to the local machines) seems the natural
solution; otherwise I'm dealing with files syncing to the dbs.


 If your app needs to get new form data from the server, that's even
 easier. Just download the data and save them in the local database.

 It is important to treat interface and data separately.


In this space, though, interface *is* data to some extent.  There are
something like 216 judicial districts in the US, and some attorneys
regularly filing in up to a half dozen or so--and all issueing new forms at
unpredictable intervals




-- 
Dr. Richard E. Hawkins, Esq.
(702) 508-8462
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Book on Programming by Example

2014-06-13 Thread Mark Smith
Alejandro Tejada wrote
 Hi All,
 
 Bookmark this webpage:
 http://web.media.mit.edu/~lieber/Your-Wish/
 
 to read this mind opening book:

I dunno about that Alejandro, I think I still prefer

main()
 {
printf(hello world);
 }

or, if using LC

on mouseUp
   put hello world after msg
end mouseUp

Cheers,

Mark ;-)





--
View this message in context: 
http://runtime-revolution.278305.n4.nabble.com/Book-on-Programming-by-Example-tp4680341p4680481.html
Sent from the Revolution - User mailing list archive at Nabble.com.

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Put a stack into a variable?

2014-06-13 Thread Mike Bonner
If I can find it, somewhere around here I have a rudimentary vcs that used
the copy stack method.  Seemed to work well (I could pop stacks into an
array and save the array to a file then reconstitute a stacks structure
from the array at a later date)  unfortunately, catastrophic hardware
failure assisted me in losing track of some things.  Think I have a backup
here somewhere maybe and can dig it up if it would be helpful, but from
what richard says, i'd be a little leery of the concept.


On Fri, Jun 13, 2014 at 6:40 PM, Dr. Hawkins doch...@gmail.com wrote:

 On Fri, Jun 13, 2014 at 3:42 PM, Mark Schonewille 
 m.schonewi...@economy-x-talk.com wrote:

  If you want to add a new form to an existing application, you can save
 the
  card with the form on your server and download and save it locally when
 the
  app starts. No database involved.
 

 There is a local database for preferences, data, and so forth.  Also, it is
 intrinsically networked.  The installation at my office, for example, has
 the postgres server on my desk, which serves to itself, my paralegal, my
 laptop over vpn, a remote assistant via vpn, etc.  When this is complete,
 it and every other central machine would also periodically update with the
 upstream root machine for updates (whether forms, dictionary of creditor
 additions, finding out if there's a new version, license keys, etc.).

 Anyway, for however many machines there are at a law office, they all need
 to have access to the same cards, and tho.se cards are going to come from
 an upstream postgreSQL server.  Keeping them on the corporate db server
 (where they may well cache down to the local machines) seems the natural
 solution; otherwise I'm dealing with files syncing to the dbs.


  If your app needs to get new form data from the server, that's even
  easier. Just download the data and save them in the local database.
 
  It is important to treat interface and data separately.
 

 In this space, though, interface *is* data to some extent.  There are
 something like 216 judicial districts in the US, and some attorneys
 regularly filing in up to a half dozen or so--and all issueing new forms at
 unpredictable intervals




 --
 Dr. Richard E. Hawkins, Esq.
 (702) 508-8462
 ___
 use-livecode mailing list
 use-livecode@lists.runrev.com
 Please visit this url to subscribe, unsubscribe and manage your
 subscription preferences:
 http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode