Re: mysql: troubles with insert

2007-07-20 Thread Henk van der Velden

Thanks Mark,

it is not an auto_increment field.

I think something is wrong in the way Rev creates a query out of my  
array.

If I force Rev to put the right value in the query by doing this:
put "INSERT INTO g2_Entity() VALUES('"&vars[1]&"',: 
2,:3,:4,:2,:3,:5,:4)" into tsql

the record is inserted with the correct id.
But the standard way:
put "INSERT INTO g2_Entity() VALUES(:1,:2,:3,:4,:2,:3,:5,:4)"  
into tsql

inserts it with the wrong id.

I have double checked the values of my array vars[] - it is OK.

I was wondering if this might have something to do with the way Rev  
handles arrays. Rev 'does' only associative arrays, not numeric  
arrays, isn' t it? I was a bit surprised to find out that I had to  
use numeric arrays in order to build queries.


Just a thought..

Henk


Henk-

Probably a silly question, but I don't suppose id is an auto_increment
field?
If so, you want to specify null for the id and you won't be able to  
override

it.

--
 Mark Wieder
 mwieder at ahsoftware.net

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


How to Tell Which Stack has the Open Drawer

2007-07-20 Thread Gregory Lypny

Hello Everyone,

If I have a stack open as a drawer, is there some way to tell the  
drawer which stack it is connected to?


Regards,

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


Re: mysql: troubles with insert

2007-07-20 Thread Trevor DeVore

On Jul 20, 2007, at 4:18 AM, Henk van der Velden wrote:

I think something is wrong in the way Rev creates a query out of my  
array.

If I force Rev to put the right value in the query by doing this:
put "INSERT INTO g2_Entity() VALUES('"&vars[1]&"',: 
2,:3,:4,:2,:3,:5,:4)" into tsql

the record is inserted with the correct id.
But the standard way:
put "INSERT INTO g2_Entity() VALUES(:1,:2,:3,:4,:2,:3,:5,:4)"  
into tsql

inserts it with the wrong id.

I have double checked the values of my array vars[] - it is OK.

I was wondering if this might have something to do with the way Rev  
handles arrays. Rev 'does' only associative arrays, not numeric  
arrays, isn' t it? I was a bit surprised to find out that I had to  
use numeric arrays in order to build queries.


Hi Henk,

I've seen a bug in the MySQL driver that is probably the same one you  
are seeing. I don't know the exact recipe but I came across it when I  
was:


1) Using binding with RevDB calls.
2) Inserting values into a table with only integer columns.

I think what happened in my case is that one of the binding variables  
(:1 for example) would get the value of another binding variable. If  
I remember correctly (and this was a long time ago) I was able to fix  
this by either altering my table structure so the table included a  
string value or not using binding.


--
Trevor DeVore
Blue Mango Learning Systems
www.bluemangolearning.com-www.screensteps.com
[EMAIL PROTECTED]


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


Re: How to Tell Which Stack has the Open Drawer

2007-07-20 Thread Gregory Lypny

Go it.  The defaultStack.  I asked too soon.

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


Re: Is it possible to limit text input in a field based upon its height?

2007-07-20 Thread haribo



Sarah Reichelt-2 wrote:
> 
> On 9/17/06, William de Smet <[EMAIL PROTECTED]> wrote:
>> Hi there,
>>
>> I made a field which is 500(width) x 530(height) pixels and now I am
>> looking for a way to limit the text input in this field based upon the
>> height of the field.
>> I dont want more text than the height of the field.
>>
> 
> If you set the autoTab of a field to true, when the user gets to the
> last line and presses Return or Enter, it will be as if they pressed
> Tab to go to the next field. They won't be able to enter more lines
> than are visible.
> 
> Cheers,
> Sarah
> ___
> use-revolution mailing list
> use-revolution@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
> 
> 
works fine, but
is there any way to set it to the spacebar, if the user dont click the
enterkey it dont work.
ralle
-- 
View this message in context: 
http://www.nabble.com/Is-it-possible-to-limit-text-input-in-a-field-based-upon-its-height--tf2283530.html#a11531258
Sent from the Revolution - User mailing list archive at Nabble.com.

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


Re:Get the RGB values for the pixel under the mouse.

2007-07-20 Thread Glenn E. Fisher

Jim,

Here is some of my dumb ways to check for some particular colors in  
one of my games.


I thought it might give you some ideas.


function pixelColor lx
  set the screenMouseLoc to lx
  get the mouseColor
  set the screenMouseLoc to 0,0
  return it
end pixelColor

-- c is the RGB values as an item list
function isGreen c
  if item 2 of c > 10+item 1 of c and item 2 of c > 10+item 3 of c  
then return true

  return false
