Re: Need a Slide rule. Was: Two questions about trev

2009-09-21 Thread AcidJazz

Dunbarx ,

I think it's cool!   When I first started using rev I thought "surely I'm
overlooking something, because they can't possibly expect me to count
characters to figure out where the problem is..." Okay, that sentence
makes me sound lazy, but I definitely think there's a need.  

-- AcidJazz 


-- 
View this message in context: 
http://www.nabble.com/Need-a-Slide-rule.-Was%3A-Two-questions-about-trev-tp25440293p25466104.html
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: Two questions about trev

2009-09-17 Thread Jerry Daniels
I found that by increasing the indent size (in GLX2 or tRev) it was a  
lot easier to spot the ends of conditionals. Also, I follow my own  
coding standards and never use the single line IF statement, so that  
makes it easier to spot them.


We also have a feature in GLX2 that forces IF, THEN, END to upper  
case. That can help, also.


Best,

Jerry Daniels
Watch tRev - The Movie
http://reveditor.com/trev-the-movie

On Sep 14, 2009, at 11:52 AM, Mark Wieder wrote:


Richard-

Monday, September 14, 2009, 8:43:19 AM, you wrote:

If a handler is so long that folding would seem useful, sometimes  
that

can be an indication that it might be useful to consider breaking it
into subroutines.


True, and I'm constantly refactoring to keep things simple and
maintainable. But every once in a while I end up looking at someone
else's code, and it gets hard sometimes to find the end of those dang
conditional statements...

--
-Mark Wieder
mwie...@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


___
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: Two questions about trev

2009-09-15 Thread Jim Bufalini
Richard Gaskin wrote:

> ...Since the whole computing thing is just smoke and mirrors anyway (who
> bothers to notice that it's just a machine too dumb to count past 1?),
> for the end-user it may be very useful to hide complexity whenever
> practical.  The whole experience is just an illusion, so better to make
> it a pleasant one. :) ...

When you think about it, or ever programmed in Assembly, there are only
5-things a computer can do:

1. It can add and subtract (multiplication and division are just rapid
looped additions and subtractions).
2. It can compare two bits/bytes and determine equal to, greater than or
less than (how you know when to stop subtracting in a "division" and call it
a remainder).
3. It can move bits/bytes from one location to another (storage to memory,
memory to monitor, to processor, etc.)
4. It can replace instances of one bit/byte in memory with another.
5. It can jump execution to an offset location in memory (actually a
variation of 3).

Oh yeah, there is a sixth:

6. It can crash. :-)

All the illusion is based on combining these simple 5-capabilities and the
shattering of illusion is in the 6th. :-)

Aloha from Hawaii,

Jim Bufalini

___
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: Two questions about trev

2009-09-15 Thread Richard Gaskin

J. Landman Gay wrote:
BBEdit just selects the text, exactly as if you'd dragged across it with 
the mouse. That's handy because you can hit an arrow key, which removes 
the selection, and start typing. Or you can type any string and it 
replaces the selected text (which can be a surprise the first time until 
you realize it's just a text selection, but "undo" works to fix it.)


I like that it is simply a text selection. It uses my selection color 
and acts as I'd expect. It allows undo to work, or lets me grab the 
selected chunk and drag to move it elsewhere.


Excellent - thanks for the info, Jacque.  Not only does it have the 
advantages you describe, but it simplifies the code and takes care of an 
outstanding design decision I'd have to deal with otherwise: When to 
hide the "ControlSel" graphic.


--
 Richard Gaskin
 Fourth World
 Revolution training and consulting: http://www.fourthworld.com
 Webzine for Rev developers: 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: Two questions about trev

2009-09-15 Thread Richard Gaskin

Jerry J wrote:


On Sep 14, 2009, at 8:43 AM, Richard Gaskin wrote:

In fact, once could argue it encourages complexity by making it easy  
to ignore it.


Wow, another deep-thought quotable from Richard. There sure are two  
edges to this sword - after all one could argue that much of computer  
programming is, at its root, hiding complexity. Good or bad?


Thanks for the kind words.



Rather than "good or bad?" we might change the question to ask "useful 
or less useful?", and by that measure the answer may differ whether 
we're talking about the end-user of the system or the person responsible 
for delivering it.


Since the whole computing thing is just smoke and mirrors anyway (who 
bothers to notice that it's just a machine too dumb to count past 1?), 
for the end-user it may be very useful to hide complexity whenever 
practical.  The whole experience is just an illusion, so better to make 
it a pleasant one. :)


But the developer is responsible for providing that illusion of 
simplicity, and therefore is not often in a position to indulge in that 
illusion himself.  The magician has to know that the ball isn't really 
under any of the cups but merely palmed out of view, but it's more fun 
if the user doesn't know that.


True, to a large degree Rev is a sort of "pleasant illusion" itself, 
sheltering us from the ones and zeros marching through the processor so 
we can focus on the user experience unencumbered by counting bits.  As 
helpful as it's been to have worked in C and other lower-level languages 
to be able to imagine what the engine is going though under the hood, 
I'm grateful I can afford to forget such things most of the time.


Since we're waxing philosophical, here's a quote I've found valuable:

I interviewed Bill Appleton for a computer mag shortly after SuperCard 
1.0 came out in '89, and he said something that's stayed with me all 
these years later:  "A lot of really smart people do great work with all 
sorts of applications.  Then there are the people who who make those 
apps, relying on an engine like SuperCard to run them.  And then there's 
folks like me who make an interpreter like SuperCard using Think C.  And 
the folks who wrote the Think C compiler work at an even lower level, 
and going even lower are the people who wrote the chip instruction set. 
 There's plenty of room for excellence at all of these levels, and I've 
seen some amazing work across all of them."


That may be relevant here in discovering the dividing lines that can be 
useful for work at a given level.


No matter what else we may do in Rev, from writing externals in a 
lower-level language or using tools to provide a higher level of work, 
it's all driven by the engine.  Since the engine understands scripts 
only as a block of code, I find it helpful to think like the engine 
whenever I can.


I don't bother thinking like the compiler or the processor often, though 
sometimes it's helpful when optimizing. And I try to step back now and 
then to think like the end user when I can, but the magician can never 
really enjoy the appearance of an illusion he knows the secret to, at 
least not the way the end-user does (which is why usability testing is 
so important, but that's another story).


So when coding in Rev, I tend to favor things like having the IDE use 
property names rather than Rev's default setting of more descriptive 
terms (the first thing I have students do when I'm teaching is change 
that Preferences item), and seeing the whole script rather than a 
handler view (seems Rev 3.0 removed the handler view anyway, no?).  And 
I feel the same about parts of handlers too - might as well see the 
whole thing, just like the engine does.


Like my t-shirt says:

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



All that said, I think it really boils down to just a matter of taste. :)

--
 Richard Gaskin
 Fourth World
 Revolution training and consulting: http://www.fourthworld.com
 Webzine for Rev developers: 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: Two questions about trev

2009-09-15 Thread J. Landman Gay

Richard Gaskin wrote:

If one of the BBEdit users here could send me a screenshot of how that 
app displays this that would be very helpful.


BBEdit just selects the text, exactly as if you'd dragged across it with 
the mouse. That's handy because you can hit an arrow key, which removes 
the selection, and start typing. Or you can type any string and it 
replaces the selected text (which can be a surprise the first time until 
you realize it's just a text selection, but "undo" works to fix it.)


I like that it is simply a text selection. It uses my selection color 
and acts as I'd expect. It allows undo to work, or lets me grab the 
selected chunk and drag to move it elsewhere.


--
Jacqueline Landman Gay | jac...@hyperactivesw.com
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: Two questions about trev

2009-09-15 Thread Jerry Daniels

Thanks, Richard!

Best,

Jerry Daniels
Watch tRev - The Movie
http://reveditor.com/trev-the-movie

On Sep 15, 2009, at 9:37 AM, Richard Gaskin wrote:


Tereza Snyder wrote:
> Some satisfaction might be obtained if, by clicking a parenthesis  
with

> a modifier key pressed, one could select all the text between it and
> its partner. Similarly, click the keyword "if" and all text to the
> matching "end if" is selected and vice-versa. Same for repeat and
> switch.

I like the way you think, Tereza. That strikes a perfect balance,  
providing the clarity Mark Wieder was looking for while keeping the  
script displayed as the whole block of text it is.  I'll admit I  
have a few long handlers of my own where this will be very helpful. :)


I just added the code below to my own script editor, and I really  
like it.  Thanks for the suggestion.



Jerry, I found that as sloppy as this code is it performs reasonably  
well as long as I store the top of the graphic "ControlSel" (for  
"Control Stucture Selection") in a property so I can update it  
during scrolling without having to recalculate the rect on the fly.


The code assumes you have a graphic named "ControlSel" below your  
transparent editor field (since my editor is a fork of MC's my  
editor field is named simply "Editor Field").  Here I use a color  
slightly darker than the light gray of the background color of the  
stack, but brighter colors may look good too.


If one of the BBEdit users here could send me a screenshot of how  
that app displays this that would be very helpful.  It would also be  
good to know how they handle knowing what closure means for  
different languages (prefs settings?).


ShowControlSel is called from a CommandKeyDown handler (I used Cmd-J  
simply because it was available, but if you use a different one it  
would be good to know so I can change mine for consistency before I  
share it).When invoked it'll draw the "ControlSel" graphic at  
the bounds of the relevant block, i.e. if a handler it'll surround  
the whole handler, if a switch it'll do the switch, if "if" it'll do  
until the "end".


The ControlStructureClosureLine function is used in a few places in  
my editor, handy for finding the line offset where a handler or  
control structure closes.  It's way sloppy in style (cleaning it up  
is on my to-do list after a long list of client features), but seems  
to work okay where I'm using it.  With "if", "switch", and "repeat"  
it should account for nested control structures (please let me know  
if it fails to catch any).


You're welcome to use any of this that's helpful:



on ShowControlSel
 hide grc "ControlSel"
 put word 2 of the selectedLine into tLineNum
 put line tLineNum of fld "Editor Field" into tLine
 put ControlStructureClosureLine(tLineNum) into tClosingLineNum
 --
 put ((tLineNum-1) * the effective textHeight of \
 fld "Editor Field") + the top of fld "Editor Field" \
 + 2 into tTop
 put (tClosingLineNum * the effective textHeight of \
 fld "Editor Field") + the top of fld "Editor Field" \
 + 6 into tBottom -- 6 added for borders and margins
 set the uTop of grc "ControlSel" to tTop -- used for updating  
during scroll

 set the rect of grc "ControlSel" to \
 the left of fld "Editor Field", \
 tTop - the vScroll of fld "Editor Field", \
 the right of fld "Editor Field", \
 tBottom- the vScroll of fld "Editor Field"
 show grc "ControlSel"
end ShowControlSel


function ControlStructureClosureLine tLineNum
 put line tLineNum to (the number of lines of fld "Editor Field") \
 of fld "Editor Field" into tScript
 put line 1 of tScript into tLine
 put word 1 of tLine into tToken
 if tToken is among the words of "if switch repeat" then
   put 0 into i
   put 0 into tNestedCount
   repeat for each line tLine in tScript
 add 1 to i
 if word 1 of tLine is tToken then
   add 1 to tNestedCount
 end if
 --
 if word 1 of tLine is "end" AND word 2 of tLine is tToken then
   subtract 1 from tNestedCount
   if tNestedCount = 0 then
 return i+tLineNum-1
   end if
 end if
   end repeat
   --
   -- If we got here we may have an "if" closed by "else" so:
   if tToken is "if" then
 put 0 into i
 repeat for each line tLine in tScript
   add 1 to i
   if word 1 of tLine = "else" then
 return i+tLineNum-1
   end if
 end repeat
 --
 -- If we got this far perhaps the "if" dangles "then" on the  
next line:

 put 0 into i
 repeat for each line tLine in tScript
   add 1 to i
   if word 1 of tLine = "then" then
 return i+tLineNum-1
   end if
 end repeat
   end if
   --
 else
   -- Get whole handler?
   if tToken is among the words of "on private command function  
getProp setProp" then
 if word 1 of tLine is "private" then put word 3 of tScript into  
tToken

 else put word 2 of tLine into tToken
 put 0 into i
 repeat for each line tLine in tScript

Re: Two questions about trev

2009-09-15 Thread Richard Gaskin

Tereza Snyder wrote:
> Some satisfaction might be obtained if, by clicking a parenthesis with
> a modifier key pressed, one could select all the text between it and
> its partner. Similarly, click the keyword "if" and all text to the
> matching "end if" is selected and vice-versa. Same for repeat and
> switch.

I like the way you think, Tereza. That strikes a perfect balance, 
providing the clarity Mark Wieder was looking for while keeping the 
script displayed as the whole block of text it is.  I'll admit I have a 
few long handlers of my own where this will be very helpful. :)


I just added the code below to my own script editor, and I really like 
it.  Thanks for the suggestion.



Jerry, I found that as sloppy as this code is it performs reasonably 
well as long as I store the top of the graphic "ControlSel" (for 
"Control Stucture Selection") in a property so I can update it during 
scrolling without having to recalculate the rect on the fly.


The code assumes you have a graphic named "ControlSel" below your 
transparent editor field (since my editor is a fork of MC's my editor 
field is named simply "Editor Field").  Here I use a color slightly 
darker than the light gray of the background color of the stack, but 
brighter colors may look good too.


If one of the BBEdit users here could send me a screenshot of how that 
app displays this that would be very helpful.  It would also be good to 
know how they handle knowing what closure means for different languages 
(prefs settings?).


ShowControlSel is called from a CommandKeyDown handler (I used Cmd-J 
simply because it was available, but if you use a different one it would 
be good to know so I can change mine for consistency before I share it). 
   When invoked it'll draw the "ControlSel" graphic at the bounds of 
the relevant block, i.e. if a handler it'll surround the whole handler, 
if a switch it'll do the switch, if "if" it'll do until the "end".


