PDFs

2011-11-02 Thread Richmond

on the Supercard list:

Re: [SC] Importing PDF files

Set pictureData of card graphic PDF to myPDFfilepath

I wonder ? ? ?

___
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


handler to connect buttons with a line

2011-11-02 Thread Kresten Bjerg


To James
Thank you for new reply to my first question
Because month-shift and time-differences you missed my followup:
I repeat it here
The previous replies suggested to produce new buttons and  specify new scripts 
for the buttons.
But the buttons will  already be named and produced by the user and come with a 
script of their own, with mouseups,  Mousewithin, mousestilldown and doomed 
before user will get to line-connect them.
The solution therefore has to follow another way, suggested outside this list 
by Mark Schonewille, and by Glen Boysza, namely to organize using only the 
custom property functions.
Thus, what I need is a superior handler, which will permit the user to pair 
and  bond their own  buttons in a flexible network :  a handler, (to place in 
a special button), which can implement all  such  pairings:

a)  direct user of standalone to click first button, then to  click second 
button, (select two arbitrary buttons)

b)  create their connecting line

c)   put the two button IDs into line customvariable and

d)   lineID into the customvariables of each of the two buttons (without 
deleting previous lineIDs !)

Unfortunately I don't have the skills to script this, - so I am hoping someone 
on the list, with better skills,  might give it a try.

___
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: PDFs

2011-11-02 Thread Mark Schonewille
Hi Richmond,

This imports only the first page of the PDF. IIRC, in the recent discussion on 
this list, OP wanted to browse a PDF.

--
Best regards,

Mark Schonewille

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

Become our partner in sales http://qery.us/16r Start selling Color Converter 
today. 20% commission!

On 2 nov 2011, at 08:41, Richmond wrote:

 on the Supercard list:
 
 Re: [SC] Importing PDF files
 
 Set pictureData of card graphic PDF to myPDFfilepath
 
 I wonder ? ? ?


___
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: PDFs

2011-11-02 Thread Richmond

On 11/02/2011 12:40 PM, Mark Schonewille wrote:

Hi Richmond,

This imports only the first page of the PDF. IIRC, in the recent discussion on 
this list, OP wanted to browse a PDF.


Notwithstanding, that would be better than the 'nothing' currently 
available in Livecode.



--
Best regards,

Mark Schonewille

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

Become our partner in sales http://qery.us/16r Start selling Color Converter 
today. 20% commission!

On 2 nov 2011, at 08:41, Richmond wrote:


on the Supercard list:

Re: [SC] Importing PDF files

Set pictureData of card graphic PDF to myPDFfilepath

I wonder ? ? ?


___
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


Classic (3.5) CGI and post to a different server... Help please!

2011-11-02 Thread Malte Brill
Hi,

I am trying to post from a rev 3.5 CGI to another server. This appears to fail 
silently. I tried including libURL as a front / backscript to no avail. Has 
anyone of you successfully posted to a different server from a rev 3.5 CGI?

Any pointer much appreciated,

Malte
___
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


Nice cm ruler. Only a click away

2011-11-02 Thread Michael Kristensen
Hi there

Here is a nice cm ruler that span fx a iMac 27. Only a click away.

Make a new wd
Make a btn

Put this script in it and click...

on mouseUp
   lock screen
   put 72/2.54 into Q
   
   repeat with i = 0 to 90
  new grc
  set the style of last grc to Polygon
  set the points of last grc to 25,300  return  25,307
  set the loc of last grc to 25+ i*Q,300
  set the selected of last grc to true
  
  new grc
  set the style of last grc to Polygon
  set the points of last grc to 39,306  return  39,310
  set the loc of last grc to 39+ i*Q,302
  set the selected of last grc to true
  
  new fld
  set the opaque of last fld to false
  set the width of last fld to 17
  set the height of last fld to 15
  set the textsize of last fld to 9
  set the showBorder of last fld to false
  set the margins of last fld to 0,4,0,4
  set the textAlign of last fld to center
  set the lockText of last fld to true
  set the autoHilite of last fld to false
  set the showFocusBorder of last fld to false
  set loc of last fld to 25+ i*Q,292
  put i into last fld
  set the selected of last fld to true
   end repeat
   
   group
   
   set the showBorder of last grp to true
   set the lineSize of last grp to 1
   set the threeD of last grp to false
   set the height of last grp to 27
   set the opaque of last grp to true
   set the backgroundColor of last grp to 255,255,205
   set the borderColor of last grp to 147,147,147
end mouseUp

Michael
CEO  FreeCmRulersForAll
www.FreeCmRulersForAll.org

___
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: Nice cm ruler. Only a click away

