Re: Revolution Community Partners

2006-07-25 Thread Chipp Walters

Hey Dar,

You need to register before you can see more than announcements.

-Chipp

On 7/24/06, Dar Scott <[EMAIL PROTECTED]> wrote:


Uh, I looked at the RunRev Forums and I don't see that.  I just see
some announcements.

___
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


Why is the imagedata value different from Win32 to MacOS platforms?

2006-07-25 Thread Joel Guillod
For image processing I have to extract the RGB values from an  
imagedata of an image but I got different results under MacOSX and  
Win32.
I found that the imagedata values is different between the two  
platform: every color component of pixels is slighty changed. I have  
not found in the documentation such a change depending on the  
platform. Notice that  is identical between both  
platform.


Could anyone give me a clue?

Is there an easy other way to get the exact RGB array on both platforms?

Thanks!
___
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: Why is the imagedata value different from Win32 to MacOS platforms?

2006-07-25 Thread jbv


Joel ,

I don't know it's related, but I remember that, when building an external in C
for image processing, I found that the RGB values of each pixel was in a
different order on Mac and on Win. Therefore I had to swap the 3 values on
Win to get the correct order in Rev (actually MC)... I don't remember what the
Win order was though...

So if I were you, I'd try swaping the 3 values until I get the right order...
This can be done easily by "forcing" some pixel values in an imagedata to
R=255, G=0, B=0
R=0, G=255, B=0
R=0, G=0, B=255

JB


> For image processing I have to extract the RGB values from an
> imagedata of an image but I got different results under MacOSX and
> Win32.
> I found that the imagedata values is different between the two
> platform: every color component of pixels is slighty changed. I have
> not found in the documentation such a change depending on the
> platform. Notice that  is identical between both
> platform.
>
> Could anyone give me a clue?
>
> Is there an easy other way to get the exact RGB array on both platforms?
>
> Thanks!

___
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: Why is the imagedata value different from Win32 to MacOS platforms?

2006-07-25 Thread Peter T. Evensen

Is this an endian issue?

At 09:32 AM 7/25/2006, you wrote:



Joel ,

I don't know it's related, but I remember that, when building an external in C
for image processing, I found that the RGB values of each pixel was in a
different order on Mac and on Win. Therefore I had to swap the 3 values on
Win to get the correct order in Rev (actually MC)... I don't remember what the
Win order was though...

So if I were you, I'd try swaping the 3 values until I get the right order...
This can be done easily by "forcing" some pixel values in an imagedata to
R=255, G=0, B=0
R=0, G=255, B=0
R=0, G=0, B=255

JB


> For image processing I have to extract the RGB values from an
> imagedata of an image but I got different results under MacOSX and
> Win32.
> I found that the imagedata values is different between the two
> platform: every color component of pixels is slighty changed. I have
> not found in the documentation such a change depending on the
> platform. Notice that  is identical between both
> platform.
>
> Could anyone give me a clue?
>
> Is there an easy other way to get the exact RGB array on both platforms?
>
> Thanks!

___
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


Peter T. Evensen
http://www.PetersRoadToHealth.com
314-629-5248 or 888-682-4588 



___
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: Why is the imagedata value different from Win32 to MacOS platforms?

2006-07-25 Thread Ian Wood
Only thing I can think of off-hand is that it was a PNG image and the  
automatic gamma-correction of the format was kicking in.


Ian

On 25 Jul 2006, at 15:04, Joel Guillod wrote:

For image processing I have to extract the RGB values from an  
imagedata of an image but I got different results under MacOSX and  
Win32.
I found that the imagedata values is different between the two  
platform: every color component of pixels is slighty changed. I  
have not found in the documentation such a change depending on the  
platform. Notice that  is identical between both  
platform.


Could anyone give me a clue?

Is there an easy other way to get the exact RGB array on both  
platforms?


Thanks!
___
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


Re: Imagedata row order

2006-07-25 Thread Rob Cozens

Dar, Jacque, et al:

Following is based on (a) what I've read about imageData from Rev 
Dictionary, (b) what I've learned about imageData in personal 
testing, and (c) what I THINK I know about imageData based on 
conclusions drawn from (a) & (b):


* Rev. Dictionary:  "Revolution supports GIF, JPEG, PNG, PICT, BMP, 
PBM/PGM/PPM, and XBM/XPM/XWD formats, as well as its own internal 
format".  My presumption is (untested)  the "internal format", 
designated as "rle" in the image's paintCompression property, is the 
format used for imageData  [4 bytes per pixel:  null, red, green, 
blue].


*  Rev Dictionary: "Because most picture formats include compression, 
the content of an image is normally smaller than its imageData 
property."  My presumption is (untested) that if an image has never 
been resized since created in rle format, the image's text & 
imageData properties will be identical. [ I would also note the 
Dictionary is likely to be incorrect  if the image is displayed at 
less than full size.]


*  Rev Dictionary: "To manipulate each pixel (for example, to 
brighten the image or remove the red channel), to examine the actual 
screen appearance of the image, or to work with the picture data in a 
format-independent way, use the imageData property."  I think this 
should read "use the rle format" instead of "use the imageData 
property."  [Though one could reference the imageData property to 
convert images in other formats to rle.]


*  Rev Dictionary, "To take advantage of the characteristics of a 
particular format or to transfer picture data between objects, use 
the image content."  [Emphasis mine.]


So Jacque notes that "set the imageData of image id 12345 to 
my32x32RLEString" should be functionally equivalent to "set the text 
of image id 12345 to my32x32RLEString", and Dar suggests people work 
with imageData because it's easier to decipher and manipulate 
bit-by-bit than other Rev image formats.


1.  Setting the text of an image automatically resets image 
dimensions (among other properties); setting the imageData of an 
image does NOT adjust dimensions and WILL cause image distortion if 
the imageData does not contain exactly the number of pixels needed to 
fill the screen space occupied by the image.