The ControlStructureClosureLine function is used in a few places in my 
editor, handy for finding the line offset where a handler or control 
structure closes.  It's way sloppy in style (cleaning it up is on my 
to-do list after a long list of client features), but seems to work okay 
where I'm using it.  With "if", "switch", and "repeat" it should account 
for nested control structures (please let me know if it fails to catch any).


You're welcome to use any of this that's helpful:



on ShowControlSel
  hide grc "ControlSel"
  put word 2 of the selectedLine into tLineNum
  put line tLineNum of fld "Editor Field" into tLine
  put ControlStructureClosureLine(tLineNum) into tClosingLineNum
  --
  put ((tLineNum-1) * the effective textHeight of \
  fld "Editor Field") + the top of fld "Editor Field" \
  + 2 into tTop
  put (tClosingLineNum * the effective textHeight of \
  fld "Editor Field") + the top of fld "Editor Field" \
  + 6 into tBottom -- 6 added for borders and margins
  set the uTop of grc "ControlSel" to tTop -- used for updating during 
scroll

  set the rect of grc "ControlSel" to \
  the left of fld "Editor Field", \
  tTop - the vScroll of fld "Editor Field", \
  the right of fld "Editor Field", \
  tBottom- the vScroll of fld "Editor Field"
  show grc "ControlSel"
end ShowControlSel


function ControlStructureClosureLine tLineNum
  put line tLineNum to (the number of lines of fld "Editor Field") \
  of fld "Editor Field" into tScript
  put line 1 of tScript into tLine
  put word 1 of tLine into tToken
  if tToken is among the words of "if switch repeat" then
put 0 into i
put 0 into tNestedCount
repeat for each line tLine in tScript
  add 1 to i
  if word 1 of tLine is tToken then
add 1 to tNestedCount
  end if
  --
  if word 1 of tLine is "end" AND word 2 of tLine is tToken then
subtract 1 from tNestedCount
if tNestedCount = 0 then
  return i+tLineNum-1
end if
  end if
end repeat
--
-- If we got here we may have an "if" closed by "else" so:
if tToken is "if" then
  put 0 into i
  repeat for each line tLine in tScript
add 1 to i
if word 1 of tLine = "else" then
  return i+tLineNum-1
end if
  end repeat
  --
  -- If we got this far perhaps the "if" dangles "then" on the next 
line:

  put 0 into i
  repeat for each line tLine in tScript
add 1 to i
if word 1 of tLine = "then" then
  return i+tLineNum-1
end if
  end repeat
end if
--
  else
-- Get whole handler?
if tToken is among the words of "on private command function 
getProp setProp" then
  if word 1 of tLine is "private" then put word 3 of tScript into 
tToken

  else put word 2 of tLine into tToken
  put 0 into i
  repeat for each line tLine in tScript
add 1 to i
if word 1 of tLine = "end" AND word 2 of tLine is tToken then
  return i+tLineNum-1
  

Re: Two questions about trev

2009-09-14 Thread Jerry Daniels
That's the one I like, but I have to see what the performance overhead  
is.


Best,

Jerry Daniels
Watch tRev - The Movie
http://reveditor.com/trev-the-movie

On Sep 14, 2009, at 7:59 PM, Sarah Reichelt wrote:

Some satisfaction might be obtained if, by clicking a parenthesis  
with a
modifier key pressed, one could select all the text between it and  
its
partner. Similarly, click the keyword "if" and all text to the  
matching "end

if" is selected and vice-versa. Same for repeat and switch.

No need to change the display at all,


BBEdit does it that way and I find it very useful.



Apple's XCode does it by drawing a pale grey background around the
loop or structure.
It nests these in varying shades of grey, but just a single graphic
layered behind a structure would be cool.

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


Re: Two questions about trev

2009-09-14 Thread Jerry Daniels

Cool idea. Could also be done with color.

Best,

Jerry Daniels
Watch tRev - The Movie
http://reveditor.com/trev-the-movie

On Sep 14, 2009, at 7:48 PM, George C Brackett wrote:


Hear, hear!  Me too.  Jerry?

George

On Sep 14, 2009, at 6:10 PM, J. Landman Gay wrote:

Tereza Snyder wrote:

On Sep 14, 2009, at 11:52 AM, Mark Wieder wrote:

True, and I'm constantly refactoring to keep things simple and
maintainable. But every once in a while I end up looking at someone
else's code, and it gets hard sometimes to find the end of those  
dang

conditional statements...
Some satisfaction might be obtained if, by clicking a parenthesis  
with a modifier key pressed, one could select all the text between  
it and its partner. Similarly, click the keyword "if" and all text  
to the matching "end if" is selected and vice-versa. Same for  
repeat and switch.

No need to change the display at all,


BBEdit does it that way and I find it very useful.

--
Jacqueline Landman Gay | jac...@hyperactivesw.com
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

___
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: Two questions about trev

2009-09-14 Thread Jerry J

On Sep 14, 2009, at 8:43 AM, Richard Gaskin wrote:

In fact, once could argue it encourages complexity by making it easy  
to ignore it.


Wow, another deep-thought quotable from Richard. There sure are two  
edges to this sword - after all one could argue that much of computer  
programming is, at its root, hiding complexity. Good or bad?


Thanks again, Richard!
--Jerry J

___
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: Two questions about trev

2009-09-14 Thread Sarah Reichelt
>> Some satisfaction might be obtained if, by clicking a parenthesis with a
>> modifier key pressed, one could select all the text between it and its
>> partner. Similarly, click the keyword "if" and all text to the matching "end
>> if" is selected and vice-versa. Same for repeat and switch.
>>
>> No need to change the display at all,
>
> BBEdit does it that way and I find it very useful.


Apple's XCode does it by drawing a pale grey background around the
loop or structure.
It nests these in varying shades of grey, but just a single graphic
layered behind a structure would be cool.

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


Re: Two questions about trev

2009-09-14 Thread George C Brackett

Hear, hear!  Me too.  Jerry?

George

On Sep 14, 2009, at 6:10 PM, J. Landman Gay wrote:

Tereza Snyder wrote:

On Sep 14, 2009, at 11:52 AM, Mark Wieder wrote:

True, and I'm constantly refactoring to keep things simple and
maintainable. But every once in a while I end up looking at someone
else's code, and it gets hard sometimes to find the end of those dang
conditional statements...
Some satisfaction might be obtained if, by clicking a parenthesis  
with a modifier key pressed, one could select all the text between  
it and its partner. Similarly, click the keyword "if" and all text  
to the matching "end if" is selected and vice-versa. Same for repeat  
and switch.

No need to change the display at all,


BBEdit does it that way and I find it very useful.

--
Jacqueline Landman Gay | jac...@hyperactivesw.com
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

___
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: Two questions about trev

2009-09-14 Thread J. Landman Gay

Tereza Snyder wrote:


On Sep 14, 2009, at 11:52 AM, Mark Wieder wrote:


True, and I'm constantly refactoring to keep things simple and
maintainable. But every once in a while I end up looking at someone
else's code, and it gets hard sometimes to find the end of those dang
conditional statements...



Some satisfaction might be obtained if, by clicking a parenthesis with a 
modifier key pressed, one could select all the text between it and its 
partner. Similarly, click the keyword "if" and all text to the matching 
"end if" is selected and vice-versa. Same for repeat and switch.


No need to change the display at all,


BBEdit does it that way and I find it very useful.

--
Jacqueline Landman Gay | jac...@hyperactivesw.com
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


Need a Slide rule. Was: Two questions about trev

2009-09-14 Thread DunbarX
I had suggested a while back that a horizontal character counting ruler in 
the script editor would allow one to find the char where an error occurs, 
which can be a pain in a long line. Such a ruler, accompanied by a slide rule 
like cursor, would also allow one to visually align the indentations of 
nested if-then and repeat structures. I actually sometimes use a straightedge 
to 
find ifs and their associated end-ifs.

I cannot figure out a way to make a semitransparent Rev app, which would do 
the job nicely. Or a semi-transparent dashboard widget; I could overlie the 
script editor with it and throw away my straightedge. 

Nobody thought this was a cool amenity though.

Craig Newman

In a message dated 9/14/09 12:54:51 PM, mwie...@ahsoftware.net writes:

> ... and it gets hard sometimes to find the end of those dang conditional 
> statements...
> 

___
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: Two questions about trev

2009-09-14 Thread Tereza Snyder


On Sep 14, 2009, at 11:52 AM, Mark Wieder wrote:


True, and I'm constantly refactoring to keep things simple and
maintainable. But every once in a while I end up looking at someone
else's code, and it gets hard sometimes to find the end of those dang
conditional statements...



Some satisfaction might be obtained if, by clicking a parenthesis with  
a modifier key pressed, one could select all the text between it and  
its partner. Similarly, click the keyword "if" and all text to the  
matching "end if" is selected and vice-versa. Same for repeat and  
switch.


No need to change the display at all,


t


--
Tereza Snyder
Califex Software, Inc.





___
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: Two questions about trev

2009-09-14 Thread Mark Wieder
Richard-

Monday, September 14, 2009, 8:43:19 AM, you wrote:

> If a handler is so long that folding would seem useful, sometimes that
> can be an indication that it might be useful to consider breaking it
> into subroutines.

True, and I'm constantly refactoring to keep things simple and
maintainable. But every once in a while I end up looking at someone
else's code, and it gets hard sometimes to find the end of those dang
conditional statements...

-- 
-Mark Wieder
 mwie...@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


Re: Two questions about trev

2009-09-14 Thread Richard Gaskin

Jerry Daniels wrote:

I do think that there is a conceptual model of what a script is: a  
single body of text. Inserting folders into the code REALLY slows down  
rendering. We have links in our code now, I found embedded folder  
images made script rendering slow. Super slow.


Furthermore, the nature of the script that i think is antithetical is  
the flexibility of rev talk. How many ways can you write if-then- 
else's? Lots. I've actually tried and used folders in rev scripts and  
it wasn't as rewarding as I would have thought.


This may ultimately be merely a matter of taste, but my own preference 
mirrors yours.


I believe there is cognitive value in seeing the thing you're working 
on, and as you note a script is a block of text.  A good editor can make 
it easy to navigate that block of text, but altering how it's displayed 
is not without tradeoffs.


Folding hides complex code, but doesn't make it any simpler.  In fact, 
once could argue it encourages complexity by making it easy to ignore it.


Showing code as it is is like a mirror to your mind:  you can't ignore 
the blemishes.


If a handler is so long that folding would seem useful, sometimes that 
can be an indication that it might be useful to consider breaking it 
into subroutines.


--
 Richard Gaskin
 Fourth World
 Revolution training and consulting: http://www.fourthworld.com
 Webzine for Rev developers: 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: Two questions about trev

2009-09-14 Thread Jerry Daniels

Mark, et al.,

I do think that there is a conceptual model of what a script is: a  
single body of text. Inserting folders into the code REALLY slows down  
rendering. We have links in our code now, I found embedded folder  
images made script rendering slow. Super slow.


Furthermore, the nature of the script that i think is antithetical is  
the flexibility of rev talk. How many ways can you write if-then- 
else's? Lots. I've actually tried and used folders in rev scripts and  
it wasn't as rewarding as I would have thought.


HOWEVER...

I've often thought it would be cool to make scripts into collections  
of handlers, with each handler as a component of a script. I made a  
script editor were the script was a group of handlers. Literally a  
group as in the object "group." THAT was interesting. And that  
interests me. Each handler as it's own record. The ability to share  
handlers, reuse handlers, etc. comes into play. But that also removes  
the prose nature of a natural language. Would declarations follow a  
handler? Dependencies on other handlers? Comments belonging to handlers.


What I always find myself bumping up against is the nature of the  
language. Will my model go with or against that nature? Watch Bill  
Atkinson talk about HyperCard and HyperTalk in some of the old video.  
It's fascinating. His perception of the nature of HyperCard and  
HyperTalk are very simple.


In the end, I tend to go back to Bill's models, as they are also now  
the most modern outlook on app building: small and simple. Therefore,  
I tend to NOT complexify scripting any more than I have to. And  
folding seems like rubbing a cat's fur the wrong way to me, given all  
the different ways I've looked at it thus far.


Best,

Jerry Daniels
Watch tRev - The Movie
http://reveditor.com/trev-the-movie

On Sep 14, 2009, at 9:37 AM, Mark Wieder wrote:


Jerry-

Monday, September 14, 2009, 6:54:29 AM, you wrote:


I did a tree view of the code that worked on handlers and other
control structures. It just didn't hold up very well when scripts got
sizable. Also, dealing with the many variations of if-then-else was
not pleasant. I've still got code stubs in tRev to do folding,
actually, but I tend to think it is a case of rubbing revolution's  
fur
the wrong way. I've come to think it's not an ideal fit for the  
nature

of the language or the text editing nature of the editing environs.