2011-11-02 Thread René Micout

Le 2 nov. 2011 à 14:34, Michael Kristensen a écrit :

 set the style of last grc to Polygon

That line don't accept by script editor...  :-(
___
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: Nice cm ruler. Only a click away

2011-11-02 Thread Mark Schonewille
Put quotes around it?

Well done, Michael. I like it.

--
Best regards,

Mark Schonewille

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

Become our partner in sales http://qery.us/16r Start selling Color Converter 
today. 20% commission!

On 2 nov 2011, at 15:02, René Micout wrote:

 Sorry...
 In strict compilation mode ...
 But... not accepted...
 
 Le 2 nov. 2011 à 14:58, René Micout a écrit :
 
 
 Le 2 nov. 2011 à 14:34, Michael Kristensen a écrit :
 
 set the style of last grc to Polygon
 
 That line don't accept by script editor...  :-(


___
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: Nice cm ruler. Only a click away

2011-11-02 Thread Roger Eller
On Wed, Nov 2, 2011 at 9:34 AM, Michael Kristensen wrote:

 Hi there

 Here is a nice cm ruler that span fx a iMac 27. Only a click away.

 Michael
 CEO  FreeCmRulersForAll
 www.FreeCmRulersForAll.org http://www.freecmrulersforall.org/


VERY nice!
I added one line, just before end mouseUp...
*

set* the script of last grp to on mouseDown  cr  grab me  cr  end
mouseDown

~Roger
___
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


[OT] Duqu

2011-11-02 Thread Richmond


   http://www.bbc.co.uk/news/technology-15554361
   http://www.bbc.co.uk/news/technology-15554361


Another reason why I'm not very keen on Windows.

I mean; how can you go on producing an operating system that seems to 
leak like a sieve,

and expect people to pay for it?

When Oracle Virtual Box 4.1 hosed my Ubuntu 11.04 I couldn't complain as 
everything was FREE;

but I just downloaded another system and got on with things.

___
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: Classic (3.5) CGI and post to a different server... Help please!

2011-11-02 Thread Malte Brill
Nevermind...

Got it working now :) THis is all a little easier with the new server engine 
though.
___
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: PDFs

2011-11-02 Thread tkuyp...@telenet.be
And what's wrong with:

on mouseUp
   answer file Select a PDF
   if it =  then exit mouseUp
   set the filename of player test to it
end mouseUp

Met vriendelijke groeten,
Warm Regards,

Ton Kuypers
+32 (0) 477 739 530

Aardbemden 11 • B-2400 • Mol • Belgium
www.publishingtools4u.com




On 2-nov-2011, at 12:00, Richmond wrote:

 On 11/02/2011 12:40 PM, Mark Schonewille wrote:
 Hi Richmond,
 
 This imports only the first page of the PDF. IIRC, in the recent discussion 
 on this list, OP wanted to browse a PDF.
 
 Notwithstanding, that would be better than the 'nothing' currently available 
 in Livecode.
 
 --
 Best regards,
 
 Mark Schonewille
 
 Economy-x-Talk Consulting and Software Engineering
 Homepage: http://economy-x-talk.com
 Twitter: http://twitter.com/xtalkprogrammer
 KvK: 50277553
 
 Become our partner in sales http://qery.us/16r Start selling Color Converter 
 today. 20% commission!
 
 On 2 nov 2011, at 08:41, Richmond wrote:
 
 on the Supercard list:
 
 Re: [SC] Importing PDF files
 
 Set pictureData of card graphic PDF to myPDFfilepath
 
 I wonder ? ? ?
 
 ___
 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

___
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: PDFs

2011-11-02 Thread Mark Schonewille
Hi Ton,

Nothing is wrong with that, as long as you're on a Mac. It won't work on other 
platforms.

(Of course, SuperCard is Mac-only).

--
Best regards,

Mark Schonewille

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

Become our partner in sales http://qery.us/16r Start selling Color Converter 
today. 20% commission!

On 2 nov 2011, at 16:48, tkuyp...@telenet.be wrote:

 And what's wrong with:
 
 on mouseUp
   answer file Select a PDF
   if it =  then exit mouseUp
   set the filename of player test to it
 end mouseUp
 
 Met vriendelijke groeten,
 Warm Regards,
 
 Ton Kuypers
 +32 (0) 477 739 530
 
 Aardbemden 11 • B-2400 • Mol • Belgium
 www.publishingtools4u.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: PDFs

2011-11-02 Thread tkuyp...@telenet.be
I rest my case ;-)

Met vriendelijke groeten,
Warm Regards,

Ton Kuypers
+32 (0) 477 739 530

Aardbemden 11 • B-2400 • Mol • Belgium
www.publishingtools4u.com