2.  Changing image content via resetting the imageData property ONLY 
works for data in rle format:


get URL "binfile:/Disk/Folder/image.jpg"
set the imageData of image id 12345 to it

will not display(or load?) the image correctly.  So I feel it's bad 
form to post solutions that change image content by changing the 
imageData; since it only works for one of the eight image formats Rev 
supports and does not update all the image properties that are 
touched by "set the text of image id 12345 to it".


3.  None of this means one cannot create and manipulate images rle 
format, it just means once one has created the image string, one 
should set the text of the image to it or put it into the image, 
rather than setting the imageData of the image to it.

--

Rob Cozens
CCW, Serendipity Software Company

"And I, which was two fooles, do so grow three;
Who are a little wise, the best fooles bee."

from "The Triple Foole" by John Donne (1572-1631)
___
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 maintain window layers on Mac?

2006-07-25 Thread Peter T. Evensen
Is there any way to force a window to be in the background?  The reason I 
ask is I have a window that should stay in the background that shows the 
name of the student who is logged in. On one application, this "background" 
stack appears in front of the main stack, even though I go to the main 
stack after I open the name stack.


Is there anyway to force a stack to the front?

Thanks!

Peter T. Evensen
http://www.PetersRoadToHealth.com
314-629-5248 or 888-682-4588 



___
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


Sending email via Rev

2006-07-25 Thread Richard Miller
I am testing Shao Shen's libsmtp function and having difficulty  
getting a test message to go through.


The smtpOpen command seems to work fine. When I use the smtpSend  
command and then the smtpGetTranscript command, I receive back a  
message that says:


 "message rejected"

I suspect the problem is with the way I am creating the message,  
which looks like this:


--- (the message doesn't  
include these dashes)

To: [EMAIL PROTECTED]
Subject: rev email test

This is a test of sending email via Rev
---

I also see a line coming back that says:

   354 Start mail input; end with , 

Any ideas what I am doing wrong?

Thanks.
Richard Miller
Imprinter Technologies
___
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: "There Was a Problem Saving the Standalone Application"

2006-07-25 Thread Jeanne A. E. DeVoto

At 3:18 AM -0500 7/23/2006, Chipp Walters wrote:

Ctrl-click on a trackpad requires two fingers, one to press the
control-key, the other to hold-down the mouseKey at the bottom of the
trackpad, meanwhile the other hand works moving the cursor over the
trackpad to choose the correct menu item. I suppose for young large
hands, it would work just fine, but my fingers would get tired awful
fast trying to contort regularly that way.


We're wandering way off topic here, but most people who use a 
trackpad do one of these, to my observation:


1. Use the index finger to move the pointer, the thumb to press the 
trackpad button, and the left hand to press modifier keys (if they 
need one). The side of the thumb falls naturally over the button when 
your index finger is moving over the trackpad.


2. Turn on the clickable trackpad, and use the index finger to move 
the pointer and to click, drag, and double-click.


Using both hands just for ordinary clicking - one to move the pointer 
and the other to press the trackpad button - seems extremely 
difficult to me, and it wouldn't surprise me if someone who tried to 
use a trackpad that way gave up on it altogether and fled to the 
mouse in disgust. My right hand is cramping up just visualizing it. 
;-) You might, probably would, find one of the above methods easier.


(I myself use SideTrack and have the trackpad configured for 
clickability, and the trackpad button configured for control-click, 
which means I use only index finger and thumb. The corner I use the 
least is configured for command-click [which my browser uses for 
"open this link in a new tab", so I need it a lot].)

--
jeanne a. e. devoto ~ [EMAIL PROTECTED]
http://www.jaedworks.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: mouse scrolling wheel

2006-07-25 Thread Jeanne A. E. DeVoto

At 8:48 AM -0700 7/24/2006, Scott Rossi wrote:

rawKeyDown is probably the message you want, but the docs also say: "Mouse
wheels do not send a rawKeyDown message on Mac OS systems."


(Note though that that's MacOS, not OS X. MacOS mousewheels need to 
use some hack whose details I don't remember that doesn't get picked 
up by the engine, but OS X doesn't share that limitation.)

--
jeanne a. e. devoto ~ [EMAIL PROTECTED]
http://www.jaedworks.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: Imagedata row order

2006-07-25 Thread Jeanne A. E. DeVoto

At 8:03 AM -0700 7/25/2006, Rob Cozens wrote:
* Rev. Dictionary:  "Revolution supports GIF, JPEG, PNG, PICT, BMP, 
PBM/PGM/PPM, and XBM/XPM/XWD formats, as well as its own internal 
format".  My presumption is (untested)  the "internal format", 
designated as "rle" in the image's paintCompression property, is the 
format used for imageData  [4 bytes per pixel:  null, red, green, 
blue].


No. It's run-length-encoded. Just as well, since the text property is 
what's stored on disk, and a 32-bit image with no compression 
whatever would take up a ton of room. Take a look at the length of 
the text versus the length of the imageData of a typical image object.


(Why would you assume that these are the same?)

*  Rev Dictionary: "Because most picture formats include 
compression, the content of an image is normally smaller than its 
imageData property."  My presumption is (untested) that if an image 
has never been resized since created in rle format, the image's text 
& imageData properties will be identical. [ I would also note the 
Dictionary is likely to be incorrect  if the image is displayed at 
less than full size.]


This is never the case. There is no situation in which the text and 
imageData properties are the same; they're in completely different 
formats.


*  Rev Dictionary: "To manipulate each pixel (for example, to 
brighten the image or remove the red channel), to examine the actual 
screen appearance of the image, or to work with the picture data in 
a format-independent way, use the imageData property."  I think this 
should read "use the rle format" instead of "use the imageData 
property."  [Though one could reference the imageData property to 
convert images in other formats to rle.]