end isGreen

function isBrown c
  if item 1 of c > 30 and item 1 of c < 70 and item 2 of c > 15 and  
item 2 of c < 40\

  and item 3 of c > 7 and item 3 of c < 20 then return true
  return false
end isBrown

function isYellow c
  if c = "174,144,96" or c = "161,125,76" then return true
  return false
end isYellow

function isBeige c
  if item 1 of c > 130 and item 1 of c < 160 and item 2 of c > 90  
and item 2 of c < 130\

  and item 3 of c > 40 and item 3 of c < 80 then return true
  return false
end isBeige

Have fun,
Glenn

on July 12, 2007 7:08:54 PM CDT Jim Hurley wrote:

To be sure of my code I started with a script to get the RGB values
under the mouse, using a MouseMove function.

To see this

go url "http://home.infostations.net/jhurley/RGBunderTheMouse.rev";

Unfortunately the map does not show pure colors so getting the ranges
for each hazard zone is messy. But this utility is useful in
exploring the range of colors.

Jim


--
Glenn E. Fisher University of Houston - Retired
22402 Diane Dr. Spring, Tx 77373
[EMAIL PROTECTED]   http://www.uh.edu/~fisher
http://home.houston.rr.com/thegefishers/
http://homepage.mac.com/gefisher


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


Re: Is it possible to limit text input in a field based upon its height?

2007-07-20 Thread Ken Ray
On Tue, 10 Jul 2007 15:55:00 -0700 (PDT), haribo wrote:

> works fine, but
> is there any way to set it to the spacebar, if the user dont click the
> enterkey it dont work.

You can't "set" the autotab to a spacebar, but you could simulate it 
with code in the field:

on keyDown pKey
   if pKey is space then type tab
end keyDown

By not passing keyDown, the space never gets entered in the initial 
field, but instead sends a tab instead, which should take you to the 
next field.


Ken Ray
Sons of Thunder Software, Inc.
Email: [EMAIL PROTECTED]
Web Site: http://www.sonsothunder.com/
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Is it possible to limit text input in a field based upon its height?

2007-07-20 Thread Klaus Major

Hi Ralle,


On Tue, 10 Jul 2007 15:55:00 -0700 (PDT), haribo wrote:


works fine, but
is there any way to set it to the spacebar, if the user dont click  
the

enterkey it dont work.


You can't "set" the autotab to a spacebar, but you could simulate it
with code in the field:

on keyDown pKey
   if pKey is space then type tab
end keyDown

By not passing keyDown, the space never gets entered in the initial
field, but instead sends a tab instead, which should take you to the
next field.


But the price for this "feature" will be an "only one word" text  
field :-)



Ken Ray
Sons of Thunder Software, Inc.
Email: [EMAIL PROTECTED]
Web Site: http://www.sonsothunder.com/


Regards

Klaus Major
[EMAIL PROTECTED]
http://www.major-k.de

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


Re: Is it possible to limit text input in a field based upon its height?

2007-07-20 Thread Robert Presender

Hi,

If the field height is divided by the textHeight, the result is the 
number of lines.

You can then limit the number of lines.
See textHeight and keyDown in the docs.  Don't know if the spacebar can 
be used with keyDown.


Regards ... Bob


on Tue, 10 Jul 2007 15:55:00 -0700 (PDT) haribo 
<[EMAIL PROTECTED]> wrote:


Sarah Reichelt-2 wrote:


On 9/17/06, William de Smet <[EMAIL PROTECTED]> wrote:

Hi there,

I made a field which is 500(width) x 530(height) pixels and now I am
looking for a way to limit the text input in this field based upon the
height of the field.
I dont want more text than the height of the field.



If you set the autoTab of a field to true, when the user gets to the
last line and presses Return or Enter, it will be as if they pressed
Tab to go to the next field. They won't be able to enter more lines
than are visible.

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



works fine, but
is there any way to set it to the spacebar, if the user dont click the
enterkey it dont work.
ralle
--

Hi,

If the field height is divided by the textHeight, the result is the 
number of lines.

You can then limit the number of lines.
See textHeight and keyDown in the docs.  Don't know if the spacebar can 
be used with keyDown.


Regards ... Bob

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


Re: Field question

2007-07-20 Thread Stephen Barncard

In rev, there are many ways to do similar tasks.



BUT, if any of these fields contain a large amount of text where there is a
possibility that it may include a comma, tab or return character then your
output may not be as expected, ie if you use the return character as




And why I mentioned  URLencoding each block of data as it forces all 
text to a single line. (Base64 will do this too if you include a way 
to deal with returns).

This is very speedy and useful, for


storing complex dialog prompts in htmltext, so they can be put into a 
variable that displays on one line:


local htmlselectToexportHtml = 
"%3Cp%3E%3Cfont+size%3D%2219%22+color%3D%22%234F483A%22%3E%3Cb%3ESelect+Fields+To%3C%2Fb%3E%3C%2Ffont%3E%3C%2Fp%3E%0D%0A%3Cp%3E%3Cfont+size%3D%2223%22+color%3D%22%239D1B1B%22%3E%3Cb%3EEXPORT%3C%2Fb%3E%3C%2Ffont%3E%3C%2Fp%3E"

put urldecode(htmlselectToexportHtml) into pPrompt

or storing data inside of data in a 'flat' array'

key1   
U0VMRUNUICogIEZST00gYERldmljZXNfTWFpbmAgT1JERVIgQlkgYDxvcmRlckJ5PmAgPGRpcj4= 
	(Base64Encode)

key2   SHOW+DATABASES%3B%0D%0A   (URLEncode)
key3   this is textwith returns in itto showreplaced by 
vertical tabs. (returns converted to vertical tabs)


the vertical tabs (ASCII 11 dec) character is what Filemaker uses to 
deal with returns in fields on export. It's almost a standard.



sqb
--


stephen barncard
s a n  f r a n c i s c o
- - -  - - - - - - - - -


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


Re: Runtime Revolution is now Available through Programmer's Paradise

2007-07-20 Thread Stephen Barncard

Lynn,

Why would I not rather deal directly with Runrev, and have another 
chance to chat with the lovely Heather than to use Programmer's 
paradise? They don't even offer PayPal.


Using Runrev's overseas based payment system is always a chore...

just pondering...


Runtime Revolution, the leading cross-platform development environment for
Windows, Linux and MacOS X is now available through Programmer's Paradise.
The software development tools reseller sells all versions of Runtime
Revolution, from Revolution Media through Revolution Enterprise.

Programmer's Paradise, a division of Wayside Technology focuses on pleasing
technology professionals. If you're a software development manager, web
builder, VAR, computer consultant, systems integrator, software engineer,
tech support specialist - if you're looking for a reseller that offers a


--


stephen barncard
s a n  f r a n c i s c o
- - -  - - - - - - - - -



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


Re: Runtime Revolution is now Available through Programmer's Paradise

2007-07-20 Thread Peter T. Evensen

Stephen,

The news is that many professional programmers (dare I say most) have 
never heard of Revolution/RunRev.  Being in Programmer's Paradise 
dramatically elevates Revolution's visibility.  The advantage is that a 
programmer who would never had heard of or tried Revolution might 
purchase or look for more information and join our ranks.


Stephen Barncard wrote:

Lynn,

Why would I not rather deal directly with Runrev, and have another 
chance to chat with the lovely Heather than to use Programmer's 
paradise? They don't even offer PayPal.


Using Runrev's overseas based payment system is always a chore...

just pondering...

Runtime Revolution, the leading cross-platform development 
environment for
Windows, Linux and MacOS X is now available through Programmer's 
Paradise.

The software development tools reseller sells all versions of Runtime
Revolution, from Revolution Media through Revolution Enterprise.

Programmer's Paradise, a division of Wayside Technology focuses on 
pleasing

technology professionals. If you're a software development manager, web
builder, VAR, computer consultant, systems integrator, software 
engineer,

tech support specialist - if you're looking for a reseller that offers a



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


RE: Runtime Revolution is now Available through Programmer'sParadise

2007-07-20 Thread Lynn Fredricks
> The news is that many professional programmers (dare I say 
> most) have never heard of Revolution/RunRev.  Being in 
> Programmer's Paradise dramatically elevates Revolution's 
> visibility.  The advantage is that a programmer who would 
> never had heard of or tried Revolution might purchase or look 
> for more information and join our ranks.

Peter is right on. There are also many large corporations that will not
purchase through an international company or outside of a few authorized
resellers. The same is also true with SHI, which sells to many large
corporations and government. Programmer's Paradise's parent company Wayside
technology is also a vertical market distributor, so it also opens up
additional reseller venues (a lot of resellers will only buy through a
distributor).

Dare I also say it - most of our direct competitors are not present there
either :-)

Best regards,

Lynn Fredricks
Worldwide Business Operations
Runtime Revolution Ltd
http://www.runrev.com
 

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


Re: Runtime Revolution is now Available through Programmer's Paradise

2007-07-20 Thread Stephen Barncard

good reasons indeed.

sqb


Stephen,

The news is that many professional programmers (dare I say most) 
have never heard of Revolution/RunRev.  Being in Programmer's 
Paradise dramatically elevates Revolution's visibility.  The 
advantage is that a programmer who would never had heard of or tried 
Revolution might purchase or look for more information and join our 
ranks.