On 2-nov-2011, at 16:53, Mark Schonewille wrote:

 Hi Ton,
 
 Nothing is wrong with that, as long as you're on a Mac. It won't work on 
 other platforms.
 
 (Of course, SuperCard is Mac-only).
 
 --
 Best regards,
 
 Mark Schonewille
 
 Economy-x-Talk Consulting and Software Engineering
 Homepage: http://economy-x-talk.com
 Twitter: http://twitter.com/xtalkprogrammer
 KvK: 50277553
 
 Become our partner in sales http://qery.us/16r Start selling Color Converter 
 today. 20% commission!
 
 On 2 nov 2011, at 16:48, tkuyp...@telenet.be wrote:
 
 And what's wrong with:
 
 on mouseUp
  answer file Select a PDF
  if it =  then exit mouseUp
  set the filename of player test to it
 end mouseUp
 
 Met vriendelijke groeten,
 Warm Regards,
 
 Ton Kuypers
 +32 (0) 477 739 530
 
 Aardbemden 11 • B-2400 • Mol • Belgium
 www.publishingtools4u.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

___
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


On CloseField and textStyle/textColor changes?

2011-11-02 Thread JOHN PATTEN
Hi All…

I have a field that updates a record in a SQLite database via a on closeField 
handler when the quantity of the text changes. I would like the record to be 
updated if the user just changes the color of the text or the style of the text 
too. Currently if a user only changes the color of the text the on closeField 
does not update the SQLite record?

I tired to add a space after the last word in the field, but apparently adding 
text via script does not register the closeField call either. I have to 
physically type the space on the keyboard to have the closeField handler work 
and update the record.

Any advice?

Thank you!

John Patten
SUSD
___
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: On CloseField and textStyle/textColor changes?

2011-11-02 Thread Bob Sneidar
Store the value and color of the field in an openField handler, then trap for 
exitField which will trigger whether or not changes are made. In the exitField 
handler, check for parity with your stored values and proceed accordingly. 
Remember to update your changed values to the stored values. Properties work 
well for this. 

Bob


On Nov 2, 2011, at 7:40 AM, JOHN PATTEN wrote:

 Hi All…
 
 I have a field that updates a record in a SQLite database via a on 
 closeField handler when the quantity of the text changes. I would like the 
 record to be updated if the user just changes the color of the text or the 
 style of the text too. Currently if a user only changes the color of the text 
 the on closeField does not update the SQLite record?
 
 I tired to add a space after the last word in the field, but apparently 
 adding text via script does not register the closeField call either. I have 
 to physically type the space on the keyboard to have the closeField handler 
 work and update the record.
 
 Any advice?
 
 Thank you!
 
 John Patten
 SUSD
 ___
 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: On CloseField and textStyle/textColor changes?

2011-11-02 Thread Pete
Hi John,
After adding the space by script, just send a closeField message to the
control.
Pete
Molly's Revenge http://www.mollysrevenge.com




On Wed, Nov 2, 2011 at 10:40 AM, JOHN PATTEN johnpat...@me.com wrote:

 Hi All…

 I have a field that updates a record in a SQLite database via a on
 closeField handler when the quantity of the text changes. I would like the
 record to be updated if the user just changes the color of the text or the
 style of the text too. Currently if a user only changes the color of the
 text the on closeField does not update the SQLite record?

 I tired to add a space after the last word in the field, but apparently
 adding text via script does not register the closeField call either. I have
 to physically type the space on the keyboard to have the closeField handler
 work and update the record.

 Any advice?

 Thank you!

 John Patten
 SUSD
 ___
 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: PDFs

2011-11-02 Thread Richmond

On 11/02/2011 05:56 PM, tkuyp...@telenet.be wrote:

I rest my case ;-)


Which case is that? Certainly no joy on Linux (which, by-the-way, is 
supposedly now

outstripping Mac).


Met vriendelijke groeten,
Warm Regards,

Ton Kuypers
+32 (0) 477 739 530

Aardbemden 11 • B-2400 • Mol • Belgium
www.publishingtools4u.com




On 2-nov-2011, at 16:53, Mark Schonewille wrote:


Hi Ton,

Nothing is wrong with that, as long as you're on a Mac. It won't work on other 
platforms.

(Of course, SuperCard is Mac-only).

--
Best regards,

Mark Schonewille

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

Become our partner in sales http://qery.us/16r Start selling Color Converter 
today. 20% commission!

On 2 nov 2011, at 16:48, tkuyp...@telenet.be wrote:


And what's wrong with:

on mouseUp
  answer file Select a PDF
  if it =  then exit mouseUp
  set the filename of player test to it