No. It is possible to manipulate data by starting with the formatted 
text property of the image, of course - but the easiest way to do 
this is to write a routine that expands that text property so that 
each channel of each pixel is represented by a separate byte, and 
place that data in a variable to be worked with. Since what I've just 
described is the imageData property of the image, it seems 
considerably easier to use that instead of spending time reconverting 
the text picture data into that format.


If I had meant "use the text property of an image in RLE format" 
instead of "use the imageData property", that's what I would have 
written.

--
jeanne a. e. devoto ~ [EMAIL PROTECTED]
http://www.jaedworks.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: Imagedata row order

2006-07-25 Thread Ben Rubinstein

On 25/7/06 16:03, Rob Cozens wrote:

Dar, Jacque, et al:

* Rev. Dictionary:  "Revolution supports GIF, JPEG, PNG, PICT, BMP, 
PBM/PGM/PPM, and XBM/XPM/XWD formats, as well as its own internal 
format".  My presumption is (untested)  the "internal format", 
designated as "rle" in the image's paintCompression property, is the 
format used for imageData  [4 bytes per pixel:  null, red, green, blue].


As a point of information, RLE almost certainly stands for "Run Length 
Encoded", a very simple form of compression that works well for synthetic 
images in small colour spaces.  Essentially, rather than saying "white, white, 
white, black, white", RLE says "3 x white, 1 x black, 1x white".  (Fax 
transmissions are run-length encoded, because they are - or were - typically 
lots of white with small amounts of black).


My understanding is that the imageData of an image should bear no relation to 
the compression of the source file, nor to the internal format of the bitmap. 
 That is, Revolution reads an image in from files in various formats.  It 
stores the image in one way or another, represented by the paintCompression 
property.  When Rev needs to render the image, it expands it into a bitmap - 
or what the Mac toolbox knows as a pixmap - with, probably, four bytes for 
every pixel.


Regardless of any of the above, when you deal with imageData - either asking 
for it or setting it - the image is rendered into a pixmap with four bytes per 
pixel, and that's the data you get.


The text of the image, on the other hand, is I believe the internal format in 
which the image is stored - ie if the paintCompression of an image is 'gif', 
you should be able to decode the 'text' according to the gif standard.



*  Rev Dictionary: "Because most picture formats include compression, 
the content of an image is normally smaller than its imageData 
property."  My presumption is (untested) that if an image has never been 
resized since created in rle format, the image's text & imageData 
properties will be identical. [ I would also note the Dictionary is 
likely to be incorrect  if the image is displayed at less than full size.]


As above, I don't believe that this presumption is correct.  I don't think 
there's ever an example when the text and imageData are identical - by definition.


*  Rev Dictionary: "To manipulate each pixel (for example, to brighten 
the image or remove the red channel), to examine the actual screen 
appearance of the image, or to work with the picture data in a 
format-independent way, use the imageData property."  I think this 
should read "use the rle format" instead of "use the imageData 
property."  [Though one could reference the imageData property to 
convert images in other formats to rle.]


*  Rev Dictionary, "To take advantage of the characteristics of a 
particular format or to transfer picture data between objects, use the 
image content."  [Emphasis mine.]


So Jacque notes that "set the imageData of image id 12345 to 
my32x32RLEString" should be functionally equivalent to "set the text of 
image id 12345 to my32x32RLEString", and Dar suggests people work with 
imageData because it's easier to decipher and manipulate bit-by-bit than 
other Rev image formats.


1.  Setting the text of an image automatically resets image dimensions 
(among other properties); setting the imageData of an image does NOT 
adjust dimensions and WILL cause image distortion if the imageData does 
not contain exactly the number of pixels needed to fill the screen space 
occupied by the image.


2.  Changing image content via resetting the imageData property ONLY 
works for data in rle format:


I don't think that's correct: I believe you can set the imageData of any image 
(bearing in mind the caveat that Rev doesn't respond gracefully if it's the 
wrong length, ie not 4 * width * height) - regardless of whether the image was 
opened from a JPEG or a GIF, regardless of whether it's stored as PNG or RLE.




get URL "binfile:/Disk/Folder/image.jpg"
set the imageData of image id 12345 to it

will not display(or load?) the image correctly.  So I feel it's bad form 
to post solutions that change image content by changing the imageData; 
since it only works for one of the eight image formats Rev supports and 
does not update all the image properties that are touched by "set the 
text of image id 12345 to it".


I agree the above code will not work; that's because the jpeg format is not 
the right format for imagedata.  There's only format for imageData, and it's 
not the one found in JPEG files (or gif files, PNG, BMP, PICT or any other...).


3.  None of this means one cannot create and manipulate images rle 
format, it just means once one has created the image string, one should 
set the text of the image to it or put it into the image, rather than 
setting the imageData of the image to it.


It may well be possible to set an image using the text, but that's certainly 
not to say it's a bad idea to do 

Re: How to change icon on standalone file and on left corner of stack (defalut Renrev Icon) (Runre v.2.5.1)

2006-07-25 Thread Devin Asay

Supote,

You must create a properly formed windows icon (.ico) file, and when  
you create your standalone, in the Windows section of the standalone  
builder select the .ico file. Then when you create your standalone  
that icon will now be shown instead of the default Rev icon.


HTH

Devin

On Jul 24, 2006, at 10:52 PM, Supote-Gmail wrote:


Dear Sir

   Now I use Runrev Version 2.5.1. I want to know how to change  
icon on standalone file and on left corner of stack (defalut Renrev  
Icon). Please help me. Urgent!!!

Thank you very much

Best regards,
Supote
___
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



Devin Asay
Humanities Technology and Research Support Center
Brigham Young University

___
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: Imagedata row order

2006-07-25 Thread Dar Scott