Not sure that I completely agree here, at least with the "nature of
the language" part. Obviously you don't want to mess with the script
itselfe, but for long handlers (come on, we've all got them) it's
often hard to find the matching "end if" statement for an "if",
especially if they're nested three or four levels deep. Folding is a
way to indicate that, but there are other visual indicators that work
as well: option-click or something on the start of a conditional to
highlight the end statement, etc.

--
-Mark Wieder
mwie...@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


___
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: Two questions about trev

2009-09-14 Thread Mark Wieder
Jerry-

Monday, September 14, 2009, 6:54:29 AM, you wrote:

> I did a tree view of the code that worked on handlers and other
> control structures. It just didn't hold up very well when scripts got
> sizable. Also, dealing with the many variations of if-then-else was
> not pleasant. I've still got code stubs in tRev to do folding,  
> actually, but I tend to think it is a case of rubbing revolution's fur
> the wrong way. I've come to think it's not an ideal fit for the nature
> of the language or the text editing nature of the editing environs.

Not sure that I completely agree here, at least with the "nature of
the language" part. Obviously you don't want to mess with the script
itselfe, but for long handlers (come on, we've all got them) it's
often hard to find the matching "end if" statement for an "if",
especially if they're nested three or four levels deep. Folding is a
way to indicate that, but there are other visual indicators that work
as well: option-click or something on the start of a conditional to
highlight the end statement, etc.

-- 
-Mark Wieder
 mwie...@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


Re: Two questions about trev

2009-09-14 Thread Jerry Daniels

Ludovic,

I just tested tRev with Rev 2.8, 2.9, 3.0 and it worked fine. I had  
some unused 3.5-specific code I had to neglected to remove, but now  
that it's gone, the updated (just now) version of tRev tested well  
will those versions.


I did a tree view of the code that worked on handlers and other  
control structures. It just didn't hold up very well when scripts got  
sizable. Also, dealing with the many variations of if-then-else was  
not pleasant. I've still got code stubs in tRev to do folding,  
actually, but I tend to think it is a case of rubbing revolution's fur  
the wrong way. I've come to think it's not an ideal fit for the nature  
of the language or the text editing nature of the editing environs.


Best,

Jerry Daniels
Watch tRev - The Movie
http://reveditor.com/trev-the-movie

On Sep 14, 2009, at 1:18 AM, Ludovic Thébault wrote:


Hello,

1- What versions of Revolution are compatible with trev ? (i've 2.9.1)
2- It is possible to have a "tree" view in the code to reduce or  
extend loop like "if…else…end if" or "switch…case…end switch" ? It  
could be cool to verify the structure of the code when you have a  
lot of imbricated loop.


Thx___
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


Two questions about trev

2009-09-13 Thread Ludovic Thébault

Hello,

1- What versions of Revolution are compatible with trev ? (i've 2.9.1)
2- It is possible to have a "tree" view in the code to reduce or  
extend loop like "if…else…end if" or "switch…case…end switch" ? It  
could be cool to verify the structure of the code when you have a lot  
of imbricated loop.


Thx___
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: Two Questions About My Search Field

2009-01-14 Thread Gregory Lypny
What a great response!  Thank you Devin Asay, Bernd, Andre Bisseret  
and Terry Judd.


Gotta love this list,

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: Two Questions About My Search Field

2009-01-13 Thread DunbarX
I dug up a very old gadget in HC that handled the delete key explicitly. 
There is a field "results" to display the dug up data. This is the field script 
with the string to build and find...

on keydown var
  put word 2 of the selectedchunk into cursorloc --to restore cursor later
  global clientlist -- a database
  send "keydown" && quote & var & quote to hypercard -- to effect the 
keystroke itself
  put empty into temp

  if chartonum(var) = 8 then  --HANDLES "DELETE"
  if length(line 1 of me) < 3 then exit to hypercard  -- ignore small entries
    get fullfind(clientlist,value of me,"false","true") -- do differently in 
Rev
    repeat with y = 1 to number(lines of it)
    put line item 2 of line y of it of clientlist & return after temp
    end repeat
    if temp = empty then put "Not found" into fld "results" -- another field
    else put temp into fld "results"
    select after char (cursorloc -2) of me --restore blinking cursor
    exit keydown
  end if

--HANDLES NORMAL ENTRIES
  if length(line 1 of me) < 3 then -- ignore small entries
    select after text of me
    exit to hypercard
  end if
  put line 1 of me into tofind
  get fullfind(clientlist,tofind,"false","true")
  repeat with y = 1 to number(lines of it)
  put line item 2 of line y of it of clientlist & return after temp
  end repeat
  if temp = "" then put "No such" && quote & tofind & quote into fld
"results"
  else
    set itemdelimiter to "¶"
    sort temp
    sort temp by item 1 of each
    put temp into fld "results"
  end if
  select after char cursorloc of me
end keydown


**
A Good Credit Score is 700 or Above. See yours in 
just 2 easy steps! 
(http://pr.atwola.com/promoclk/10075x1215855013x1201028747/aol?redir=http://www.freecreditreport.com/pm/default.aspx?sc=668072%26hmpgID=
62%26bcd=DecemailfooterNO62)
___
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: Two Questions About My Search Field

2009-01-13 Thread DunbarX
I dug up a very old gadget in HC that handled the delete key explicitly. 
There is a field "results" to display the dug up data. This is the field script 
with the string to build and find...

on keydown var
   put word 2 of the selectedchunk into cursorloc --to restore cursor later
   global clientlist -- a database
   send "keydown" && quote & var & quote to hypercard -- to effect the 
keystroke itself
   put empty into temp
 
   if chartonum(var) = 8 then   --HANDLES "DELETE"
   if length(line 1 of me) < 3 then exit to hypercard   -- ignore small 
entries
 get fullfind(clientlist,value of me,"false","true") -- do differently in 
Rev
 repeat with y = 1 to number(lines of it)
 put line item 2 of line y of it of clientlist & return after temp
 end repeat
 if temp = empty then put "Not found" into fld "results" -- another field
 else put temp into fld "results"
 select after char (cursorloc -2) of me --restore blinking cursor
 exit keydown
   end if
 
--HANDLES NORMAL ENTRIES
   if length(line 1 of me) < 3 then -- ignore small entries
 select after text of me
 exit to hypercard
   end if
   put line 1 of me into tofind
   get fullfind(clientlist,tofind,"false","true")
   repeat with y = 1 to number(lines of it)
   put line item 2 of line y of it of clientlist & return after temp
   end repeat
   if temp = "" then put "No such" && quote & tofind & quote into fld
"results"
   else
 set itemdelimiter to "¶"
 sort temp
 sort temp by item 1 of each
 put temp into fld "results"
   end if
   select after char cursorloc of me
end keydown



**
A Good Credit Score is 700 or Above. See yours in just 2 easy 
steps! 
(http://pr.atwola.com/promoclk/10075x1215855013x1201028747/aol?redir=http://www.freecreditreport.com/pm/default.aspx?sc=668072%26hmpgID=62%26bcd=De
cemailfooterNO62)
___
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: Two Questions About My Search Field

2009-01-13 Thread DunbarX
 I dug up a very old gadget in HC that handled the delete key explicitly. 
There is a field "results" to display the dug up data. This is the field 
script...

 on keydown var
  put word 2 of the selectedchunk into cursorloc --to restore cursor later
  global clientlist -- a database
  send "keydown" && quote & var & quote to hypercard -- to effect the 
keystroke itself
  put empty into temp
 
  if chartonum(var) = 8 then  --HANDLES "DELETE"
  if length(line 1 of me) < 3 then exit to hypercard   -- ignore small 
entries
    get fullfind(clientlist,value of me,"false","true") -- do differently in 
Rev
    repeat with y = 1 to number(lines of it)
        put line item 2 of line y of it of clientlist & return after temp
    end repeat
    if temp = empty then put "Not found" into fld "results" -- another field
    else put temp into fld "results" 
    select after char (cursorloc -2) of me --restore blinking cursor
    exit keydown
  end if
 
--HANDLES NORMAL ENTRIES
  if length(line 1 of me) < 3 then -- ignore small entries
    select after text of me
    exit to hypercard
  end if
  put line 1 of me into tofind
  get fullfind(clientlist,tofind,"false","true")
  repeat with y = 1 to number(lines of it)
      put line item 2 of line y of it of clientlist & return after temp
  end repeat
  if temp = "" then put "No such" && quote & tofind & quote into fld
"results"
  else
    set itemdelimiter to "¶"
    sort temp
    sort temp by item 1 of each
    put temp into fld "results"
  end if
  select after char cursorloc of me
end keydown



**
A Good Credit Score is 700 or Above. See yours in just 2 easy 
steps! 
(http://pr.atwola.com/promoclk/10075x1215855013x1201028747/aol?redir=http://www.freecreditreport.com/pm/default.aspx?sc=668072%26hmpgID=62%26bcd=De
cemailfooterNO62)
___
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: Two Questions About My Search Field

2009-01-13 Thread Andre.Bisseret


Le 12 janv. 09 à 23:41, Gregory Lypny a écrit :


Hello everyone,

	I've created a search field that takes a phrase typed into it and  
searches a data field for lines containing the phrase.  It works in  
the usual way where the search becomes narrower the more you type.   
What I haven't been able to do is go backwards, that is, make the  
search wider as characters are deleted from the end of the search  
string when the delete key is hit.  When the delete key is hit,  
nothing happens, and I'm not sure how to work a delete key message  
into the handler.


on keyDown pKey
  put me & pKey into searchString
  get fld "Data"
  repeat for each line thisLine in it
 if searchString is among the words of thisLine
 then
put thisLine & return after hits--Whole words
next repeat
 else
if thisLine contains searchString then put thisLine & return  
after otherHits

 end if
  end repeat
  put otherHits after hits
  if the last character of hits is return then delete the last  
character of hits

  put hits into fld "Browse List"
  put 1*the number of lines in hits && "records" into fld "Number of  
Records"

  pass keyDown
end keyDown


Hello,
Af for your first question, In several stacks I have a field  
"entrée" (your "search field"), a field "dataFld" and a field  
"résultats"
in the script of the field "Entrée" I have the following handler that  
works including badkwards


ON rawkeyUp which
local maSousListe,
--
 IF which is 65293 THEN pass rawkeyUp ---just because I need a  
returninField handler

REPEAT
  find fld "entrée" in fld "dataFld"
  IF the result is "not found" THEN exit repeat
  put value(the foundline) & cr after maSousListe
END repeat
put empty into fld "résultats"
put maSousListe into fld "résultats"
select  line 1 of fld "résultats"
select after fld "entrée"
put empty into maSousListe
END rawkeyUp

HTH
Best regards from Grenoble

André


___
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: Two Questions About My Search Field

2009-01-13 Thread Devin Asay


On Jan 12, 2009, at 3:41 PM, Gregory Lypny wrote:


Hello everyone,

I've created a search field that takes a phrase typed into it and
searches a data field for lines containing the phrase.  It works in
the usual way where the search becomes narrower the more you type.
What I haven't been able to do is go backwards, that is, make the
search wider as characters are deleted from the end of the search
string when the delete key is hit.  When the delete key is hit,
nothing happens, and I'm not sure how to work a delete key message
into the handler.


Gregory,

I built stack a while back that incorporates this functionality. If  
you wan,t you can have a look at it by entering in the message box:


go stack url "http://asay.byu.edu/filterSearch.rev";

This example does more than just filter, hence the longer script. But  
it boils down to trapping the rawKeyDown message. The rest of the  
scripting does things like tabbing into the filtered list when you  
find your term, allowing arrow up and down to change selections in the  
list, placing the hilighted line in a field on return, and so forth.  
If it's helpful you're welcome to use it.


My second question concerns the format of the field itself and the
Geometry Manager.  I jazzed up the field by importing three PNG images
to make it look like Apple's hot dog shaped search field.  The two
rounded ends remain fixed in size and maintain their relative
positions while the middle segment is scaled horizontally if the stack
is resized.  It all works wonderfully (I believe Eric Chatonet gave me
this tip ages ago --- thanks, Eric) except that whenever the stack is
reopened the middle segment is displayed in its original size
regardless of the size of the stack at the time it was closed.  This
means the hot dog appears sliced until the user resizes the stack, at
which time the pieces will snap back together.  Any fix for this
little glitch?


Others may have a better solution, but I would try calling resizeStack  
on preOpenStack.


HTH

Devin

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: Two Questions About My Search Field

2009-01-12 Thread BNig

hi Gregory,

try this in the script of your search field:

on keyDown pKey
if pKey = "tDelete" then
put char 1 to -2 of me into searchString
put searchstring into me
select after text of me
if searchstring = "" then
put "" into field "Number of Records"
put "" into field "Browse List"
exit keyDown
end if
else
put me & pKey into searchString
put searchstring into me
select after text of me
end if
get fld "Data"
repeat for each line thisLine in it
if searchString is among the words of thisLine
then
put thisLine & return after hits--Whole words
next repeat
else
if thisLine contains searchString then put thisLine & return
after otherHits
end if
end repeat
put otherHits after hits
if the last character of hits is return then delete the last character
of hits
put hits into fld "Browse List"
put 1*the number of lines in hits && "records" into fld "Number of
Records"
-- pass keyDown
end keyDown

on rawKeyDown pKeyCode
if pKeyCode = 65288 then send "keyDown" && "tDelete" to me
else  pass rawKeyDown
end rawKeyDown

I dont pass the keyDown, it works for me, maybe you find a need for it and
you would have to tweak the script a bit.
regards
Bernd
-- 
View this message in context: 
http://www.nabble.com/Two-Questions-About-My-Search-Field-tp21425489p21426769.html
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: Two Questions About My Search Field

2009-01-12 Thread Terry Judd
On 13/01/09 9:41 AM, "Gregory Lypny"  wrote:

Hi Gregory,

Perhaps you should look at implementing a rawkeydown handler as well or
instead of the keydown handler. That way you should be able to trap for any
key.

On the second issue - I think all you need to do is set the lockloc of the
image to true. It should then retain its size.

Terry...

> 
> Hello everyone,
> 
> I've created a search field that takes a phrase typed into it and
> searches a data field for lines containing the phrase.  It works in
> the usual way where the search becomes narrower the more you type.
> What I haven't been able to do is go backwards, that is, make the
> search wider as characters are deleted from the end of the search
> string when the delete key is hit.  When the delete key is hit,
> nothing happens, and I'm not sure how to work a delete key message
> into the handler.
> 
> on keyDown pKey
> put me & pKey into searchString
> get fld "Data"
> repeat for each line thisLine in it
>if searchString is among the words of thisLine
>then
>   put thisLine & return after hits--Whole words
>   next repeat
>else
>   if thisLine contains searchString then put thisLine & return
> after otherHits
>end if
> end repeat
> put otherHits after hits
> if the last character of hits is return then delete the last
> character of hits
> put hits into fld "Browse List"
> put 1*the number of lines in hits && "records" into fld "Number of
> Records"
> pass keyDown
> end keyDown
> 
> My second question concerns the format of the field itself and the
> Geometry Manager.  I jazzed up the field by importing three PNG images
> to make it look like Apple's hot dog shaped search field.  The two
> rounded ends remain fixed in size and maintain their relative
> positions while the middle segment is scaled horizontally if the stack
> is resized.  It all works wonderfully (I believe Eric Chatonet gave me
> this tip ages ago --- thanks, Eric) except that whenever the stack is
> reopened the middle segment is displayed in its original size
> regardless of the size of the stack at the time it was closed.  This
> means the hot dog appears sliced until the user resizes the stack, at
> which time the pieces will snap back together.  Any fix for this
> little glitch?
> 
> 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

___
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


Two Questions About My Search Field

2009-01-12 Thread Gregory Lypny

Hello everyone,

	I've created a search field that takes a phrase typed into it and  
searches a data field for lines containing the phrase.  It works in  
the usual way where the search becomes narrower the more you type.   
What I haven't been able to do is go backwards, that is, make the  
search wider as characters are deleted from the end of the search  
string when the delete key is hit.  When the delete key is hit,  
nothing happens, and I'm not sure how to work a delete key message  
into the handler.


on keyDown pKey
   put me & pKey into searchString
   get fld "Data"
   repeat for each line thisLine in it
  if searchString is among the words of thisLine
  then
 put thisLine & return after hits--Whole words
 next repeat
  else
 if thisLine contains searchString then put thisLine & return  
after otherHits

  end if
   end repeat
   put otherHits after hits
   if the last character of hits is return then delete the last  
character of hits

   put hits into fld "Browse List"
   put 1*the number of lines in hits && "records" into fld "Number of  
Records"

   pass keyDown
end keyDown

	My second question concerns the format of the field itself and the  
Geometry Manager.  I jazzed up the field by importing three PNG images  
to make it look like Apple's hot dog shaped search field.  The two  
rounded ends remain fixed in size and maintain their relative  
positions while the middle segment is scaled horizontally if the stack  
is resized.  It all works wonderfully (I believe Eric Chatonet gave me  
this tip ages ago --- thanks, Eric) except that whenever the stack is  
reopened the middle segment is displayed in its original size  
regardless of the size of the stack at the time it was closed.  This  
means the hot dog appears sliced until the user resizes the stack, at  
which time the pieces will snap back together.  Any fix for this  
little glitch?


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: two questions: send and references

2005-09-20 Thread Mark Wieder
Trevor-

Tuesday, September 20, 2005, 10:35:16 AM, you wrote:

> What you might be able to do is send the name of a custom prop that
> has the array in it.  Just set the values in that.  Not ideal but  
> might solve the problem for now and it is easy enough to transfer  
> arrays to and from custom props.

Thanks. Switching to customPropertySets instead of using arrays got me
out of trouble. I don't really need the persistence, but having it
doesn't bother me either. A bonus is that my code is now much cleaner
than when I was trying to create complex array indices. And having to
work around engine bugs.

-- 
-Mark Wieder
 [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: two questions: send and references

2005-09-20 Thread Mark Wieder
Trevor-

Tuesday, September 20, 2005, 10:47:18 AM, you wrote:

> try:

> send "AddListener pMessage, pViewer" to pController


Doh. I knew there would be some way to put quotes around something
that already had quotes in it. Thanks.

-- 
-Mark Wieder
 [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: two questions: send and references

2005-09-20 Thread Trevor DeVore

On Sep 20, 2005, at 10:46 AM, Mark Wieder wrote:

I'd like to believe it, but no. It doesn't.

Maybe I should be more exact about what I'm trying to do.

MVC.RegisterViewer the long id of field "abc", "HelpMe", the long id
of button "xyz"

on RegisterViewer pViewer, pMessage, pController
  local tViewer

  put pViewer into tViewer
  -- up to this point tViewer is ok.
  send "AddListener" && pMessage & comma & tViewer to pController
end RegisterViewer

on AddListener pMessage, pViewer
  -- setting a breakpoint here shows that pViewer has the contents of
  field "abc"
  answer pViewer
end AddListener


try:

send "AddListener pMessage, pViewer" to pController


--
Trevor DeVore
Blue Mango Multimedia
[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: two questions: send and references

2005-09-20 Thread Mark Wieder
Klaus-

Tuesday, September 20, 2005, 10:17:54 AM, you wrote:

> you just won't believe it, but this will also work with other vars :-D

> ...
> put the long id of field "xyz" into it2
> send "hi it2" to field "abc" of card "argh"
> ...

I'd like to believe it, but no. It doesn't.

Maybe I should be more exact about what I'm trying to do.

MVC.RegisterViewer the long id of field "abc", "HelpMe", the long id
of button "xyz"

on RegisterViewer pViewer, pMessage, pController
  local tViewer
  
  put pViewer into tViewer
  -- up to this point tViewer is ok.
  send "AddListener" && pMessage & comma & tViewer to pController
end RegisterViewer

on AddListener pMessage, pViewer
  -- setting a breakpoint here shows that pViewer has the contents of
  field "abc"
  answer pViewer
end AddListener


-- 
-Mark Wieder
 [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: two questions: send and references

2005-09-20 Thread Trevor DeVore

On Sep 20, 2005, at 10:24 AM, Trevor DeVore wrote:


Thanks for the sanity check. It's the "send" and "call" functions  
that
are messing things up again. I'm not using the stuff2 handler  
directly

but trying to use a virtual pointer to it and the "send" function
isn't passing the arrays. I forgot about BZ #1240.


Yep, no sending or calling arrays at all.  This is a bummer.


What you might be able to do is send the name of a custom prop that  
has the array in it.  Just set the values in that.  Not ideal but  
might solve the problem for now and it is easy enough to transfer  
arrays to and from custom props.



--
Trevor DeVore
Blue Mango Multimedia
[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: two questions: send and references

2005-09-20 Thread Trevor DeVore

On Sep 20, 2005, at 10:01 AM, Mark Wieder wrote:


Trevor-

Tuesday, September 20, 2005, 8:30:20 AM, you wrote:


Try stuffing the values you want to send into variables and then do
this:



get the long id of field "xyz"
send "hi it" to field "abc" of card "argh"


Thanks. Unfortunately, I need to pass two of these fully-qualified
identifiers at one pass. I'd need two separate "it" variables to do
this.


No problem.

put the long id of field "myfield" into tObj1
put the long id of field "myfield2" into tObj2

send "hi tObj1, tObj2" to field "abc" of card "argh"


What you have above will work.  The array is passed by reference all
the way down the line. In both cases you are passing the array by
reference.  I do this in libraries all of the time.


Thanks for the sanity check. It's the "send" and "call" functions that
are messing things up again. I'm not using the stuff2 handler directly
but trying to use a virtual pointer to it and the "send" function
isn't passing the arrays. I forgot about BZ #1240.


Yep, no sending or calling arrays at all.  This is a bummer.


--
Trevor DeVore
Blue Mango Multimedia
[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: two questions: send and references

2005-09-20 Thread Klaus Major

Hi Mark,


Trevor-
Tuesday, September 20, 2005, 8:30:20 AM, you wrote:

Try stuffing the values you want to send into variables and then do
this:

get the long id of field "xyz"
send "hi it" to field "abc" of card "argh"

Thanks. Unfortunately, I need to pass two of these fully-qualified
identifiers at one pass. I'd need two separate "it" variables to do
this.


you just won't believe it, but this will also work with other vars :-D

...
put the long id of field "xyz" into it2
send "hi it2" to field "abc" of card "argh"
...


...

--
-Mark Wieder
 [EMAIL PROTECTED]


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: two questions: send and references

2005-09-20 Thread Mark Smith

So

put the long id of fld "xyz" into id1
put the long id of fld "abc" into id2
send "hi id1,id2" to field "abc" of card "argh"

should work, no?

On 20 Sep 2005, at 18:01, Mark Wieder wrote:


Try stuffing the values you want to send into variables and then do
this:





get the long id of field "xyz"
send "hi it" to field "abc" of card "argh"



Thanks. Unfortunately, I need to pass two of these fully-qualified
identifiers at one pass. I'd need two separate "it" variables to do
this.



___
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: two questions: send and references

2005-09-20 Thread Mark Wieder
Trevor-

Tuesday, September 20, 2005, 8:30:20 AM, you wrote:

> Try stuffing the values you want to send into variables and then do
> this:

> get the long id of field "xyz"
> send "hi it" to field "abc" of card "argh"

Thanks. Unfortunately, I need to pass two of these fully-qualified
identifiers at one pass. I'd need two separate "it" variables to do
this.

> What you have above will work.  The array is passed by reference all
> the way down the line. In both cases you are passing the array by  
> reference.  I do this in libraries all of the time.

Thanks for the sanity check. It's the "send" and "call" functions that
are messing things up again. I'm not using the stuff2 handler directly
but trying to use a virtual pointer to it and the "send" function
isn't passing the arrays. I forgot about BZ #1240.

-- 
-Mark Wieder
 [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: two questions: send and references

2005-09-20 Thread Trevor DeVore

On Sep 20, 2005, at 8:23 AM, Mark Wieder wrote:


All-

I've run up against a couple of problems here:

1. I'm trying to pass parameters using the "send" command. The problem
is that "send" insists on interpreting these for me rather than
sending them verbatim. In other words, if I try

send "hi" && the long id of field "xyz" to field "abc" of card "argh"


Try stuffing the values you want to send into variables and then do  
this:


get the long id of field "xyz"
send "hi it" to field "abc" of card "argh"


2. I can pass a parameter by reference once. That is,

local someArray

on stuff @pArray, pIndex, pValue
  put pValue into pArray[pIndex]
end stuff

stuff someArray, tUserID, tPassword

works fine. But I need to pass a reference to someArray to another
handler down the line. Is there a syntax that will allow me to do
this? I need a second level of indirection and I can't figure out how
to do it. I don't think passing the entire array back and forth is
going to be an option. I miss pointers...

on stuff @pArray, pIndex, pValue
  stuff2 pArray, pIndex, pValue
end stuff

on stuff2 @pArray, pIndex, pValue
  put pValue into pArray[pIndex]
end stuff2

stuff2 someArray, tUserID, tPassword


What you have above will work.  The array is passed by reference all  
the way down the line. In both cases you are passing the array by  
reference.  I do this in libraries all of the time.



--
Trevor DeVore
Blue Mango Multimedia
[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


two questions: send and references

2005-09-20 Thread Mark Wieder
All-

I've run up against a couple of problems here:

1. I'm trying to pass parameters using the "send" command. The problem
is that "send" insists on interpreting these for me rather than
sending them verbatim. In other words, if I try

send "hi" && the long id of field "xyz" to field "abc" of card "argh"

What field "abc" of card "argh" receives is the *contents* of field
"xyz" rather than the long id. For my purpose I really need to send
the long id as a long id. Is there a way to coerce "send" into doing
what I tell it to do? Am I missing something simple here? Does someone
have an alternative way of doing this?

2. I can pass a parameter by reference once. That is,

local someArray

on stuff @pArray, pIndex, pValue
  put pValue into pArray[pIndex]
end stuff

stuff someArray, tUserID, tPassword

works fine. But I need to pass a reference to someArray to another
handler down the line. Is there a syntax that will allow me to do
this? I need a second level of indirection and I can't figure out how
to do it. I don't think passing the entire array back and forth is
going to be an option. I miss pointers...

on stuff @pArray, pIndex, pValue
  stuff2 pArray, pIndex, pValue
end stuff

on stuff2 @pArray, pIndex, pValue
  put pValue into pArray[pIndex]
end stuff2

stuff2 someArray, tUserID, tPassword

-- 
-Mark Wieder
 [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: two questions (was Re: Uh-oh.... Anybody following WWDC?)

2005-06-07 Thread Geoff Canyon


On Jun 7, 2005, at 2:26 AM, Klaus Major wrote:


Hi Geoff,



How about "hTni kidffrene!t"



is this Klingon?

:-D


It's Think different! after the big endian/little endian switch. It's  
amazing what seems funny at 1AM...






;-)

Now available on a variety of stuff at:

http://www.cafepress.com/inspiredlogic

(what the heck, I thought it was pretty clever)



Regards

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

___
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution



___
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: two questions (was Re: Uh-oh.... Anybody following WWDC?)

2005-06-07 Thread Richard Gaskin

Jesse Sng wrote:



We will be providing complete support for this transition.

Kind regards,
Kevin
 
Thanks. One thing is for sure, Rev will be the best way to go when it 
comes to bulletproofing your code against any processor architecture 
transitions.


One more reason to spend more time developing in Rev instead of using 
XCode.


I was watching the WWDC keynote webcast yesterday 
() and as Jobs was discussing different 
categories of porting difficulty he noted "scripts, Java -- they just 
work", and I thought to myself:  I feel sorry for everyone who isn't 
using Rev. :)


I guess that's my own personal bottom line on the whole Mactel thang: 
Steve Jobs doesn't ask me what's good for Fourth World when he makes his 
decisions.  When they work for me that's cool, and when they cost me 
extra money (and more than a few of his decisions have) he doesn't stay 
up late worrying about me.  He does what he feels is good for Apple, and 
if I still think Mac is a better value I'll keep buying.  I'm typing 
this on a PowerBook.


So I've learned from Jobs:  it's all about me.  I don't need to worry 
about his company; I have to trust he'll do what's best for Apple and if 
it goes well that's great, and if he winds up not selling a single 
Moto-powered Mac for a year it won't affect my company in any way.


As Rev developers, we're immune to the impact of OS vendor whims.  We're 
truly platform-independent: our customers aren't just Mac users, or 
Windows users, or Linux users; in the broader view they're anyone using 
a computer.


So will this be good or bad for Apple?  I don't know; I shot my crystal 
ball predicting this switch 7 years ago.


But taking a cue from Steve Jobs, the more relevant question for us is 
"Will it be good for me as a developer?"   And thanks to Rev, the answer 
is "It doesn't affect me."


--
 Richard Gaskin
 Fourth World Media Corporation
 __
 Rev tools and more: http://www.fourthworld.com/rev
___
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: two questions (was Re: Uh-oh.... Anybody following WWDC?)

2005-06-07 Thread Jesse Sng



We will be providing complete support for this transition.

Kind regards,

Kevin


Thanks. One thing is for sure, Rev will be the best way to go when it 
comes to bulletproofing your code against any processor architecture 
transitions.


One more reason to spend more time developing in Rev instead of using XCode.


Jesse
___
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: two questions (was Re: Uh-oh.... Anybody following WWDC?)

2005-06-07 Thread Klaus Major

Hi Geoff,


How about "hTni kidffrene!t"


is this Klingon?

:-D


;-)

Now available on a variety of stuff at:

http://www.cafepress.com/inspiredlogic

(what the heck, I thought it was pretty clever)


Regards

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

___
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: two questions (was Re: Uh-oh.... Anybody following WWDC?)

2005-06-07 Thread Geoff Canyon

How about "hTni kidffrene!t"

;-)

Now available on a variety of stuff at:

http://www.cafepress.com/inspiredlogic

(what the heck, I thought it was pretty clever)

On Jun 6, 2005, at 1:21 PM, Richard Gaskin wrote:


Mark Wieder wrote:


"Think different" is so last year.



This year it's "Think really different." :)


--
 Richard Gaskin
 Fourth World Media Corporation
 ___
 [EMAIL PROTECTED]   http://www.FourthWorld.com
___
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution



___
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: two questions (was Re: Uh-oh.... Anybody following WWDC?)

2005-06-07 Thread xbury . cs
on the same subject: only fools dont change their mind/opinion...

I've embraced Windows and given the trade-of between eye-candy and speed,
i'll take speed any day. On the GUI side, Moft has made lots of advances 
that 
no longuer make the Mac superior - actually, given the enterprise world in 
which
most computers are used, most of Mac's OS technologies usually come with a
severe problem of "over-simplicity" and the only real advantage i've seen 
Mac's
keep is applescripts - but given it's speed and awkward language, it 
wasn't hard
to give up... 

And now, i run my own MacOS/PC/XOS hybrid GUI on Rev anywhere I go... the 
less you
depend on a given technology, the better off you are in the long term and 
im quite
happy with my decision 5 years ago to switch to PCs.

As the TAO said: how easily will an inflexible branch break in the wind...

cheers
Xavier

On 06/06/2005 21:42:53 use-revolution-bounces wrote:
>Andre-
>
>Monday, June 6, 2005, 11:47:25 AM, you wrote:
>
>AG> man, I am both afraid and curious.
>
>Me, I'm secretly looking forward to hacking one of these things with
>an overclocked AMD CPU. Whee!
>
>"Think different" is so last year.


-
Visit us at http://www.clearstream.com
  
IMPORTANT MESSAGE

Internet communications are not secure and therefore Clearstream
International does not accept legal responsibility for the contents of
this message.

The information contained in this e-mail is confidential and may be
legally privileged. It is intended solely for the addressee. If you are
not the intended recipient, any disclosure, copying, distribution or
any action taken or omitted to be taken in reliance on it, is
prohibited and may be unlawful. Any views expressed in this e-mail are
those of the individual sender, except where the sender specifically
states them to be the views of Clearstream International or of any of
its affiliates or subsidiaries.

END OF DISCLAIMER
___
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: two questions (was Re: Uh-oh.... Anybody following WWDC?)

2005-06-06 Thread Dar Scott


On Jun 6, 2005, at 2:18 PM, Andre Garzia wrote:

We will be providing complete support for this transition.



I knew you guys would   
:D


I think we Revolutionaries are very fortunate.  Runrev has the 
experience and motivation for this.


We still need to script smart and watch our assumptions.

And gentle encouragement for RunRev is always good!  Or rioting.

Dar



--
**
DSC (Dar Scott Consulting & Dar's Lab)
http://www.swcp.com/dsc/
Programming and software
**


--
**
DSC (Dar Scott Consulting & Dar's Lab)
http://www.swcp.com/dsc/
Programming and software
**

___
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: two questions (was Re: Uh-oh.... Anybody following WWDC?)

2005-06-06 Thread Marty Billingsley
Richard Gaskin <[EMAIL PROTECTED]> writes:
>
> Mark Wieder wrote:
> > "Think different" is so last year.
>
> This year it's "Think really different." :)

Or perhaps, recalling the grammatical furor following that
advertising campaign, it should be "Think real different".

:-) :-)

 - marty

--
Marty Billingsley ([EMAIL PROTECTED])
The University of Chicago Laboratory Schools
___
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: two questions (was Re: Uh-oh.... Anybody following WWDC?)

2005-06-06 Thread Dan Shafer

Here, here!


On Jun 6, 2005, at 3:23 PM, Thomas McGrath III wrote:

Now with this little announcement I am now 100% sure I made the  
right choice and am very thankful that I made this switch. Thank you.




~~
Dan Shafer, Co-Chair
RevConWest '05
June 17-18, 2005, Monterey, California
http://www.altuit.com/webs/altuit/RevConWest

___
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: two questions (was Re: Uh-oh.... Anybody following WWDC?)

2005-06-06 Thread SimPLsol
Oddly enough, all of these new Xboxes, from MS, Sony, and Netindo, (which 
will be using the PowerPC) are supposed to run faster than 3 GHz (in the first 
version).
If I had seen a headline on a reputable newspaper that said: "Macs to use 
Intel, MS to use PPC" I would have figured it to be an April 1st edition.
Paul Looney
___
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: two questions (was Re: Uh-oh.... Anybody following WWDC?)

2005-06-06 Thread Thomas McGrath III

Kevin,

I remember using HC and then SC and waiting for Windows support and 
then Roadster and getting one lousy program to work in it. I was so 
disappointed. I stopped using it altogether and started to learn 
Director. (I should have learned Flash instead) I was again 
disappointed. I gave it up for it did not meet my needs.


Then when I stumbled into RunRev I hung around trying to see if that 
old negative feeling would come back. It didn't and it looked like this 
might work for me. I purchased a Enterprise License and created first 
one, then two, then three applications (all cross platform) all of 
which were successful for my employers and now I have been considering 
seriously creating my own applications in REV (the ones I gave up on in 
SC).


Now with this little announcement I am now 100% sure I made the right 
choice and am very thankful that I made this switch. Thank you.


Yours truly,

Tom

On Jun 6, 2005, at 4:08 PM, Kevin Miller wrote:


On 6/6/05 7:47 pm, "Andre Garzia" <[EMAIL PROTECTED]> wrote:


Second, how does it affects us developers? and how it affects RunRev?
Generation of code for MacOS X will have to be fat binary now, can two
versions of the engine co-exist in the same file? Will the port of
Revolution be easy?


We will be providing complete support for this transition.

Kind regards,

Kevin

Kevin Miller ~ [EMAIL PROTECTED] ~ http://www.runrev.com/
Runtime Revolution - User-Centric Development Tools

___
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution




Thomas J. McGrath III
SCS
1000 Killarney Dr.
Pittsburgh, PA 15234
412-885-8541

___
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: two questions (was Re: Uh-oh.... Anybody following WWDC?)

2005-06-06 Thread Jerry Daniels

IMO, PowerPC was running out of GHz.

Does it help to be different if all our apps run slowly?

-JD

On Jun 6, 2005, at 4:39 PM, [EMAIL PROTECTED] wrote:


"Think the same" just doesn't look good on a banner.
Paul Looney
___
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution



___
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: two questions (was Re: Uh-oh.... Anybody following WWDC?)

2005-06-06 Thread SimPLsol
"Think the same" just doesn't look good on a banner.
Paul Looney
___
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: two questions (was Re: Uh-oh.... Anybody following WWDC?)

2005-06-06 Thread Troy Rollins


On Jun 6, 2005, at 4:34 PM, Scott Rossi wrote:


This year it's "Think really different." :)


Or, "Think along with the rest of the world."


They are going to Intel processors. Not Windows.  ;-)

--
Troy
RPSystems, Ltd.
http://www.rpsystems.net

___
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: two questions (was Re: Uh-oh.... Anybody following WWDC?)

2005-06-06 Thread michael.rr
Just for general information:

If Revolution is written with Metrowerks then according to the keynote it is 
going to have to be re-written 
with Xcode.

Michael


> From: Kevin Miller <[EMAIL PROTECTED]>
> Date: June 6, 2005 3:08:52 PM CDT
> To: How to use Revolution 
> Subject: Re: two questions (was Re: Uh-oh Anybody following WWDC?)
> Reply-To: How to use Revolution 
>
> On 6/6/05 7:47 pm, "Andre Garzia" <[EMAIL PROTECTED]> wrote:
>
>> Second, how does it affects us developers? and how it affects RunRev?
>> Generation of code for MacOS X will have to be fat binary now, can two
>> versions of the engine co-exist in the same file? Will the port of
>> Revolution be easy?
>
> We will be providing complete support for this transition.
>
> Kind regards,
>
> Kevin
___
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: two questions (was Re: Uh-oh.... Anybody following WWDC?)

2005-06-06 Thread Scott Rossi
Recently, Richard Gaskin  wrote:

>> "Think different" is so last year.
> 
> This year it's "Think really different." :)

Or, "Think along with the rest of the world."


Regards,

Scott Rossi
Creative Director
Tactile Media, Multimedia & Design
-
E: [EMAIL PROTECTED]
W: http://www.tactilemedia.com

___
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: two questions (was Re: Uh-oh.... Anybody following WWDC?)

2005-06-06 Thread Andre Garzia


On Jun 6, 2005, at 5:21 PM, Richard Gaskin wrote:


Mark Wieder wrote:

"Think different" is so last year.


This year it's "Think really different." :)



what about "Thing Again"?




--
 Richard Gaskin
 Fourth World Media Corporation
 ___
 [EMAIL PROTECTED]   http://www.FourthWorld.com
___
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution



--
Andre Alves Garzia  2004
Soap Dog Studios - BRAZIL
http://studio.soapdog.org

___
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: two questions (was Re: Uh-oh.... Anybody following WWDC?)

2005-06-06 Thread Klaus Major

Hi all,


On Jun 6, 2005, at 5:08 PM, Kevin Miller wrote:

We will be providing complete support for this transition.

Kind regards,

Kevin


I knew you guys would
:D


Sure they will :-)


Andre

--
Andre Alves Garzia  2004
Soap Dog Studios - BRAZIL
http://studio.soapdog.org


BTW, anyone been to the RR website lately?
Nice things going on ;-)


Regards

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

___
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: two questions (was Re: Uh-oh.... Anybody following WWDC?)

2005-06-06 Thread Richard Gaskin

Mark Wieder wrote:

"Think different" is so last year.


This year it's "Think really different." :)


--
 Richard Gaskin
 Fourth World Media Corporation
 ___
 [EMAIL PROTECTED]   http://www.FourthWorld.com
___
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: two questions (was Re: Uh-oh.... Anybody following WWDC?)

2005-06-06 Thread Andre Garzia


On Jun 6, 2005, at 5:08 PM, Kevin Miller wrote:


We will be providing complete support for this transition.

Kind regards,

Kevin


I knew you guys would   
:D

Andre

--
Andre Alves Garzia  2004
Soap Dog Studios - BRAZIL
http://studio.soapdog.org

___
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: two questions (was Re: Uh-oh.... Anybody following WWDC?)

2005-06-06 Thread Kevin Miller
On 6/6/05 7:47 pm, "Andre Garzia" <[EMAIL PROTECTED]> wrote:

> Second, how does it affects us developers? and how it affects RunRev?
> Generation of code for MacOS X will have to be fat binary now, can two
> versions of the engine co-exist in the same file? Will the port of
> Revolution be easy?

We will be providing complete support for this transition.

Kind regards,

Kevin

Kevin Miller ~ [EMAIL PROTECTED] ~ http://www.runrev.com/
Runtime Revolution - User-Centric Development Tools

___
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: two questions (was Re: Uh-oh.... Anybody following WWDC?)

2005-06-06 Thread Mark Wieder
Andre-

Monday, June 6, 2005, 11:47:25 AM, you wrote:

AG> man, I am both afraid and curious.

Me, I'm secretly looking forward to hacking one of these things with
an overclocked AMD CPU. Whee!

"Think different" is so last year.

-- 
-Mark Wieder
 [EMAIL PROTECTED]


___
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: two questions (was Re: Uh-oh.... Anybody following WWDC?)

2005-06-06 Thread Dar Scott


On Jun 6, 2005, at 1:09 PM, Andre Garzia wrote:

Thanks for the tests Dar, that was not my major fear, what I really 
fear is that the sales of PPC machines will drop so much out of FUD 
that apple will have a hard time...


I think I am afraid of their profits sinking and things going all like 
armagedon...


Not to mention all the OS X fans, who, recently recommending OS X on G5 
to Mac and Windows friends, have left town.


I think you are right.  This is where the risk is.  This is hard for 
me.  When I recently looked at Windows and Linux and OS X servers, I 
recommended OS X.


However, there are some things we have little control over.  And some 
things we do.


Dar
--
**
DSC (Dar Scott Consulting & Dar's Lab)
http://www.swcp.com/dsc/
Let's talk about it at RevCon West!
**

___
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: two questions (was Re: Uh-oh.... Anybody following WWDC?)

2005-06-06 Thread Andre Garzia
Thanks for the tests Dar, that was not my major fear, what I really 
fear is that the sales of PPC machines will drop so much out of FUD 
that apple will have a hard time...


I think I am afraid of their profits sinking and things going all like 
armagedon...


andre


On Jun 6, 2005, at 4:03 PM, Dar Scott wrote:



On Jun 6, 2005, at 12:47 PM, Andre Garzia wrote:

and the thing about little endian and big endian? anyone assuming 
byte orders and stuff like that will be doomed to the hell of 
debugging.


We can stop making those assumptions right now.

Untested...

function platformIsBigEndian
   return (char 1 of binaryEncode("I",1)) is null
end platformIsBigEndian

Note that some processors, maybe not that Rev is on, use a "middle 
endian" mixed approach for 32-bit integers.


Presumably, this will match the unicode (UTF16) order used by 
Revolution, but if you are paranoid you can make a similar test using 
numTochar():


-- just keyed into the mail
-- This assume unicode is some form of UTF16
function unicodeIsUTF16BE
  set the useUnicode to true
  return (char 1 of numToChar(1)) is null
end unicodeIsUTF16BE

Dar

--
**
DSC (Dar Scott Consulting & Dar's Lab)
http://www.swcp.com/dsc/
Programming and software
**

___
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution



--
Andre Alves Garzia  2004
Soap Dog Studios - BRAZIL
http://studio.soapdog.org

___
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: two questions (was Re: Uh-oh.... Anybody following WWDC?)

2005-06-06 Thread Dar Scott


On Jun 6, 2005, at 12:47 PM, Andre Garzia wrote:

and the thing about little endian and big endian? anyone assuming byte 
orders and stuff like that will be doomed to the hell of debugging.


We can stop making those assumptions right now.

Untested...

function platformIsBigEndian
   return (char 1 of binaryEncode("I",1)) is null
end platformIsBigEndian

Note that some processors, maybe not that Rev is on, use a "middle 
endian" mixed approach for 32-bit integers.


Presumably, this will match the unicode (UTF16) order used by 
Revolution, but if you are paranoid you can make a similar test using 
numTochar():


-- just keyed into the mail
-- This assume unicode is some form of UTF16
function unicodeIsUTF16BE
  set the useUnicode to true
  return (char 1 of numToChar(1)) is null
end unicodeIsUTF16BE

Dar

--
**
DSC (Dar Scott Consulting & Dar's Lab)
http://www.swcp.com/dsc/
Programming and software
**

___
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution


two questions (was Re: Uh-oh.... Anybody following WWDC?)

2005-06-06 Thread Andre Garzia


First of all, where will our altivec and nice array number juggling go? 
and those extra registers? and the thing about little endian and big 
endian? anyone assuming byte orders and stuff like that will be doomed 
to the hell of debugging.


Second, how does it affects us developers? and how it affects RunRev? 
Generation of code for MacOS X will have to be fat binary now, can two 
versions of the engine co-exist in the same file? Will the port of 
Revolution be easy?


now, forgetting the hell freezes over tales, can this be a oportunity 
like a race for RunRev, I don't see many jumping the bandwaggon now. 
This could pose as a nice chance for RunRev to port Revolution fast to 
the new architecture and be one of the first easy to use development 
tool available on the new (... damn) platform. Since our code is engine 
based, as long as the engine runs, all our apps will run (... externals 
should need recompilation).


The XCode 2.1 is already available for those luck enough to be at WWDC, 
expect it to reach developers.apple.com soon.


man, I am both afraid and curious.

--
Andre Alves Garzia  2004
Soap Dog Studios - BRAZIL
http://studio.soapdog.org

___
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Two questions: Drawing Normal Curve and setting start & end

2004-11-24 Thread Michael J. Lew
At 12:00 PM -0500 24/11/04, Ruben wrote:
I think this is getting close to what I want to do, but where do I 
find this DistHistoBox graphic? Is it built in? ...what am I missing 
here?
It's just a graphic. Choose the Rectangle tool (you may need to click 
the Show Paint & Draw Tools disclosure triangle on the tool palette 
to see it) and draw a box. Make its name "DistHistoBox" to match its 
name in my script. You will also nee to make a graphic (a line, 
anywhere initially) called "DistHistoLine".

To make my script work you need to make one button called "Plot 
Histo" and put the MouseUp handler and StandardNormalPDF function 
into it (the function could alternatively be at a higher level in the 
message path, say in the card or stack script). You need a graphic 
(rectangular for convenience) called "DistHistoBox" for the plot to 
be put into, and a graphic (any type, but I used a line) called 
"DistHistoLine" to become the curve. Make sure the histo box is 
behind the histo line, or that it is not opaque. Put a text box at 
either end of the histo box to hold the scale extreme values and call 
them "DistMin" and "DistMax" as appropriate. You then need two 
scrollbars called "mean" and "stdev". Make sure the stdev scrollbar 
is not set to zero!

You have to name the objects correctly only because I referred to 
those names in the scripts.

I could send you a stack if you need it, but it would probably be 
better if you reconstructed it yourself...

When you say insert a graph, would that be a pre-drawn graph of a 
curve I put in? Sorry if these questions sound too basic.
I'm not sure about this question, although I would say that nothing 
is too basic if you need to ask it. Are you referring to a comment in 
someone else's response? Perhaps you could include in your posts some 
judiciously chosen quoted snippets from the previous posts.

Regards
--
Michael J. Lew
Senior Lecturer
Department of Pharmacology
The University of Melbourne
Parkville 3010
Victoria
Australia
Phone +613 8344 8304
**
New email address: [EMAIL PROTECTED]
**
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


answered! Two questions: Drawing Normal Curve and setting start & end

2004-11-24 Thread Salinas, Ruben (GE Healthcare)
Never mind my questions...I got it to work. That was brilliant! Thank you 
Michael!

___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Two questions: Drawing Normal Curve and setting start & end

2004-11-24 Thread Salinas, Ruben (GE Healthcare)
I think this is getting close to what I want to do, but where do I find this 
DistHistoBox graphic? Is it built in? ...what am I missing here? 

When you say insert a graph, would that be a pre-drawn graph of a curve I put 
in? Sorry if these questions sound too basic.

___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Two questions: Drawing Normal Curve and setting start & end values on a slider

2004-11-23 Thread Frank D. Engel, Jr.
Look at the 'points' property of a graphic object.
On Nov 22, 2004, at 11:10 PM, Salinas, Ruben (GE Healthcare) wrote:
I would like to draw a normal curve based on some normal stats 
provided by a user.

One method I have thought of is adapting the start and end values on a 
slider to a value (say +/- 3 sigma) and then the thumbstick to the 
mean...that would give me the values on a pre-drawn curve...

But can I actively dra a new curve every time normal stats are entered 
(mean and std dev)?

Thanks in advance.
Ruben
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution

---
Frank D. Engel, Jr.  <[EMAIL PROTECTED]>
$ ln -s /usr/share/kjvbible /usr/manual
$ true | cat /usr/manual | grep "John 3:16"
John 3:16 For God so loved the world, that he gave his only begotten 
Son, that whosoever believeth in him should not perish, but have 
everlasting life.
$


___
$0 Web Hosting with up to 120MB web space, 1000 MB Transfer
10 Personalized POP and Web E-mail Accounts, and much more.
Signup at www.doteasy.com
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Two questions: Drawing Normal Curve and setting start & end values on a slider

2004-11-22 Thread Michael J. Lew
This should get you going:
You need a graphic called "DistHistoBox", a text field at either end 
of its base, "distMin" and "distMax" to hold the scale values and two 
scrollbars, "mean" and "stdev". Put the following script into a 
button and that should do it.

on mouseUp
  put the thumbposition of scrollbar "mean" into tmean
  put the thumbposition of scrollbar "stdev" into tstdev
put standardNormalPDF() into myPoints
  set the points of graphic "DistHistoLine" to myPoints
  set the rect of graphic "DistHistoLine" to the rect of graphic "DistHistoBox"
  put tmean-3*tstdev into fld "DistMin"
  put tmean +3*tstdev into fld "DistMax"
end mouseUp
function StandardNormalPDF
  put 1/(1*sqrt(2*pi)) into bit1
  --1/(sigma*sqrt(2*pi)) if it wasn't the *standard* normal PDF
  repeat with xhundred=-300 to 300 --600 points, more than enough
put xhundred/100 into x
put exp((-1/2)*((x)/1)^2) into bit2
--exp((-1/2)*((x-mu)/sigma)^2) if it wasn't the *standard* normal PDF
put xhundred &"," & round(-600*bit1*bit2) & return after PDFpoints
--multiplied by -600 to avoid loss of data due to
--the rounding (needed to make valid points)
--and to turn the curve up the right way
  end repeat
  return PDFpoints
end StandardNormalPDF
The whole thing runs fast enough that you could make it refresh as 
the scrollbar values are changed:

on scrollbarDrag
  send mouseUp to btn "Plot Dist"
end scrollbarDrag
Hope that helps.
At 11:10 PM -0500 22/11/04, Ruben Silenas wrote:
I would like to draw a normal curve based on some normal stats 
provided by a user.

One method I have thought of is adapting the start and end values on 
a slider to a value (say +/- 3 sigma) and then the thumbstick to the 
mean...that would give me the values on a pre-drawn curve...

But can I actively dra a new curve every time normal stats are 
entered (mean and std dev)?

Thanks in advance.
Ruben
--
Michael J. Lew
Senior Lecturer
Department of Pharmacology
The University of Melbourne
Parkville 3010
Victoria
Australia
Phone +613 8344 8304
**
New email address: [EMAIL PROTECTED]
**
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Two questions: Drawing Normal Curve and setting start & end values on a slider

2004-11-22 Thread Salinas, Ruben (GE Healthcare)
I would like to draw a normal curve based on some normal stats provided by a 
user.

One method I have thought of is adapting the start and end values on a slider 
to a value (say +/- 3 sigma) and then the thumbstick to the mean...that would 
give me the values on a pre-drawn curve... 

But can I actively dra a new curve every time normal stats are entered (mean 
and std dev)?

Thanks in advance.

Ruben
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: two questions about images

2004-02-10 Thread Sarah Reichelt
On 11 Feb 2004, at 6:13 am, Andrew wrote:

Hi everyone.  I have a couple of questions about images.  When 
importing an image ("as control"), how do you make sure that it goes 
to the data-bank place (what is that called?) so it can be accessed 
from every card, rather than just being imported to one card.
If I have a project that requires a lot of images, I make a sub-stack 
that stores them all. I "start using" the images stack and then can 
refer to any of the images by their ID numbers. However you can also 
just import them into any card of your main stack and then any object 
can reference then by ID number. It doesn't matter whether they are on 
the same card or not.

Cheers,
Sarah
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: two questions about images

2004-02-10 Thread Scott Rossi
Recently, "Andrew"  wrote:

> Hi everyone.  I have a couple of questions about images.  When
> importing an image ("as control"), how do you make sure that it goes to
> the data-bank place (what is that called?) so it can be accessed from
> every card, rather than just being imported to one card.

Group the image (yes, you can have a group of 1 object) and set its
backgroundBehavior (Behave like a background) to true.  Any new cards
created after this point will automatically have the grouped image applied.
To add the grouped image to existing cards that don't already have the image
present, go to each of these cards and select "Place Group > xyz" from the
Object menu.


> Also, say I have one image and another image on top of it.  The top
> image is a non-square image, like a person.  However, when imported,
> there is white all around the person to fill out the square, and you
> can tell since it's sitting on top of the back image.  How do I tell
> Revolution that I want the white part to be transparent?

The best way is to create your transparency in whatever paint editor you
have.  GIF and PNG are the two image formats that Rev supports with
transparency.

Regards,

Scott Rossi
Creative Director
Tactile Media, Multimedia & Design
-
E: [EMAIL PROTECTED]
W: http://www.tactilemedia.com

___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


two questions about images

2004-02-10 Thread Andrew
Hi everyone.  I have a couple of questions about images.  When 
importing an image ("as control"), how do you make sure that it goes to 
the data-bank place (what is that called?) so it can be accessed from 
every card, rather than just being imported to one card.

Also, say I have one image and another image on top of it.  The top 
image is a non-square image, like a person.  However, when imported, 
there is white all around the person to fill out the square, and you 
can tell since it's sitting on top of the back image.  How do I tell 
Revolution that I want the white part to be transparent?

Thanks so much!

___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Two Questions on Database Query Builder

2004-01-12 Thread Andre Garzia
On Jan 12, 2004, at 8:40 AM, Jan Schenkel wrote:

Have you tried ?  *grin*
Just tried it here, and it seems to work just fine,
allowing you to fetch fields from both tables when you
link fields to the query.
	Cheers, and thanks in advance.

Andre Alves Garzia à 2003 à BRAZIL
http://www.soapdog.org
Hope this helped,

Jan Schenkel.
	Jan,

Thanks for your help!

On trying it, yes I tried but there was a problem since both tables 
used the same field names so MySQL shouted that the query was ambigous, 
that was fixed, it was a problem with MySQL, SQL Query and me, nothing 
to do with revolution, but I was slow to understand.

Thanks Again
Cheers
Andre



Andre Garzia ï 2003
imac2 ibook p100 e uma torradeira
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Two Questions on Database Query Builder

2004-01-12 Thread Jan Schenkel
--- Andre Garzia <[EMAIL PROTECTED]> wrote:
>   Hi Folks,
> 
> 
>   Is there a way to change connections parameters
> (server, user, pass) 
> at run time? 

See the following answers from last month's list
archives :



> And what about SQL joins, if I try to
> use something like 
> "SELECT * FROM names, projects WHERE
> projects.manager = names.id" will 
> it work in the Database Query Builder, like being
> able to set control 
> for columns of both tables?
> 

Have you tried ?  *grin*
Just tried it here, and it seems to work just fine,
allowing you to fetch fields from both tables when you
link fields to the query.

>   Cheers, and thanks in advance.
> 
> Andre Alves Garzia ð 2003 ð BRAZIL
> http://www.soapdog.org
> 

Hope this helped,

Jan Schenkel.

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

__
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Two Questions on Database Query Builder

2004-01-11 Thread Andre Garzia
	Hi Folks,

	Is there a way to change connections parameters (server, user, pass) 
at run time? And what about SQL joins, if I try to use something like 
"SELECT * FROM names, projects WHERE projects.manager = names.id" will 
it work in the Database Query Builder, like being able to set control 
for columns of both tables?

	Cheers, and thanks in advance.

Andre Alves Garzia  2003  BRAZIL
http://www.soapdog.org
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Two questions

2003-11-11 Thread Thomas J McGrath III
Thanks to Ken and Richard for a well needed push.

I have only been using REV for four weeks now and have built two 
interactive applications. One is for distribution on a CD and has 
hundreds of graphics and built in search features etc.

But 'Time takes Time' so I still need to study this wonderful tool and 
get up to date.
So, not being lazy :-) I am committed to studying the docs. I was 
hoping for the printed version as I find studying much easier with 
paper products. I spend enough time in front of an LCD as it is.

So consider me pushed in the right direction. I do love exploring new 
things.

Thanks,
Tom
On Nov 11, 2003, at 3:05 PM, Ken Norris wrote:

Hi Tom,

Date: Tue, 11 Nov 2003 07:55:23 -0500
From: Thomas J McGrath III <[EMAIL PROTECTED]>
Subject: Re: Two questions

Are you guys sure that 'send in' will actually work without taxing
the various systems and processors? Cause if I start using it, you 
know
I will break it. ;-)
--
Checkout the Transcript Cookbook in the docs. The first two scripts (99
Bottles of Beer) are supposed to demo the difference between using a 
repeat
structure and a send-in-time structure. Set up a couple of windows and 
make
the comparison.

See for yourself if you think it will work for you.

Ken N.

___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution

Thomas J McGrath III
Advanced Media Group
220 Drake Rd.
Bethel Park, PA 15102
[EMAIL PROTECTED]
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Two questions

2003-11-11 Thread Ken Norris
Hi Tom,

> Date: Tue, 11 Nov 2003 07:55:23 -0500
> From: Thomas J McGrath III <[EMAIL PROTECTED]>
> Subject: Re: Two questions

> Are you guys sure that 'send in' will actually work without taxing
> the various systems and processors? Cause if I start using it, you know
> I will break it. ;-)
--
Checkout the Transcript Cookbook in the docs. The first two scripts (99
Bottles of Beer) are supposed to demo the difference between using a repeat
structure and a send-in-time structure. Set up a couple of windows and make
the comparison.

See for yourself if you think it will work for you.

Ken N.

___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Two questions

2003-11-11 Thread Richard Gaskin
Thomas J McGrath III wrote:

> I am not used to the send in (time) structure. So, you and Richard are
> suggesting it and it does not use up processor time???
> I remember 'too much recursion' in SC and as such have stayed away from
> complex time loops etc.
> :-) Are you guys sure that 'send in' will actually work without taxing
> the various systems and processors? Cause if I start using it, you know
> I will break it. ;-)

The "send  in " construct isn't using a loop but rather a timer
mechanism similar to Mark Lucas' timer externals for SC.  While there is
some modest overhead internally for keeping track of pending messages it's
happening in highly-optimized compiled C++ code so it's baely measurable at
all.

The bigger processing hit is the time it takes to receive and process a
pending message.  With any such polling mechanism most of the time you will
not do anything, so taking as little time as possible for doing nothing is
critical.

With Rev, testing a "send" command and an "if" statement takes about 0.037
MILLIseconds on my old 500MHz G4.  On my 1.3GHz Celeron it takes takes even
less.

Here's the script I posted that I used to measure the overhead:

on mouseUp
   global gSaveScreenRect
   put the screenRect into gSaveScreenRect
   put 1 into n
   put the millisecs into t
   --
   repeat n
  send "checkResolution" to me
   end repeat
   --
   put (the millisecs - t ) / n
end mouseUp

on checkResolution
   global gSaveScreenRect
   if the screenrect<> gSaveScreenRect then
  answer "it changed"
   end if
end checkResolution


There are a few limitations Transcript imposes that are different from other
xTalks, such as not being able to overload bult-in commands.  But as you'll
find if you do more benchmarking, such modest sacrifices pay big dividends
in streamlining script execution (when was the last time you read a post
here about a need to overload a built-in command?).

Another big advantage is Transcript's pre-compilation.  Scripts processing
takes two passes:  one to convert the scripting language into efficient
bytecode, and a second to execute the bytecode.  In most xTalks scripts have
no processing done until execution.  But in Transcript (and ToolBook too)
scripts are tokenized into bytecode when the script editor is closed or when
an object is loaded into the message path, so the hardest work is done in
advance of execution.

Moreover, the form of bytecode Transcript uses is said to be more
efficiently structured than even Java's, making execution even faster.

And of course with a 4GL most of the code being executed is highly-optimized
C++, with the scripts being merely glue between these compiled routines.

The net result of these interpreter design elements is a very-high-level
language that in many cases rivals, and sometimes outperforms, lower-level
languages.

And when you add in ultra-effecient language extensions like "repeat for
each" things only get faster.

-- 
 Richard Gaskin 
 Fourth World Media Corporation
 ___
 [EMAIL PROTECTED]   http://www.FourthWorld.com
 Tel: 323-225-3717   AIM: FourthWorldInc

___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Two questions

2003-11-11 Thread Thomas J McGrath III
OK Ken,
I am not used to the send in (time) structure. So, you and Richard are 
suggesting it and it does not use up processor time???
I remember 'too much recursion' in SC and as such have stayed away from 
complex time loops etc.
:-) Are you guys sure that 'send in' will actually work without taxing 
the various systems and processors? Cause if I start using it, you know 
I will break it. ;-)

Thanks again,

P.S. send me a screenshot or sample stack for that graphic problem you 
have.

Tom

On Nov 11, 2003, at 12:16 AM, Ken Norris wrote:

Hi Tom,

Date: Mon, 10 Nov 2003 17:35:37 -0500
From: Thomas J McGrath III <[EMAIL PROTECTED]>
Subject: Re: Two questions

Again, Jason's answer will fix it if they quit out and restart my app.
But I was hoping for a good way to check during runtime and not when
reopening my app after the end user screws it up. Once screwed up it
does not go back with out Jason's solution. and in my opinion that
would be a bug.
--
I see your point, i.e., you think the engine should dynamically detect 
a
screen res change and adjust the geometry during runtime. I like it, 
and it
would certainly be an improvement. In fairness, though, even some 
fairly
modern games I have won't do that while they're running. Their 
solution is
to simply block access to such things while running, i.e., you can't 
change
screen res unless you pause the game (or Quit) and go do it. When it 
resumes
it checks such things and adjusts the geometry at that time.

In the meantime, Richard's suggestion of implementing a "send in 
(time)"
structure seems a good solution. That's what it's for, so that such 
things
can happen with no significant taxing of the processor, such that
performance isn't affected. That structure is a boon to this type of
hyper-level dev tool, because it allows a unique modicum of
behind-the-scenes multitasking. It allows us to do some things which 
were
previously impossible in this venue.

HTH,
Ken N.
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution

Thomas J McGrath III
Advanced Media Group
220 Drake Rd.
Bethel Park, PA 15102
[EMAIL PROTECTED]
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Two questions

2003-11-10 Thread Ken Norris
Hi Tom,

> Date: Mon, 10 Nov 2003 17:35:37 -0500
> From: Thomas J McGrath III <[EMAIL PROTECTED]>
> Subject: Re: Two questions

> Again, Jason's answer will fix it if they quit out and restart my app.
> But I was hoping for a good way to check during runtime and not when
> reopening my app after the end user screws it up. Once screwed up it
> does not go back with out Jason's solution. and in my opinion that
> would be a bug.
--
I see your point, i.e., you think the engine should dynamically detect a
screen res change and adjust the geometry during runtime. I like it, and it
would certainly be an improvement. In fairness, though, even some fairly
modern games I have won't do that while they're running. Their solution is
to simply block access to such things while running, i.e., you can't change
screen res unless you pause the game (or Quit) and go do it. When it resumes
it checks such things and adjusts the geometry at that time.

In the meantime, Richard's suggestion of implementing a "send in (time)"
structure seems a good solution. That's what it's for, so that such things
can happen with no significant taxing of the processor, such that
performance isn't affected. That structure is a boon to this type of
hyper-level dev tool, because it allows a unique modicum of
behind-the-scenes multitasking. It allows us to do some things which were
previously impossible in this venue.

HTH,
Ken N. 

___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Two questions

2003-11-10 Thread Thomas J McGrath III
Dan,

Is resume sent when just accessing a menubar item? If so this is the 
magic cure I was looking for. If not it would certainly work for an app 
with no menuBar at least.

I love this list.

Tom

On Nov 10, 2003, at 7:58 PM, Dan Friedman wrote:

Tom,

Here's a thought... If the user is going to change resolutions while 
your
program is running, then unless they change the resolution from the 
menubar,
they will have to leave the application.  You could create a
checkForResChange() function in a resume message.

Just a thought...

-Dan


Dan,

I always assume that a user will do what ever I don't want them to do
and as such if this 'problem' is not corrected then I will definitely
put a clause like this in my ReadMe also. 99.9 will never do it but
that .1 is still my concern as a software developer.
Thanks.
Tom
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution

Thomas J McGrath III
Advanced Media Group
220 Drake Rd.
Bethel Park, PA 15102
[EMAIL PROTECTED]
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Two questions

2003-11-10 Thread Dan Friedman
Tom,

Here's a thought... If the user is going to change resolutions while your
program is running, then unless they change the resolution from the menubar,
they will have to leave the application.  You could create a
checkForResChange() function in a resume message.

Just a thought...

-Dan


> Dan,
> 
> I always assume that a user will do what ever I don't want them to do
> and as such if this 'problem' is not corrected then I will definitely
> put a clause like this in my ReadMe also. 99.9 will never do it but
> that .1 is still my concern as a software developer.
> 
> Thanks.
> Tom

___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Two questions

2003-11-10 Thread Thomas J McGrath III
Dan,

I always assume that a user will do what ever I don't want them to do 
and as such if this 'problem' is not corrected then I will definitely 
put a clause like this in my ReadMe also. 99.9 will never do it but 
that .1 is still my concern as a software developer.

Thanks.
Tom
On Monday, November 10, 2003, at 05:47 PM, Dan Friedman wrote:
I just put in my User Guide: "If you change your screen's resolution, 
you
will need to restart the application."  -- problem solved.

Of course, 99.9% of my users (like most everyone's users) didn't know 
you
could change the resolution!!

Just a thought,
-Dan



Jacqueline,

OK, but "the end user CAN adjust the window" in this case by changing
the screen size and it WILL mess up the graphics in the app window so 
I
do understand what you are saying but it is not FOOL proof - that 
being
the problem, there will be someone(maybe a fool) who will change the
size and it will screw up my app.
Again, Jason's answer will fix it if they quit out and restart my app.
But I was hoping for a good way to check during runtime and not when
reopening my app after the end user screws it up. Once screwed up it
does not go back with out Jason's solution. and in my opinion that
would be a bug.

FWIW
Tom
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution

Thomas J McGrath III
Advanced Media Group
220 Drake Rd.
Bethel Park, PA 15102
[EMAIL PROTECTED]
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Two questions

2003-11-10 Thread Dan Friedman
I just put in my User Guide: "If you change your screen's resolution, you
will need to restart the application."  -- problem solved.

Of course, 99.9% of my users (like most everyone's users) didn't know you
could change the resolution!!


Just a thought,
-Dan




> Jacqueline,
> 
> OK, but "the end user CAN adjust the window" in this case by changing
> the screen size and it WILL mess up the graphics in the app window so I
> do understand what you are saying but it is not FOOL proof - that being
> the problem, there will be someone(maybe a fool) who will change the
> size and it will screw up my app.
> Again, Jason's answer will fix it if they quit out and restart my app.
> But I was hoping for a good way to check during runtime and not when
> reopening my app after the end user screws it up. Once screwed up it
> does not go back with out Jason's solution. and in my opinion that
> would be a bug.
> 
> FWIW
> Tom

___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Two questions

2003-11-10 Thread Thomas J McGrath III
Thanks Richard,

I remember you from HC and SC way back in SC 1.0 I used to develop a 
lot of apps back then. REV has opened the creative vain again for me 
and I was very pleased to see you here and supporting REV.

Thanks again,

Tom

On Monday, November 10, 2003, at 05:23 PM, Richard Gaskin wrote:

Thomas J McGrath III wrote:

I haven't used Bugzilla before. Could you point me in the right
direction.
Clicking, the path is:
Front page->Developer Central->File a Bug Report
The URL is:

It only takes a moment to set up a password, and while the UI is 
daunting at
first just read it carefully and next time you post there it'll be 
second
nature.

--
 Richard Gaskin
 Fourth World Media Corporation
 Developer of WebMerge: Publish any database on any Web site
 ___
 [EMAIL PROTECTED]   http://www.FourthWorld.com
 Tel: 323-225-3717   AIM: FourthWorldInc
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution

Thomas J McGrath III
Advanced Media Group
220 Drake Rd.
Bethel Park, PA 15102
[EMAIL PROTECTED]
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Two questions

2003-11-10 Thread Thomas J McGrath III
Jacqueline,

OK, but "the end user CAN adjust the window" in this case by changing 
the screen size and it WILL mess up the graphics in the app window so I 
do understand what you are saying but it is not FOOL proof - that being 
the problem, there will be someone(maybe a fool) who will change the 
size and it will screw up my app.
Again, Jason's answer will fix it if they quit out and restart my app. 
But I was hoping for a good way to check during runtime and not when 
reopening my app after the end user screws it up. Once screwed up it 
does not go back with out Jason's solution. and in my opinion that 
would be a bug.

FWIW
Tom
On Monday, November 10, 2003, at 05:11 PM, J. Landman Gay wrote:

On 11/10/03 3:32 PM, Thomas J McGrath III wrote:

But, I still think it is a BUG because if I say no resize and REV is 
supposed to ignore it when the user resizes then WHY is it resizing 
when I change the res/size of the screen?
It isn't a bug,

 "Resize" simply refers to whether or not the end user can adjust the 
window.
--
Jacqueline Landman Gay | [EMAIL PROTECTED]
HyperActive Software   | http://www.hyperactivesw.com
Thomas J McGrath III
Advanced Media Group
220 Drake Rd.
Bethel Park, PA 15102
[EMAIL PROTECTED]
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Two questions

2003-11-10 Thread Thomas J McGrath III
OK, KEN,

but isn't that at least a part of the reason for geometry etc. (to 
change things on screen when things have been changed - i.e. one way of 
things changing is by changing the screen size , right?)

But I regress,

Let me know what you find Ken and what you think.

Thanks

Tom

PS I have a possible project that you might be interested in. Offlist 
of course.

t

On Monday, November 10, 2003, at 05:08 PM, Ken Norris wrote:

Hi Tom,

Date: Mon, 10 Nov 2003 16:32:40 -0500
From: Thomas J McGrath III <[EMAIL PROTECTED]>
Subject: Re: Two questions

SO my answer is that a resolutionChanged is what is needed and I can
think of many games and software that offer resolution changing as an
option and things get changed once the res is changed
--
I'll check some more, but it doesn't look like hardly any of my Mac 
apps
have the ability to account for screen res changes on the fly, i.e., 
during
runtime.

Just FYI...

Ken N.

___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution

Thomas J McGrath III
Advanced Media Group
220 Drake Rd.
Bethel Park, PA 15102
[EMAIL PROTECTED]
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Two questions

2003-11-10 Thread Richard Gaskin
Thomas J McGrath III wrote:

> But, I still think it is a BUG because if I say no resize and REV is
> supposed to ignore it when the user resizes then WHY is it resizing
> when I change the res/size of the screen?
> 
> SO my answer is that a resolutionChanged is what is needed and I can
> think of many games and software that offer resolution changing as an
> option and things get changed once the res is changed.

I agree it's useful.  It gets classified asan enhancement requst only
because it's new.  It would be a bug if it were an existing behavior that
didn't work as described.

H maybe that it resizes should be a bug.  What do the rest of you
think about that?  Should fixed-size windows neveresize regardless if
they're larger than the resolution allows?

-- 
 Richard Gaskin 
 Fourth World Media Corporation
 Developer of WebMerge: Publish any database on any Web site
 ___
 [EMAIL PROTECTED]   http://www.FourthWorld.com
 Tel: 323-225-3717   AIM: FourthWorldInc

___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Two questions

2003-11-10 Thread Richard Gaskin
Thomas J McGrath III wrote:

> I haven't used Bugzilla before. Could you point me in the right
> direction.

Clicking, the path is:
Front page->Developer Central->File a Bug Report

The URL is:


It only takes a moment to set up a password, and while the UI is daunting at
first just read it carefully and next time you post there it'll be second
nature.

-- 
 Richard Gaskin 
 Fourth World Media Corporation
 Developer of WebMerge: Publish any database on any Web site
 ___
 [EMAIL PROTECTED]   http://www.FourthWorld.com
 Tel: 323-225-3717   AIM: FourthWorldInc

___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Two questions

2003-11-10 Thread J. Landman Gay
On 11/10/03 3:32 PM, Thomas J McGrath III wrote:

But, I still think it is a BUG because if I say no resize and REV is 
supposed to ignore it when the user resizes then WHY is it resizing when 
I change the res/size of the screen?
It isn't a bug, just a misunderstanding of the meaning of "resize". 
There is a "resizable" property which, when set to false, removes the 
size box from the lower left corner of the window and disables the 
user's ability to drag the window out to a different size. It does not 
prevent a script from resizing the window, nor does it prevent the 
automatic engine behavior that changes the window to account for other 
screen elements such as the dock or the menu bar. "Resize" simply refers 
to whether or not the end user can adjust the window.

A while back, MetaCard users were happy to see the engine automatically 
account for screen elements. Before that was implemented, there was loud 
wailing and gnashing of teeth because a window could overlap the dock, 
and if the stack happened to position itself under the Macintosh menu 
bar, the user could not even drag the window out of the way at all. So 
developers requested automatic stack positioning so that we wouldn't 
have to worry that large stacks would suddenly become unreachable.

To overcome the automatic behavior, you'll need to calculate the correct 
stack size yourself and set it on preOpenStack. For most other stacks, 
not allowing the window to tuck itself under the Macintosh menu bar is 
the desired behavior.

--
Jacqueline Landman Gay | [EMAIL PROTECTED]
HyperActive Software   | http://www.hyperactivesw.com
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Two questions

2003-11-10 Thread Ken Norris
Hi Tom,

> Date: Mon, 10 Nov 2003 16:32:40 -0500
> From: Thomas J McGrath III <[EMAIL PROTECTED]>
> Subject: Re: Two questions

> SO my answer is that a resolutionChanged is what is needed and I can
> think of many games and software that offer resolution changing as an
> option and things get changed once the res is changed
--
I'll check some more, but it doesn't look like hardly any of my Mac apps
have the ability to account for screen res changes on the fly, i.e., during
runtime.

Just FYI...

Ken N.

___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Two questions, auto-scaling

2003-11-10 Thread Thomas J McGrath III
WHOAA,
Now this is a real reason to revamp the Geometry issue in REV for sure.
Thanks, I will look into this solution and apply it in a not so 
important stack.

Tom

On Monday, November 10, 2003, at 04:48 PM, Jim Hurley wrote:

What follows is a solution of desperation. I found that the best 
solution for me on the stack I am currently working on was to just let 
the user resize the window to fit his or her needs. It was easier than 
using RR built-in geometry utilities.

This requires scaling everything (all controls) when the stack is 
resized.

Fields are treated differently. When the fields are scaled, the text 
may not fit, so for these I scale the font size as well (unless there 
is a vertical scrollbar in which case I only scale the rect).

Caution: I hesitate to offer this. Use with care. It works for me but 
I have not tested it widely.

Jim

Place in the stack script:

local scaleX,scaleY

on resizeStack x,y, xold,yold
  lock screen
  repeat with i = 1 to the number of cards
go to card i
doResize x,y,xold,yold
  end repeat
  go to recent card
  unlock screen
end resizeStack
 on doResize x,y,xold,yold
  put x/xold into scaleX
  put y/yold into scaleY
  doScaling
  sizeFontToFit
end doResize
on doScaling
  repeat with i = 1 to the number of controls
put the name of control i into tControl
put the rect of  tControl into tRect
repeat with j =1 to 4
  multiply item j of tRect by item oneOrTwo(j) of (scaleX,scaleY)
end repeat
set the rect of tControl to tRect
  end repeat
end doScaling
function oneOrTwo k
  return 2 - (k mod 2)
end oneOrTwo
on sizeFontToFit
  repeat with n = 1 to the number of fields
if the vScrollbar of field n is true then next repeat
put the width of field n into tWidth
put the textFont of field n into tFont
put the fontsizes of tFont into tSizeList
repeat with i = 1 to the number of lines in tSizeList
  set the textsize of field n to line i of tSizeList
  if  the formattedwidth of field n > tWidth then exit repeat
end repeat
set the height of field n to the formattedheight of field n
  end repeat
end sizeFontToFit
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution

Thomas J McGrath III
Advanced Media Group
220 Drake Rd.
Bethel Park, PA 15102
[EMAIL PROTECTED]
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Two questions, auto-scaling

2003-11-10 Thread Jim Hurley
What follows is a solution of desperation. I found that the best 
solution for me on the stack I am currently working on was to just 
let the user resize the window to fit his or her needs. It was easier 
than using RR built-in geometry utilities.

This requires scaling everything (all controls) when the stack is resized.

Fields are treated differently. When the fields are scaled, the text 
may not fit, so for these I scale the font size as well (unless there 
is a vertical scrollbar in which case I only scale the rect).

Caution: I hesitate to offer this. Use with care. It works for me but 
I have not tested it widely.

Jim

Place in the stack script:

local scaleX,scaleY

on resizeStack x,y, xold,yold
  lock screen
  repeat with i = 1 to the number of cards
go to card i
doResize x,y,xold,yold
  end repeat
  go to recent card
  unlock screen
end resizeStack
 on doResize x,y,xold,yold
  put x/xold into scaleX
  put y/yold into scaleY
  doScaling
  sizeFontToFit
end doResize
on doScaling
  repeat with i = 1 to the number of controls
put the name of control i into tControl
put the rect of  tControl into tRect
repeat with j =1 to 4
  multiply item j of tRect by item oneOrTwo(j) of (scaleX,scaleY)
end repeat
set the rect of tControl to tRect
  end repeat
end doScaling
function oneOrTwo k
  return 2 - (k mod 2)
end oneOrTwo
on sizeFontToFit
  repeat with n = 1 to the number of fields
if the vScrollbar of field n is true then next repeat
put the width of field n into tWidth
put the textFont of field n into tFont
put the fontsizes of tFont into tSizeList
repeat with i = 1 to the number of lines in tSizeList
  set the textsize of field n to line i of tSizeList
  if  the formattedwidth of field n > tWidth then exit repeat
end repeat
set the height of field n to the formattedheight of field n
  end repeat
end sizeFontToFit
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Two questions

2003-11-10 Thread Thomas J McGrath III
Richard,

I haven't used Bugzilla before. Could you point me in the right 
direction.

Thanks
Tom
On Monday, November 10, 2003, at 04:17 PM, Richard Gaskin wrote:

Thomas J McGrath III wrote:

You see getting the screenRect is one thing but knowing when the
screenRect is changed is what I want. I would prefer not to run a loop
all of the time checking and waiting for the user to change it.
How often will your users change their resolution?

FWIW, spot-checking the behavior elsewhere I find that Outlook Express,
Mozilla, and even the 10.2.8 Finder do not account for resolution 
reduction
dynamically, and I suspect many other apps don't either.  At least 
you're in
good company. ;)

If there's a reason to believe customers of your app will be unusually 
prone
to adjusting their resolution during their session with your app (that 
rules
out most Win users since most of the ones I've supported have never 
seen
their Display control panel ), polling on one-second intervals 
should
cover what you need without a noticeable decrease in performance.

In fact, it turns out to be barely measureable: to respond to a 
message and
check the screenRect takes about 0.037ms on my old 500MHz G4 (testing 
script
copied below).

While you're at it, it might be useful to Bugzilla an enhancement 
request
for a new resolutionChanged message.

--
 Richard Gaskin
 Fourth World Media Corporation
 ___
 [EMAIL PROTECTED]   http://www.FourthWorld.com
 Tel: 323-225-3717   AIM: FourthWorldInc
on mouseUp
   global gSaveScreenRect
   put the screenRect into gSaveScreenRect
   put 1000 into n
   put the millisecs into t
   --
   repeat n
  send "checkResolution" to me
   end repeat
   --
   put (the millisecs - t ) / n
end mouseUp
on checkResolution
   global gSaveScreenRect
   if the screenrect<> gSaveScreenRect then
  answer "it changed"
   end if
end checkResolution
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution

Thomas J McGrath III
Advanced Media Group
220 Drake Rd.
Bethel Park, PA 15102
[EMAIL PROTECTED]
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Two questions

2003-11-10 Thread Thomas J McGrath III
Richard,
You hit the nail on the head. I didn't think they would change often 
but "If they changed" I would like to know about it, especially if my 
window would resize in a way I didn't want it to. And then all that 
after I put in every DON'T RESIZE I could think of. So if they did it 
just once it would screw up my window.

Jason's answer would work to reset it during start up but what about 
during usage "if it ever happened". I don't like the idea of a script 
running every millisecond or every second just to prevent a visual 
disaster if the user changes the screen res or size.

You hit it when you say it could be a feature request.

But, I still think it is a BUG because if I say no resize and REV is 
supposed to ignore it when the user resizes then WHY is it resizing 
when I change the res/size of the screen?

SO my answer is that a resolutionChanged is what is needed and I can 
think of many games and software that offer resolution changing as an 
option and things get changed once the res is changed.

Thank you so very much for your input.

TOm

On Monday, November 10, 2003, at 04:17 PM, Richard Gaskin wrote:

Thomas J McGrath III wrote:

You see getting the screenRect is one thing but knowing when the
screenRect is changed is what I want. I would prefer not to run a loop
all of the time checking and waiting for the user to change it.
How often will your users change their resolution?

FWIW, spot-checking the behavior elsewhere I find that Outlook Express,
Mozilla, and even the 10.2.8 Finder do not account for resolution 
reduction
dynamically, and I suspect many other apps don't either.  At least 
you're in
good company. ;)