end mouseUp

Met vriendelijke groeten,
Warm Regards,

Ton Kuypers
+32 (0) 477 739 530

Aardbemden 11 • B-2400 • Mol • Belgium
www.publishingtools4u.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

___
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


Style Question

2011-11-02 Thread Michael Doub
I am working on a project that is going to manipulating records of data.  What 
is the best approach to identifying the individual components for use in 
different scripts?   

If the data was represented as some delimited string, then each item could be 
defined as a constant.  The question would then be how to manage these 
constants in multiple scripts.  I have not found any references to include 
files, which was my first thought.

if the data was represented in an array these solves the ability to reference 
the items easily enough but then I assume that you would have to create some 
special code to format the code in the correct order for consistent input or 
output ordering

I see when using SQL there is an option of identifying each data element 
separately, but if you use the array syntax you seem to have the same problem 
as a delimited string where you need to define constants to define element  
numbers.

Can anyone provide any sage wisdom from the school of hard knocks?

Thanks
   Mike




___
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: Style Question

2011-11-02 Thread Pete
Hi Michael,
I'm not sure I completely understand what you want to do but here's a few
thoughts anyway!

If you want to define constants to refer to item numbers within a delimited
string, you can define globals for each item number and initialise them to
their values somewhere in your application startup script.  This requires
that you declare those globals in every script that refers to them (just
their names, not the values). And yes, an include file function would be
great! Alternatively, you might be able to centralise your data handling in
a single script and make calls to handlers in it, but tough to know if that
would work withoout more info.

If you're using an SQL database, you can eliminate the need to reference
elements of the returned data by element number by using revQueryDatabase.
 It creates a recordset without returning any data directly to you.  You
then use the revMoveTo series of calls to navigate through the records
in the recordset.  revDatabaseColumnNamed will return the value of a named
column from the current record in the recordset so you don't have to be
concerned with knowing where in the record the column occurs.


Pete
Molly's Revenge http://www.mollysrevenge.com




On Wed, Nov 2, 2011 at 12:20 PM, Michael Doub m...@doub.com wrote:

 I am working on a project that is going to manipulating records of data.
  What is the best approach to identifying the individual components for use
 in different scripts?

 If the data was represented as some delimited string, then each item could
 be defined as a constant.  The question would then be how to manage these
 constants in multiple scripts.  I have not found any references to include
 files, which was my first thought.

 if the data was represented in an array these solves the ability to
 reference the items easily enough but then I assume that you would have to
 create some special code to format the code in the correct order for
 consistent input or output ordering

 I see when using SQL there is an option of identifying each data element
 separately, but if you use the array syntax you seem to have the same
 problem as a delimited string where you need to define constants to define
 element  numbers.

 Can anyone provide any sage wisdom from the school of hard knocks?

 Thanks
   Mike




 ___
 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: PDFs

2011-11-02 Thread Graham Samuel
As one of the most persistent LC developers to try to incorporate PDFs as 
humble bitmaps, I can report that I have actually made the 
ImageMagick/GhostScript route work, but the installation side is messy on Macs 
- don't know about Linux. It is kind of acceptable on PCs, but there I am 
getting increasingly hopeful of another solution for PCs: watch this space. 
Sadly that won't work for your Richmond, but I could explain more about 
ImageMagick off list if you like. Let me say quickly that all the ideas I have 
ever had about solving this problem have been inspired by contributions to this 
list.

Graham

On Wed, 02 Nov 2011 13:00:21 +0200, Richmond richmondmathew...@gmail.com 
wrote:
 
 On 11/02/2011 12:40 PM, Mark Schonewille wrote:
 Hi Richmond,
 
 This imports only the first page of the PDF. IIRC, in the recent discussion 
 on this list, OP wanted to browse a PDF.
 
 Notwithstanding, that would be better than the 'nothing' currently 
 available in Livecode.
 
 --
 Best regards,
 
 Mark Schonewille
 
 Economy-x-Talk Consulting and Software Engineering
 Homepage: http://economy-x-talk.com
 Twitter: http://twitter.com/xtalkprogrammer
 KvK: 50277553
 
 Become our partner in sales http://qery.us/16r Start selling Color Converter 
 today. 20% commission!
 
 On 2 nov 2011, at 08:41, Richmond wrote:
 
 on the Supercard list:
 
 Re: [SC] Importing PDF files
 
 Set pictureData of card graphic PDF to myPDFfilepath
 
 I wonder ? ? ?

 
___
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


Passing Ampersand and Dot to PostGreSQL - MySQL