On Jul 25, 2006, at 10:32 AM, Jeanne A. E. DeVoto wrote:


At 8:03 AM -0700 7/25/2006, Rob Cozens wrote:
* Rev. Dictionary:  "Revolution supports GIF, JPEG, PNG, PICT,  
BMP, PBM/PGM/PPM, and XBM/XPM/XWD formats, as well as its own  
internal format".  My presumption is (untested)  the "internal  
format", designated as "rle" in the image's paintCompression  
property, is the format used for imageData  [4 bytes per pixel:   
null, red, green, blue].


No. It's run-length-encoded. Just as well, since the text property  
is what's stored on disk, and a 32-bit image with no compression  
whatever would take up a ton of room. Take a look at the length of  
the text versus the length of the imageData of a typical image object.


Wow, where is this in the dictionary?

I have tried setting the text of an image to some PBM/PGM/PPM formats  
(P6 and P3 mostly, I think), but got no response to the image or  
size.  When I tried to subsequently export, I got an error.


Maybe something was wrong with my data.

I suppose if I could set one of these, I could still compress it by  
exporting as something else and then setting it again.


Has anybody tried some of the simpler formats?

Dar Scott
___
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: Imagedata row order

2006-07-25 Thread Rob Cozens

Jeanne:


At 8:03 AM -0700 7/25/2006, Rob Cozens wrote:
* Rev. Dictionary:  "Revolution supports GIF, JPEG, PNG, PICT, BMP, 
PBM/PGM/PPM, and XBM/XPM/XWD formats, as well as its own internal 
format".  My presumption is (untested)  the "internal format", 
designated as "rle" in the image's paintCompression property, is 
the format used for imageData  [4 bytes per pixel:  null, red, 
green, blue].


No. It's run-length-encoded. Just as well, since the text property 
is what's stored on disk, and a 32-bit image with no compression 
whatever would take up a ton of room. Take a look at the length of 
the text versus the length of the imageData of a typical image 
object.


The text property is stored on disk?  Isn't that only if the image is 
referenced instead of imported?




(Why would you assume that these are the same?)


Here's my thinking:

1.  I create a string of characters, 4 bytes per pixel  in imageData format .

2.  I set the imageData of an image to my string

3.  In what format is the image's text, if not rle?  GIF, JPEG, PNG, 
PICT, BMP, PBM/PGM/PPM, or XBM/XPM/XWD?  Perhaps rle compresses the 
data to 3 bytes per pixel by stripping the nulls?


4.  What happens if I "put" my imageData-formatted string into an 
image?  Will the image not display correctly?  Does it throw an 
error?  Is the string reformatted before being placed in the text 
property?



*  Rev Dictionary: "Because most picture formats include 
compression, the content of an image is normally smaller than its 
imageData property."  My presumption is (untested) that if an image 
has never been resized since created in rle format, the image's 
text & imageData properties will be identical. [ I would also note 
the Dictionary is likely to be incorrect  if the image is displayed 
at less than full size.]


This is never the case. There is no situation in which the text and 
imageData properties are the same; they're in completely different 
formats.


Once again, question 4 above.  Other than saving and reusing the text 
of a rle-formatted image, how would one put an rle-formatted string 
into an image?




*  Rev Dictionary: "To manipulate each pixel (for example, to 
brighten the image or remove the red channel), to examine the 
actual screen appearance of the image, or to work with the picture 
data in a format-independent way, use the imageData property."  I 
think this should read "use the rle format" instead of "use the 
imageData property."  [Though one could reference the imageData 
property to convert images in other formats to rle.]


No. It is possible to manipulate data by starting with the formatted 
text property of the image, of course - but the easiest way to do 
this is to write a routine that expands that text property so that 
each channel of each pixel is represented by a separate byte, and 
place that data in a variable to be worked with. Since what I've 
just described is the imageData property of the image, it seems 
considerably easier to use that instead of spending time 
reconverting the text picture data into that format.


If I had meant "use the text property of an image in RLE format" 
instead of "use the imageData property", that's what I would have 
written.


Perhaps we are approaching "use" from different viewpoints; but then 
again it may all boil down to my misconception of what happens if I 
set the text of an image to an imageData-formatted string.  If you 
use "use" in the sense of "take the imageData as a starting point for 
your modifications", you'll get no argument from me.  And if setting 
the text of an image to an imageData-formatted string throws an 
error, I'm flat out wrong.  But if it doesn't throw an error, what 
does happen?



--

Rob Cozens
CCW, Serendipity Software Company

"And I, which was two fooles, do so grow three;
Who are a little wise, the best fooles bee."

from "The Triple Foole" by John Donne (1572-1631)
___
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: Imagedata row order

2006-07-25 Thread J. Landman Gay

Rob Cozens wrote:

Perhaps we are approaching "use" from different viewpoints; but then 
again it may all boil down to my misconception of what happens if I set 
the text of an image to an imageData-formatted string.  If you use "use" 
in the sense of "take the imageData as a starting point for your 
modifications", you'll get no argument from me.  And if setting the text 
of an image to an imageData-formatted string throws an error, I'm flat 
out wrong.  But if it doesn't throw an error, what does happen?


I get an empty image with no content. There is no error, the image just 
doesn't display anything. Also, this returns false:


  put (the imageData of img 1) = (the text of img 1)

So they aren't the same, but each has its own purpose. If you need to 
manipulate pixels, use imageData. If you need to work with whole images, 
the text is more useful.


--
Jacqueline Landman Gay | [EMAIL PROTECTED]
HyperActive Software   | http://www.hyperactivesw.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: Why is the imagedata value different from Win32 to MacOS platforms?

2006-07-25 Thread Chipp Walters

Joel,

The big endian, little endian byte-order issue between platforms went
away back in 2.2. I used to have to check for it before doing any
imageData manipulation. I no longer have to.