If there's a reason to believe customers of your app will be unusually 
prone
to adjusting their resolution during their session with your app (that 
rules
out most Win users since most of the ones I've supported have never 
seen
their Display control panel ), polling on one-second intervals 
should
cover what you need without a noticeable decrease in performance.

In fact, it turns out to be barely measureable: to respond to a 
message and
check the screenRect takes about 0.037ms on my old 500MHz G4 (testing 
script
copied below).

While you're at it, it might be useful to Bugzilla an enhancement 
request
for a new resolutionChanged message.

--
 Richard Gaskin
 Fourth World Media Corporation
 ___
 [EMAIL PROTECTED]   http://www.FourthWorld.com
 Tel: 323-225-3717   AIM: FourthWorldInc
on mouseUp
   global gSaveScreenRect
   put the screenRect into gSaveScreenRect
   put 1000 into n
   put the millisecs into t
   --
   repeat n
  send "checkResolution" to me
   end repeat
   --
   put (the millisecs - t ) / n
end mouseUp
on checkResolution
   global gSaveScreenRect
   if the screenrect<> gSaveScreenRect then
  answer "it changed"
   end if
end checkResolution
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution

Thomas J McGrath III
Advanced Media Group
220 Drake Rd.
Bethel Park, PA 15102
[EMAIL PROTECTED]
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


  1   2   >