2011-11-02 Thread Sivakatirswami
I'm having some difficulty with passing data from a web form to a 
PostGreSQL database. I'm using iRev on the server and gFormData has all 
the data in the array. After handling all the data, running the CC 
charges, sending notifications, everything works, but my final functions 
to insert the data into the database fail in certain cases.


i use this method to build the query:


put INSERT INTO donations (first_name, last_name, anonymous, 
email_address,into  tSQLQuery
put addr1, addr2, city, state, postal_code, country, phone_no, 
created_on,  after tSQLQuery
put  entry_point, comment, amount, monetra_user, monetra_msg, cc_no)  
after tSQLQuery
put VALUES ('#FIRST_NAME', '#LAST_NAME', '#ANONYMOUS', 
'#EMAIL_ADDRESS',   after  tSQLQuery
Put '#ADDR1', '#ADDR2', '#CITY', '#STATE', '#POSTAL_CODE', '#COUNTRY', 
'#PHONE_NO', '#CREATED_ON',  after tSQLQuery
Put '#ENTRY_POINT', '#COMMENT', '#AMOUNT', '#MONETRA_USER', 
'#MONETRA_MSG', '#CC_NO'); after tSQLQuery


the poke it like this:

replace #FIRST_NAME with gFormData[first_name]  in tSQLQuery
replace #COMMENT with gFormData[comment]  in tSQLQuery
replace #EMAIL_ADDRESS with gFormData[email_address]  in tSQLQuery

when the data in the array values contain certain characters, the 
insertion query fails.


I have been able to definitively diagnose at least two cases (there are 
probably more)


if the data contains an ampersand or a dot, the query fails  e.g these 
will all cause the insertion to fail:


 First Name:  Ravi  Sheela # ampersand

 Comment: All the books  audio [etc.]  # ampersand

 email address: gail.w...@verizon.com  # dot in the email address.

so, I'm not sure what to do.

 I need to escape all the special chars (I don't even have a list of 
what they are) in the gFormData array values that will break the SQL 
query. And we also have to block SQL injection attempts at the same time


My baby xTalk  method would be tortuous: for each key/value in the 
gFormData array


put gFormData[first_name]  in tFirstName

put fixBadChars(tFirstName) into tFirstName

replace #FIRST_NAME with tFirstName  in tSQLQuery

function fixBadChars pString

replace  with and in pString
  # and more of these which I don't even know what they would be
  # and replacing the dot in the email will mean the email is wrong 
after insertion

return pString

end fixBadChars

I'm sure this has been dealt with already... Does anyone have a escape 
input data for SQL insertion   library they can share?


Thanks!
Sivakatirswami










--
Om Shanti
Sivakatirswami

Kauai Aadheenam

___
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: Passing Ampersand and Dot to PostGreSQL - MySQL

2011-11-02 Thread Pete
Interesting.  I don't have Postgres but I tried an insert into an SQLite
table with text containing an ampersand and it worked just fine.  Same with
mySQL.  This was on my desktop machine though, not over the web.

The docs for SQLite,mySQL, and Postgres only mention the need to escape the
single-quote character within a string, not any other special characters.

What's the error you get back?

Pete
Molly's Revenge http://www.mollysrevenge.com




On Wed, Nov 2, 2011 at 1:25 PM, Sivakatirswami ka...@hindu.org wrote:

 I'm having some difficulty with passing data from a web form to a
 PostGreSQL database. I'm using iRev on the server and gFormData has all the
 data in the array. After handling all the data, running the CC charges,
 sending notifications, everything works, but my final functions to insert
 the data into the database fail in certain cases.

 i use this method to build the query:


 put INSERT INTO donations (first_name, last_name, anonymous,
 email_address,into  tSQLQuery
 put addr1, addr2, city, state, postal_code, country, phone_no,
 created_on,  after tSQLQuery
 put  entry_point, comment, amount, monetra_user, monetra_msg, cc_no) 
 after tSQLQuery
 put VALUES ('#FIRST_NAME', '#LAST_NAME', '#ANONYMOUS', '#EMAIL_ADDRESS',
   after  tSQLQuery
 Put '#ADDR1', '#ADDR2', '#CITY', '#STATE', '#POSTAL_CODE', '#COUNTRY',
 '#PHONE_NO', '#CREATED_ON',  after tSQLQuery
 Put '#ENTRY_POINT', '#COMMENT', '#AMOUNT', '#MONETRA_USER',
 '#MONETRA_MSG', '#CC_NO'); after tSQLQuery

 the poke it like this:

 replace #FIRST_NAME with gFormData[first_name]  in tSQLQuery
 replace #COMMENT with gFormData[comment]  in tSQLQuery
 replace #EMAIL_ADDRESS with gFormData[email_address]  in tSQLQuery

 when the data in the array values contain certain characters, the
 insertion query fails.

 I have been able to definitively diagnose at least two cases (there are
 probably more)

 if the data contains an ampersand or a dot, the query fails  e.g these
 will all cause the insertion to fail:

 First Name:  Ravi  Sheela # ampersand

 Comment: All the books  audio [etc.]  # ampersand

 email address: gail.w...@verizon.com  # dot in the email address.

 so, I'm not sure what to do.

  I need to escape all the special chars (I don't even have a list of what
 they are) in the gFormData array values that will break the SQL query. And
 we also have to block SQL injection attempts at the same time

 My baby xTalk  method would be tortuous: for each key/value in the
 gFormData array

 put gFormData[first_name]  in tFirstName

 put fixBadChars(tFirstName) into tFirstName

 replace #FIRST_NAME with tFirstName  in tSQLQuery

 function fixBadChars pString