I don't think the imagedata has changed, and my thought would be to
check and make sure the images are set to their respective
formattedHeight and formattedWidth BEFORE checking the imageData.

The text of an image IS different the the imageData of the same image,
at the same resolution. Not sure why this is, but I doubt handlers
created for manipulating the bits of imageData would work manipulating
the bits of the text of an image.

Joel, please check to make sure the images you are testing have the
same width and height. If they do, then let us know and I'll do some
further tests to see if I can help provide an answer.

I hope this helps.
-Chipp
___
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: Why is the imagedata value different from Win32 to MacOS platforms?

2006-07-25 Thread Chipp Walters

Ian,

That is a good guess. Perhaps Joel can check images imported as JPG vs
PNG. I know, for instance, if you are trying to match a background
color on a stack, you should use JPG's and not PNGs because of  the
gamma-correction of PNGs. If you don't need the alpha channel of PNGs,
I suggest always using JPGs.

best,
Chipp
___
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: Imagedata row order

2006-07-25 Thread Chipp Walters

Interesting discussion.
Couple of things:

The text of an image is not the imageData of an image. I believe it IS
the binary data for the image as imported. I assume this is because
compressed images (JPG,PNG,GIF) when imported, do not bloat a stack,
and only become uncompressed when viewed on a card.

To test just import an image then put into msg:
put the imagedata of img 1 = the text of img 1
and you will see 'false' returned.


Next, the big endian, little endian problem was apparent a few
versions ago. In fact, in ButtonGadget  I have code which reads:

if the platform is "MacOS" or version()>"2.4.2" then
   repeat for timagedatalength times
 put tPos + 4 into tPos
 put binaryEncode("",0,R,G,B) after newImageData
   end repeat
 else
   repeat for timagedatalength times
 put tPos + 4 into tPos
 put binaryEncode("",B,G,R,0) after newImageData
   end repeat
 end if

which leads me to the assumption the Rev engine changed the big
endian, little endian byte order sway after engine version 2.4.2.

HTH,
Chipp
___
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: Sending email via Rev

2006-07-25 Thread Alex Tweedly

Richard Miller wrote:

I am testing Shao Shen's libsmtp function and having difficulty  
getting a test message to go through.


The smtpOpen command seems to work fine. When I use the smtpSend  
command and then the smtpGetTranscript command, I receive back a  
message that says:


 "message rejected"

I suspect the problem is with the way I am creating the message,  
which looks like this:


--- (the message doesn't  
include these dashes)

To: [EMAIL PROTECTED]
Subject: rev email test

This is a test of sending email via Rev
---

I also see a line coming back that says:

   354 Start mail input; end with , 

Any ideas what I am doing wrong?


SMTP expects the message to have headers, then a blank line (indicates 
end of headers), then the body message - and recognizes the end of the 
message by receiving (I thought)

 . 
(i.e. a line beginning with a period, and otherwise blank). Not sure why 
the text you quoted above has a comma in there - so I'd try it with the 
comma, with the period and and with neither  to see which works.


(this is from vague memory, and after a quick look I can't find any 
documentation to support what I thought I remembered - so give it a 
shot, but don't be too surprised if it's wrong :- )







--
Alex Tweedly   http://www.tweedly.net



--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.10.4/396 - Release Date: 24/07/2006

___
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: "There Was a Problem Saving the Standalone Application"

2006-07-25 Thread Chipp Walters

On 7/24/06, Jeanne A. E. DeVoto <[EMAIL PROTECTED]> wrote:


1. Use the index finger to move the pointer, the thumb to press the
trackpad button, and the left hand to press modifier keys (if they
need one). The side of the thumb falls naturally over the button when
your index finger is moving over the trackpad.

2. Turn on the clickable trackpad, and use the index finger to move
the pointer and to click, drag, and double-click.


As a major trackpad user on PC, I respectively disagree. The problem
with the one-hand approach is that when pressing down on the button
with the same hand, the other fingers tend to 'wander' and thus create
a more difficult targeting problem. Especially when working with small
targets, this becomes frustrating quickly.

For me, the ambiguity of 'what is a tab-click' vs 'just moving around'
on the trackpad makes #2 above also problematic as well.

To each his/her own. :-)
___
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: Re: Why is the imagedata value different from Win32 to MacOS platforms?

2006-07-25 Thread Malte Brill

Chipp wrote:

If you don't need the alpha channel of PNGs, I suggest always using  
JPGs.


And if you need the alpha channel and work with a graphic app that  
can use Photoshop plugins try superpng, which can embed the correct  
gamma settings into the png files. I used to work with it a lot and  
after some playing with the export options I managed to match colors  
x-plat.


http://www.fnordware.com/superpng/

All the best,

Malte

___
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: "There Was a Problem Saving the Standalone Application"

2006-07-25 Thread Chipp Walters

--> "My right hand is cramping up just visualizing it."

Oops, forgot to mention, the idea of navigating a cascading menu with
only one hand on a trackpad makes my hand cramp up just thinking about
it, too.
___
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: Re: Why is the imagedata value different from Win32 to MacOS platforms?

2006-07-25 Thread Chipp Walters

Malte,

Are you saying when using this plugin, there is no difference between
PNG files (gamma-wise) between platforms? If that's true, then you are
wonderful!!!

(Even if it's not true, you're still wonderful ;-)

Could you possibly post a stack which would demonstrate this? Here's
what I would suggest:

Capture a rect from a blank card (with a custom card bgcolor) and then
paste it into Pshop, then make half of it 50% transparent, export as
SuperPNG and import back into the stack. The half that's not 50% trans
should match exactly the bgcolor of the card on both platforms.

best,
Chipp
___
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 maintain window layers on Mac?

2006-07-25 Thread Sarah Reichelt