--


stephen barncard
s a n  f r a n c i s c o
- - -  - - - - - - - - -



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


Update doc type associations on OS X

2007-07-20 Thread Richard Gaskin


I'm making an installer for OS X which will install the latest version 
of my app while leaving any older version the user may have installed 
intact.


But when the user double-clicks a document associated with my app, I 
want to make sure the Finder associates that document type with the new 
app, not the older version they user may have been using.


In the Finder's Get Info window there's a way to tell the OS to 
associate a specific doc type with a specific application.  How can I do 
this programmatically in my installer?  Is there some nifty AppleScript 
command to do that?


TIA -

--
 Richard Gaskin
 Managing Editor, revJournal
 ___
 Rev tips, tutorials and more: http://www.revJournal.com
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: How to Tell Which Stack has the Open Drawer

2007-07-20 Thread Scott Morrow

Gregory,

Just a heads up... In versions of Rev after 2.6.1  a bug appeared  
which keeps the drawer mechanism from working with older (10.3 and  
earlier) versions of OSX .  ( bug 4738)   If you are developing in  
10.4.x you won't see this bug... until it is tested (or someone tries  
to use it) under 10.3 or 10.2!   This bug is a pet peeve of mine :  )



-Scott Morrow

Elementary Software
(Now with 20% less chalk dust !)
web http://elementarysoftware.com/
email   [EMAIL PROTECTED]

-

On Jul 20, 2007, at 6:37 AM, Gregory Lypny wrote:


Go it.  The defaultStack.  I asked too soon.

Gregory

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


Re: Is it possible to limit text input in a field based upon its height?

2007-07-20 Thread Scott Morrow

Hello.

I once used something similar to what Bob suggested. (Though I should  
look at Bob's "line" solution to see if it won't work better.)  The  
following doesn't work perfectly in all cases... but perhaps it will  
provide an idea.


-- this goes in the field  
on rawKeyUp
  FieldLimiter -- don't allow typing past the visible bottom of the  
field

  pass rawKeyUp
end rawKeyUp


-- this goes somewhere in the message path of the field(s)
on FieldLimiter -- don't allow typing past the bottom of fixed-sized  
fields
  if (the textheightsum of the target) > (the height of the target +  
12)  then -- 12 is a "slop" factor
if (word 4 of the selectedChunk) < (the num of chars of the  
target) then
  -- they are in the middle of the text somewhere so don't  
delete characters off the end

 -- play the uAlertSound of stack "Hidden"
  exit FieldLimiter
end if
-- they are typing at the end of the text chunk... don't let  
them insert characters

delete last char of the target
   -- play the uAlertSound of stack "Hidden"
repeat 5 times -- 5 is arbitrary
  if the textheightsum of the target < (the height of the target  
+ 12) then

exit repeat
  end if
  delete last char of the target
end repeat
set the scroll of the target to 0
  end if
end FieldLimiter



-Scott Morrow

Elementary Software
(Now with 20% less chalk dust !)
web http://elementarysoftware.com/
email   [EMAIL PROTECTED]

-

On Jul 20, 2007, at 11:37 AM, Robert Presender wrote:


Hi,

If the field height is divided by the textHeight, the result is the  
number of lines.

You can then limit the number of lines.
See textHeight and keyDown in the docs.  Don't know if the spacebar  
can be used with keyDown.


Regards ... Bob


on Tue, 10 Jul 2007 15:55:00 -0700 (PDT) haribo  
<[EMAIL PROTECTED]> wrote:


Sarah Reichelt-2 wrote:


On 9/17/06, William de Smet <[EMAIL PROTECTED]> wrote:

Hi there,

I made a field which is 500(width) x 530(height) pixels and now I am
looking for a way to limit the text input in this field based  
upon the

height of the field.
I dont want more text than the height of the field.



If you set the autoTab of a field to true, when the user gets to the
last line and presses Return or Enter, it will be as if they pressed
Tab to go to the next field. They won't be able to enter more lines
than are visible.

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


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


Dissolve Transition Works Sometimes

2007-07-20 Thread Mark Greenberg
When I make a stack with the dissolve transition between cards and  
compile it for Mac and Win, I find the transition doesn't work  
sometimes.  In some cards, it doesn't work at all.  I suspect that  
that is because the card it is going to has something in the  
PreOpenCard handler that stops the transition.  Could this be true?  
Is there a setting that will solve this?


Sometimes it works on Mac but not Win, even though the windows  
machine does have QuickTime installed.  Instead of blending from one  
card to the other, it just jumps to it as if there were no visual  
effect specified in the script.  Any ideas on this one?


  Thanks in advance,

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