replace  with and in pString
  # and more of these which I don't even know what they would be
  # and replacing the dot in the email will mean the email is wrong
 after insertion
return pString

 end fixBadChars

 I'm sure this has been dealt with already... Does anyone have a escape
 input data for SQL insertion   library they can share?

 Thanks!
 Sivakatirswami










 --
 Om Shanti
 Sivakatirswami

 Kauai Aadheenam

 __**_
 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-livecodehttp://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: Nice cm ruler. Only a click away

2011-11-02 Thread Mark Talluto
Hi Michael,

I added to your very cool script a slight bit to make the cm ruler true on any 
monitor.  Users will have to adjust the three variables at the top to represent 
their monitors accurately.

on mouseUp
  put 1920 into tMonitorWidth
  put 1200 into tMonitorHeight
  put 24 into tMonitorDiag
  
  put sqrt((tMonitorWidth * tMonitorWidth) + (tMonitorHeight * 
tMonitorHeight)) into tDiagRes
  put round(tDiagRes/tMonitorDiag,3) into tDPI
  put tDPI /2.54 into Q
  
  repeat with i = 0 to 10
new grc
set the style of last grc to Polygon
set the points of last grc to 25,300  return  25,307
set the loc of last grc to 25+ i*Q,300
set the selected of last grc to true

new grc
set the style of last grc to Polygon
set the points of last grc to 39,306  return  39,310
set the loc of last grc to 39+ i*Q,302
set the selected of last grc to true

new fld
set the opaque of last fld to false
set the width of last fld to 17
set the height of last fld to 15
set the textSize of last fld to 9
set the showBorder of last fld to false
set the margins of last fld to 0,4,0,4
set the textAlign of last fld to center
set the lockText of last fld to true
set the autoHilite of last fld to false
set the showFocusBorder of last fld to false
set loc of last fld to 25+ i*Q,292
put i into last fld
set the selected of last fld to true
  end repeat
  
  group
  
  set the showBorder of last grp to true
  set the lineSize of last grp to 1
  set the threeD of last grp to false
  set the height of last grp to 27
  set the opaque of last grp to true
  set the backgroundColor of last grp to 255,255,205
  set the borderColor of last grp to 147,147,147
  
  set the script of last grp to on mouseDown  cr  grab me  cr  end 
mouseDown
end mouseUp


On Nov 2, 2011, at 6:34 AM, Michael Kristensen wrote:

 Hi there
 
 Here is a nice cm ruler that span fx a iMac 27. Only a click away.
 
 Make a new wd
 Make a btn
 
 Put this script in it and click...


___
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: Nice cm ruler. Only a click away

2011-11-02 Thread Roger Eller
On Wed, Nov 2, 2011 at 7:50 PM, Mark Talluto wrote:

 Hi Michael,

 I added to your very cool script a slight bit to make the cm ruler true on
 any monitor.  Users will have to adjust the three variables at the top to
 represent their monitors accurately.

 on mouseUp
  put 1920 into tMonitorWidth
  put 1200 into tMonitorHeight
  put 24 into tMonitorDiag

  put sqrt((tMonitorWidth * tMonitorWidth) + (tMonitorHeight *
 tMonitorHeight)) into tDiagRes
  put round(tDiagRes/tMonitorDiag,3) into tDPI
  put tDPI /2.54 into Q

  repeat with i = 0 to 10
new grc
set the style of last grc to Polygon
set the points of last grc to 25,300  return  25,307
set the loc of last grc to 25+ i*Q,300
set the selected of last grc to true

new grc
set the style of last grc to Polygon
set the points of last grc to 39,306  return  39,310
set the loc of last grc to 39+ i*Q,302
set the selected of last grc to true