On 7/26/06, Peter T. Evensen <[EMAIL PROTECTED]> wrote:

Is there any way to force a window to be in the background?  The reason I
ask is I have a window that should stay in the background that shows the
name of the student who is logged in. On one application, this "background"
stack appears in front of the main stack, even though I go to the main
stack after I open the name stack.

Is there anyway to force a stack to the front?


Peter, "go to" should bring a stack to the front, so if that doesn't
work, it sounds like there might be another "go to" somewhere in your
scripts that is bringing another stack to the front.

One easy way to make sure a stack does NOT come to the front is to
hide it or move it off-screen.

HTH,
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


Re: Sending email via Rev

2006-07-25 Thread Chipp Walters

Richard,

Check out my altEmailHarness at:
http://www.altuit.com/webs/altuit2/RunRev/Downloads.htm

It puts a very simple wrapper around Shao Sean's libray and makes it
much simpler to use, with the exception it only sends text email.

best,
Chipp
___
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 change icon on standalone file and on left corner of stack (defalut Renrev Icon) (Runre v.2.5.1)

2006-07-25 Thread Chipp Walters

You can check out my tutorial on building icons for Rev at:
http://www.altuit.com/webs/altuit2/StandaloneBuilderTutorial/BuildingIconsforMacOSXandWindowsXP.htm

best,
Chipp
___
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: Re: Why is the imagedata value different from Win32 to MacOS platforms?

2006-07-25 Thread Chipp Walters

Hi Malte,

I did download and try SuperPNG (turns out it's FREE), but could not
get it to create the correct gamma settings. Can you share your
secret?

Thx,
Chipp
___
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 maintain window layers on Mac?

2006-07-25 Thread Peter T. Evensen
Well, in this case something else seems to be happening.   There is no go 
to the name stack.  For some odd reason the new stack is winding up behind 
it.  I even tried putting a "go to me" in the openStack handler, and that 
didn't seem to do anything.


I can't hide the background stack or move it off screen because it is 
displaying the student's name and needs to be visible in the background.


It always seemed like there should be some way to get the layer of a stack 
and a way to force a stack to the front.


At 03:52 PM 7/25/2006, you wrote:

On 7/26/06, Peter T. Evensen <[EMAIL PROTECTED]> wrote:

Is there any way to force a window to be in the background?  The reason I
ask is I have a window that should stay in the background that shows the
name of the student who is logged in. On one application, this "background"
stack appears in front of the main stack, even though I go to the main
stack after I open the name stack.

Is there anyway to force a stack to the front?


Peter, "go to" should bring a stack to the front, so if that doesn't
work, it sounds like there might be another "go to" somewhere in your
scripts that is bringing another stack to the front.

One easy way to make sure a stack does NOT come to the front is to
hide it or move it off-screen.

HTH,
Sarah


Peter T. Evensen
http://www.PetersRoadToHealth.com
314-629-5248 or 888-682-4588 



___
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 maintain window layers on Mac?

2006-07-25 Thread Chipp Walters

Peter,


From the docs:


"If the raisePalettes property is true, all palettes are always in
front of editable windows and modeless dialog boxes. Using the go
command to bring an editable window or modeless dialog to the front
does not move it in front of palettes."

maybe that can help.
___
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


restrict number of characters in a field?

2006-07-25 Thread Claire Bradin Siskin
Is there a way to restrict the number of characters that a user may 
type in a field?


Thanks in advance, Claire

--
Claire Bradin Siskin
Director
Robert Henderson Language Media Center
G 17 Cathedral of Learning
University of Pittsburgh
Pittsburgh, PA  15260
Office Phone: (412) 624-5939
Email: [EMAIL PROTECTED]
http://www.polyglot.pitt.edu
___
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: restrict number of characters in a field?

2006-07-25 Thread Peter T. Evensen
You can put the following in the script for the field.  In this case 5 is 
the max character.


on keyDown pKey
   if the length of the text of me < 5 then
pass keyDown
   end if
end keyDown

(note, this hasn't been tested, but just written off the top of my head)

At 04:22 PM 7/25/2006, you wrote:
Is there a way to restrict the number of characters that a user may type 
in a field?


Thanks in advance, Claire

--
Claire Bradin Siskin
Director
Robert Henderson Language Media Center
G 17 Cathedral of Learning
University of Pittsburgh
Pittsburgh, PA  15260
Office Phone: (412) 624-5939
Email: [EMAIL PROTECTED]
http://www.polyglot.pitt.edu
___
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


Peter T. Evensen
http://www.PetersRoadToHealth.com
314-629-5248 or 888-682-4588 



___
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: Re: Re: Why is the imagedata value different from Win32 to MacOS platforms?

2006-07-25 Thread Malte Brill

Hi Chipp,

I tested it again and it seems it doesn´t work. Seems I have a  
screwed up memory at the moment. I know I had it working when  
exporting from my OS 9 machine which is dead now I´m afraid. I recall  
that I had a jpeg with embedded color profile in the back instead of  
a card background color, but that should not matter. However, my  
apologies, in my current tests I could not get it to work either.


*blush*

All the best,

Malte

___
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 maintain window layers on Mac?

2006-07-25 Thread J. Landman Gay

Peter T. Evensen wrote:
Well, in this case something else seems to be happening.   There is no 
go to the name stack.  For some odd reason the new stack is winding up 
behind it.  I even tried putting a "go to me" in the openStack handler, 
and that didn't seem to do anything.


How about "toplevel "? Does that work? The only issue with 
this command is if your stack is a modeless or palette or some other 
kind of stack, this command will change its mode.


Also, if your stack is a modeless, palette, or etc. stack, the "go" 
command won't bring it to the front necessarily, because it may have a 
lesser mode than any toplevel stacks you have open.


--
Jacqueline Landman Gay | [EMAIL PROTECTED]
HyperActive Software   | http://www.hyperactivesw.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: Sending email via Rev

2006-07-25 Thread Mark Smith

Richard, are you using the latest version (2.5.3) of libSmtp?

best,

Mark

On 25 Jul 2006, at 21:24, Alex Tweedly wrote:


Richard Miller wrote:

I am testing Shao Shen's libsmtp function and having difficulty   
getting a test message to go through.


The smtpOpen command seems to work fine. When I use the smtpSend   
command and then the smtpGetTranscript command, I receive back a   
message that says:


 "message rejected"

I suspect the problem is with the way I am creating the message,   
which looks like this:


--- (the message doesn't   
include these dashes)

To: [EMAIL PROTECTED]
Subject: rev email test

This is a test of sending email via Rev
---

I also see a line coming back that says:

   354 Start mail input; end with , 

Any ideas what I am doing wrong?


SMTP expects the message to have headers, then a blank line  
(indicates end of headers), then the body message - and recognizes  
the end of the message by receiving (I thought)

 . 
(i.e. a line beginning with a period, and otherwise blank). Not  
sure why the text you quoted above has a comma in there - so I'd  
try it with the comma, with the period and and with neither  to see  
which works.


(this is from vague memory, and after a quick look I can't find any  
documentation to support what I thought I remembered - so give it a  
shot, but don't be too surprised if it's wrong :- )







--
Alex Tweedly   http://www.tweedly.net



--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.10.4/396 - Release Date:  
24/07/2006


___
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


Re: Imagedata row order

2006-07-25 Thread Jeanne A. E. DeVoto

At 12:32 PM -0600 7/25/2006, Dar Scott wrote:
No. It's run-length-encoded. Just as well, since the text property 
is what's stored on disk, and a 32-bit image with no compression 
whatever would take up a ton of room. Take a look at the length of 
the text versus the length of the imageData of a typical image 
object.


Wow, where is this in the dictionary?


I don't think it is ;-), except in a passing mention (RLE is expanded 
in the glossary).


Not that it would be a bad idea to document the internal format 
necessarily, but I don't think anyone ever thought in terms of people 
wanting to modify the text of an image on the fly - since you'd 
generally export it or use a referenced image, and do the 
modifications in an image editing program. (This was before anyone I 
know of had started thinking of doing image processing tasks in Rev.)


I have tried setting the text of an image to some PBM/PGM/PPM 
formats (P6 and P3 mostly, I think), but got no response to the 
image or size.  When I tried to subsequently export, I got an error.


Maybe something was wrong with my data.


Could be. I have successfully imported PBM and PGM files created by 
Graphic Converter, for what's it's worth. I don't think you can 
create a PBM/PPM/PGM by setting an image's text property - it looks 
like it's getting converted to PNG or RLE on the way in when it's 
imported, so there may not actually be such a thing as "a Rev image 
object in PBM/PGM/PPM format".

--
jeanne a. e. devoto ~ [EMAIL PROTECTED]
http://www.jaedworks.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: Imagedata row order

2006-07-25 Thread Jeanne A. E. DeVoto

At 11:35 AM -0700 7/25/2006, Rob Cozens wrote:
The text property is stored on disk?  Isn't that only if the image 
is referenced instead of imported?


Right. (But if it's referenced, the text property is always empty anyway.)


1.  I create a string of characters, 4 bytes per pixel  in imageData format .
2.  I set the imageData of an image to my string
3.  In what format is the image's text, if not rle?  GIF, JPEG, PNG, 
PICT, BMP, PBM/PGM/PPM, or XBM/XPM/XWD?  Perhaps rle compresses the 
data to 3 bytes per pixel by stripping the nulls?


It will be in RLE, unless you've set the format to something else - 
but RLE format isn't the same as the imageData. (It looks like the 
IDE sets the default paintCompression to PNG instead of RLE, so I 
suspect it will actually be PNG unless you're using a standalone.)


4.  What happens if I "put" my imageData-formatted string into an 
image?  Will the image not display correctly?  Does it throw an 
error?  Is the string reformatted before being placed in the text 
property?


You might get a crash, and you definitely won't get anything 
resembling the original image. Only by the rarest random chance would 
the imageData also be equivalent to valid RLE data - it's a 
structured format, and its structure isn't anything like the 
imageData pixmap structure.


Perhaps we are approaching "use" from different viewpoints; but then 
again it may all boil down to my misconception of what happens if I 
set the text of an image to an imageData-formatted string.  If you 
use "use" in the sense of "take the imageData as a starting point 
for your modifications", you'll get no argument from me.  And if 
setting the text of an image to an imageData-formatted string throws 
an error, I'm flat out wrong.  But if it doesn't throw an error, 
what does happen?


Well, as I say they're completely different formats. So setting the 
text of an image to an imageData-format set of data doesn't do 
anything sensible. It's just like setting the text of an image to the 
text of a field, or the contents of a random variable - it probably 
won't give a sensible result.

--
jeanne a. e. devoto ~ [EMAIL PROTECTED]
http://www.jaedworks.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: Re: Re: Why is the imagedata value different from Win32 to MacOS platforms?

2006-07-25 Thread Chipp Walters

Malte,

Thanks for testing. It sounds like using high quality JPEG files is
still the way to go.

best,
Chipp

On 7/25/06, Malte Brill <[EMAIL PROTECTED]> wrote:


I tested it again and it seems it doesn´t work.

___
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: Imagedata row order

2006-07-25 Thread Richard Gaskin

Jeanne A. E. DeVoto wrote:
> It looks like the IDE sets the default paintCompression
> to PNG instead of RLE, so I suspect it will actually be
> PNG unless you're using a standalone.

Is this user-settable in the IDE?

If not, what is the benefit of concealing the engine's true behavior?

Introducing differences between the engine's native behavior and the 
IDE's modifications of that should be done only with great care, and 
ideally with user-settable preferences which draw attention to these 
anomalies.


Differences between runtime and development make it harder to diagnose 
problem runtime problems from within the development environment, 
raising development costs unnecessarily.



Know the engine.
Trust the engine.
Use the engine.

--
 Richard Gaskin
 Fourth World Media Corporation
 ___
 [EMAIL PROTECTED]   http://www.FourthWorld.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: Reorder Front Scripts?

2006-07-25 Thread Ken Ray
On 7/24/06 3:04 PM, "Peter T. Evensen" <[EMAIL PROTECTED]> wrote:

> If you do another "insert...into front" of you script, I think it will move
> it to the front, just like "start using" will move that library to the
> front of the used libraries.  I haven't tested this though.
> 
> You should be able to reissue the "insert" for your tool and move your
> script up when your palette is activated.

Yes, I have done that with a "send in time" sort of thing; every second I
check to see if my frontscript is frontmost; if it's not, I remove and
reinsert it.

Works well so far...

Ken Ray
Sons of Thunder Software
Web site: http://www.sonsothunder.com/
Email: [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: Imagedata row order

2006-07-25 Thread J. Landman Gay

Richard Gaskin wrote:

Jeanne A. E. DeVoto wrote:
 > It looks like the IDE sets the default paintCompression
 > to PNG instead of RLE, so I suspect it will actually be
 > PNG unless you're using a standalone.

Is this user-settable in the IDE?


Yes, see the paintCompression property.

Differences between runtime and development make it harder to diagnose 
problem runtime problems from within the development environment, 
raising development costs unnecessarily.


The IDE's behavior vs. standalone behavior is documented in the 
dictionary entry.


--
Jacqueline Landman Gay | [EMAIL PROTECTED]
HyperActive Software   | http://www.hyperactivesw.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: restrict number of characters in a field?

2006-07-25 Thread Kay C Lan

On 7/26/06, Peter T. Evensen <[EMAIL PROTECTED]> wrote:



on keyDown pKey
if the length of the text of me < 5 then
 pass keyDown
end if
end keyDown


(note, this hasn't been tested, but just written off the top of my head)


Tested and it works fine.

Here is a slight amendment to cater for large doses of text and touch
typists who don't usually look at the screen and may wonder where the last
dozen characters went.

on keyDown pKey
 if (the length of the text of me > 254) then
  beep
else
  pass keyDown
end if
end keyDown

This allows 255 (yes that is correct) characters in a field before it will
start beeping at you. This has been tested and comes with a 12" or 12sec
guarantee, which ever comes first:-)

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


cute HTTP functions.

2006-07-25 Thread Andre Garzia

Hi Folks,

I built some cute HTTP functions that I think someone here might  
like. They are very handy and are making me more productive so I  
think they are some good candidates for sharing. I'll glue tem here  
and explain below what they do and why should one use it.


 Start Cute Functions 

function http.headers pServer, pResource
put format("HEAD %s HTTP/1.1\nHost: %s\nUser-agent: Revolution",  
pResource, pServer) into tHeaders

libUrlSetCustomHTTPHeaders tHeaders
get URL ("http://"; & pServer)
put  libUrlLastRHHeaders() into tResp
IF "200" is in line 1 of tResp THEN
replace ": " with numToChar(4) in tResp
delete line 1 of tResp
split tResp by  cr AND numToChar(4)
return tResp
ELSE
return "Error" && word 2 to -1 of line 1 of tResp
END IF
END http.headers

function http.header pServer, pResource, pHeader
put http.headers(pServer, pResource) into tTempA
IF the keys of tTempA is empty THEN
return tTempA
ELSE
return tTempA[pHeader]
END IF
END http.header

function http.lastModificationDate pServer, pResource
return http.header(pServer, pResource, "Last-Modified")
END http.lastModificationDate

function http.type pServer, pResource
return http.header(pServer, pResource, "Content-type")
END http.type

function http.length pServer, pResource
return http.header(pServer, pResource, "Content-length")
END http.length


 End Cute Functions 

I am using dot notation on the function names to avoid collisions  
with other people functions. Feel free to remove my dot notations.


The first function http.headers() accept two parameters a server, a  
resource. Why I splited in two params when I could have used an URL,  
well, this way you can use constants, you can declare a constant like  
kServer = "andregarzia.com" and replace the file being asked without  
changing the server. It's easier. This function returns an array with  
the headers returned by the server or an error if the server returned  
an error. This function is called by the ones below.


Function http.header() This function accepts three parameters, the  
first two ones are server and resource and are passed to http.headers 
() then the third one is an specific array element you're looking  
for. This is another example of modular coding making functions that  
build upon previous functions like a onion skin and thus moving the  
functions to higher levels. For example, I want to know the ETag for  
my index  file on my server to check if I need to update my apps  
cache, just call http.header("andregarzia.com", "index.html", "ETag").


There are headers that are always used, the most used headers in my  
humble opinion are: Last-Modified, Type and Length. I use Last- 
Modified to mantain my resources sync'd among different clients and  
thus ensuring everything is always up to date. I use type check what  
the server is sending me and length to see if I should use a chunked  
connection or not.


This functions execute very fast because they are using HEAD method  
instead of GET method, meaning they are not loading the resource they  
are just checking the HTTP Headers the server would send case you  
used GET. Suppose your app is needs to check if it should download  
some file, first it would call http.lastModificationDate() to see if  
it is up to date or not, if it is not, it might call http.length() to  
check the size of the file before download, if the file is to big it  
might download it using som asynchronous call instead of a blocking  
call.


Anyway, I have use for this functions, someone on this list might  
have too, so I decided to share. Those functions are just too simple  
to be shared as a stack right now so I used copy & paste.


Happy HTTP Hacking
Andre Garzia

___
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