new fld
set the opaque of last fld to false
set the width of last fld to 17
set the height of last fld to 15
 set the textSize of last fld to 9
 set the showBorder of last fld to false
set the margins of last fld to 0,4,0,4
set the textAlign of last fld to center
set the lockText of last fld to true
set the autoHilite of last fld to false
set the showFocusBorder of last fld to false
set loc of last fld to 25+ i*Q,292
put i into last fld
set the selected of last fld to true
  end repeat

  group

  set the showBorder of last grp to true
  set the lineSize of last grp to 1
  set the threeD of last grp to false
  set the height of last grp to 27
  set the opaque of last grp to true
  set the backgroundColor of last grp to 255,255,205
  set the borderColor of last grp to 147,147,147

   set the script of last grp to on mouseDown  cr  grab me  cr 
 end mouseDown
 end mouseUp


 On Nov 2, 2011, at 6:34 AM, Michael Kristensen wrote:

  Hi there
 
  Here is a nice cm ruler that span fx a iMac 27. Only a click away.
 
  Make a new wd
  Make a btn
 
  Put this script in it and click...


get the screenRect to get tMonitorWidth and tMonitorHeight.
Then there's only the tMonitorDiag to manually input.

˜Roger
___
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: Style Question

2011-11-02 Thread Mark Wieder
Mike-

Wednesday, November 2, 2011, 12:20:13 PM, you wrote:

 If the data was represented as some delimited string, then each
 item could be defined as a constant.  The question would then be how
 to manage these constants in multiple scripts.  I have not found any
 references to include files, which was my first thought.

sigh there's a long-standing request in the bug database for include
files.

-- 
-Mark Wieder
 mwie...@ahsoftware.net


___
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


available space iOS

2011-11-02 Thread ddas
How do I check for available space on iOS?

Regards,
Debdoot


___
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: PDFs

2011-11-02 Thread Ken Ray

On Nov 2, 2011, at 1:21 PM, Richmond wrote:

 On 11/02/2011 05:56 PM, tkuyp...@telenet.be wrote:
 I rest my case ;-)
 
 Which case is that? Certainly no joy on Linux (which, by-the-way, is 
 supposedly now
 outstripping Mac).

What he means is that SuperCard and LiveCode do the same thing, just with 
different objects - both call on QuickTime on the Mac to import the PDF, but in 
SuperCard it goes into a graphic object, but in LiveCode it needs a player 
object.

Ken Ray
Sons of Thunder Software, Inc.
Email: k...@sonsothunder.com
Web Site: http://www.sonsothunder.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: Passing Ampersand and Dot to PostGreSQL - MySQL

2011-11-02 Thread G. Wolfgang Gaich

Hello Sivakatirswami,

I think it's an unicode problem if your database is UTF8.

I use this function in that case to execute the SQL:

function exeSQL_UTF8 pSQL  -- pSQL is your SQL string
global gDB
local tRS
local tSQL
   put unidecode(uniencode(pSQL),UTF8) into tSQL
   put revdb_execute(gDB,tSQL) into tRS
   return tRS
end exeSQL_UTF8

Regards
Wolfgang



Am 02.11.2011 21:25, schrieb Sivakatirswami:
I'm having some difficulty with passing data from a web form to a 
PostGreSQL database. I'm using iRev on the server and gFormData has 
all the data in the array. After handling all the data, running the CC 
charges, sending notifications, everything works, but my final 
functions to insert the data into the database fail in certain cases.


i use this method to build the query:


put INSERT INTO donations (first_name, last_name, anonymous, 
email_address,into  tSQLQuery
put addr1, addr2, city, state, postal_code, country, phone_no, 
created_on,  after tSQLQuery
put  entry_point, comment, amount, monetra_user, monetra_msg, cc_no) 
 after tSQLQuery
put VALUES ('#FIRST_NAME', '#LAST_NAME', '#ANONYMOUS', 
'#EMAIL_ADDRESS',   after  tSQLQuery
Put '#ADDR1', '#ADDR2', '#CITY', '#STATE', '#POSTAL_CODE', 
'#COUNTRY', '#PHONE_NO', '#CREATED_ON',  after tSQLQuery
Put '#ENTRY_POINT', '#COMMENT', '#AMOUNT', '#MONETRA_USER', 
'#MONETRA_MSG', '#CC_NO'); after tSQLQuery


the poke it like this:

replace #FIRST_NAME with gFormData[first_name]  in tSQLQuery
replace #COMMENT with gFormData[comment]  in tSQLQuery
replace #EMAIL_ADDRESS with gFormData[email_address]  in tSQLQuery

when the data in the array values contain certain characters, the 
insertion query fails.


I have been able to definitively diagnose at least two cases (there 
are probably more)


if the data contains an ampersand or a dot, the query fails  e.g these 
will all cause the insertion to fail:


 First Name:  Ravi  Sheela # ampersand

 Comment: All the books  audio [etc.]  # ampersand

 email address: gail.w...@verizon.com  # dot in the email address.

so, I'm not sure what to do.

 I need to escape all the special chars (I don't even have a list of 
what they are) in the gFormData array values that will break the SQL 
query. And we also have to block SQL injection attempts at the same 
time


My baby xTalk  method would be tortuous: for each key/value in the 
gFormData array


put gFormData[first_name]  in tFirstName

put fixBadChars(tFirstName) into tFirstName

replace #FIRST_NAME with tFirstName  in tSQLQuery

function fixBadChars pString

replace  with and in pString
  # and more of these which I don't even know what they would be
  # and replacing the dot in the email will mean the email is 
wrong after insertion

return pString

end fixBadChars

I'm sure this has been dealt with already... Does anyone have a 
escape input data for SQL insertion   library they can share?


Thanks!
Sivakatirswami












 *
 * Englisch
 * Deutsch

 * Englisch
 * Deutsch

javascript:void(0);
___
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: Nice cm ruler. Only a click away

2011-11-02 Thread Bob Sneidar
I love this use list!

Bob


On Nov 2, 2011, at 2:39 PM, Roger Eller wrote:

 On Wed, Nov 2, 2011 at 7:50 PM, Mark Talluto wrote:
 
 Hi Michael,
 
 I added to your very cool script a slight bit to make the cm ruler true on
 any monitor.  Users will have to adjust the three variables at the top to
 represent their monitors accurately.
 
 on mouseUp
 put 1920 into tMonitorWidth
 put 1200 into tMonitorHeight
 put 24 into tMonitorDiag
 
 put sqrt((tMonitorWidth * tMonitorWidth) + (tMonitorHeight *
 tMonitorHeight)) into tDiagRes
 put round(tDiagRes/tMonitorDiag,3) into tDPI
 put tDPI /2.54 into Q
 
 repeat with i = 0 to 10
   new grc
   set the style of last grc to Polygon
   set the points of last grc to 25,300  return  25,307
   set the loc of last grc to 25+ i*Q,300
   set the selected of last grc to true
 
   new grc
   set the style of last grc to Polygon
   set the points of last grc to 39,306  return  39,310
   set the loc of last grc to 39+ i*Q,302
   set the selected of last grc to true
 
   new fld
   set the opaque of last fld to false
   set the width of last fld to 17
   set the height of last fld to 15
set the textSize of last fld to 9
set the showBorder of last fld to false
   set the margins of last fld to 0,4,0,4
   set the textAlign of last fld to center
   set the lockText of last fld to true
   set the autoHilite of last fld to false
   set the showFocusBorder of last fld to false
   set loc of last fld to 25+ i*Q,292
   put i into last fld
   set the selected of last fld to true
 end repeat
 
 group
 
 set the showBorder of last grp to true
 set the lineSize of last grp to 1
 set the threeD of last grp to false
 set the height of last grp to 27
 set the opaque of last grp to true
 set the backgroundColor of last grp to 255,255,205
 set the borderColor of last grp to 147,147,147
 
  set the script of last grp to on mouseDown  cr  grab me  cr 
 end mouseDown
 end mouseUp
 
 
 On Nov 2, 2011, at 6:34 AM, Michael Kristensen wrote:
 
 Hi there
 
 Here is a nice cm ruler that span fx a iMac 27. Only a click away.
 
 Make a new wd
 Make a btn
 
 Put this script in it and click...
 
 
 get the screenRect to get tMonitorWidth and tMonitorHeight.
 Then there's only the tMonitorDiag to manually input.
 
 ˜Roger
 ___
 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: PDFs

2011-11-02 Thread Bob Sneidar
I knew that!

Bob


On Nov 2, 2011, at 5:40 PM, Ken Ray wrote:

 
 On Nov 2, 2011, at 1:21 PM, Richmond wrote:
 
 On 11/02/2011 05:56 PM, tkuyp...@telenet.be wrote:
 I rest my case ;-)
 
 Which case is that? Certainly no joy on Linux (which, by-the-way, is 
 supposedly now
 outstripping Mac).
 
 What he means is that SuperCard and LiveCode do the same thing, just with 
 different objects - both call on QuickTime on the Mac to import the PDF, but 
 in SuperCard it goes into a graphic object, but in LiveCode it needs a player 
 object.
 
 Ken Ray
 Sons of Thunder Software, Inc.
 Email: k...@sonsothunder.com
 Web Site: http://www.sonsothunder.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


___
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