Re: Boxes, Grids, Snap to Objects

2002-02-19 Thread Klaus Major

Hi Ian,

 I don't like the grab command,  it seems to me program flow doesn't 
 stop,
 i.e.

 Grab me
 Beep

 Will beep immediately even though you're still dragging the thing 
 around the
 screen.  This means you'll need to use a mouseup handler to do the new
 location stuff instead.

 I find it much better to hide the cursor, and set loc of the object 
 needing
 dragging to the mouseloc,  this is done in a repeat while the mouse is
 down loop and lets me do clever things,  I can check if the mouseloc is
 within the bounds of another object, and if so hilite that object, etc.
 It's much more flexible.
 ...

maybe you missed some of the previous posts, where experts (!) are 
advising to
not poll the mouse-state.

It is far more efficient to use the mousemove function.

Like this one:


local ok_to_drag

on mousedown
   put true into ok_to_drag
end mousedown

##set flag...

on mouseup
   put false into ok_to_drag
en mouseup

##unset flag

on mousemove x,y
  ## this is the advantage of the mousemove funcion,
  ## the loch and locv of the mouse are being passed as
  ## parameters in this function...

  if ok_to_drag then

  ##... your stuff here...

   end if
end mousemove


Hope this helps...


Regards

Klaus Major
[EMAIL PROTECTED]

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



Drawing tools in standalone

2002-02-19 Thread JohnRule

I cannot seem to use the drawing tools in a stand-alone, and I am wondering 
if this is at all possible. Since the tool palette is really part of 
Revolution, maybe this is not intended to be functional in a user 
stand-alone? I am simply trying to draw some bargraphs from my script (which 
works fine in my stack while in the editor), but fails in my stand-alone at 
the point where it selects any tools.

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



Re: Opening Acrobat Files

2002-02-19 Thread Klaus Major

Hi Peter,

 I'm trying to get my Rev app to open Acrobat Reader on both Win and 
 Mac.  In both cases I want it to open Acrobat reader if it's not 
 already running, otherwise to use the currently running application 
 (default behaviour for Mac apps, but not for Win apps).  My questions 
 are:

 1) how do I open Acrobat Reader under Windows, only when necessary for 
 a given PDF file? If I query the registry and then use the launch 
 command, this will open a fresh copy of Acrobat Reader for every file I 
 try to open I think, instead of re-using any currently open copy of the 
 Reader!

Sorry, dunno...

But this has been on the list some time ago. you could find it in the 
archives...


 2) how do I get the path to Acrobat Reader on the Mac into a Rev 
 variable so I can use the launch command? (more generally, how do I 
 get results back from an AppleScript script?)

 I have been using the Externals Collection but I'm hitting a brick wall 
 with this, especially since it doesn't work under Mac OS X!  I'm trying 
 to find another way that avoids the need to use the Externals.

 Cheers

 Peter
 -- Peter Reid

Did you check the new (!) and free externals for Mac (AND OS X) on the 
RR website.

They do exactly what you are looking for... :-)


Regards

Klaus Major
[EMAIL PROTECTED]

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



Re: Opening Acrobat Files

2002-02-19 Thread Peter Reid

Hi Klaus

Thanks for the feedback.

1) how do I open Acrobat Reader under Windows, only when necessary 
for a given PDF file? If I query the registry and then use the 
launch command, this will open a fresh copy of Acrobat Reader for 
every file I try to open I think, instead of re-using any currently 
open copy of the Reader!

Sorry, dunno...

But this has been on the list some time ago. you could find it in 
the archives...

The list shows how to find the application but not how to open 
additional files within the currently running application!


2) how do I get the path to Acrobat Reader on the Mac into a Rev 
variable so I can use the launch command? (more generally, how do 
I get results back from an AppleScript script?)

Did you check the new (!) and free externals for Mac (AND OS X) on 
the RR website.

They do exactly what you are looking for... :-)

Well, yes and no!  The externals allow you to find the name of the 
application for use in a launch command but don't help with the 
problem of opening an additional PDF file once the Reader is open.

So, using the Externals for the Mac and querying the registry for 
Win, I now have the following situations.

With Windows:

a) launch PDF file with Acrobat Reader, with Reader currently NOT 
running - opens Reader and displays PDF file

b) launch PDF file with Acrobat Reader, with Reader currently running 
- opens fresh copy of Reader and displays PDF file - now have TWO 
copies of the Reader running!

With Mac:

a) launch PDF file with Acrobat Reader, with Reader currently NOT 
running - opens Reader and displays PDF file

b) launch PDF file with Acrobat Reader, with Reader currently running 
- nothing happens, it won't open a new Reader (which is good), but 
also won't open 2nd PDF file either (which is bad)!

The only solution I have is to kill any currently running Acrobat 
Reader and then allow a new one to open.  However this is not very 
neat, slow (the user has to wait for program launch each time) and 
doesn't allow the user to have more than one PDF file open at a time!

The old MetaCard Externals Collection worked just as I liked it for 
both Mac and Win, only opening the application if it wasn't already 
running, otherwise opening additional documents within the currently 
running application.

One other comment/question about the Externals - how do I include 
BOTH Mac OS Classic and Mac OS X versions of the external functions 
for building standalone programs?

Cheers

Peter
-- 
Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)870 052 7576
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.co.uk
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution



Wordwrapping formattedWidth/Height

2002-02-19 Thread Terry Vogelaar

This one is silly, but I still need to figure it out.

A field has wordwrapping on (dontWrap is off). The width is set to a certain
width. Then it is simple to get the formattedHeight.

But now the other way around. I need to know what the width of a field must
be to have a field with a certain height. Should I loop through every
possible width, see what the formattedHeight is and stop the loop when the
requested formattedHeight is found? Or is there a smarter way?

FormattedWidth doesn't help much here, because it depends on the real width
of the field.

Terry

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



Re: Drawing tools in standalone

2002-02-19 Thread Geoff Canyon

At 6:22 AM -0500 2/19/02, [EMAIL PROTECTED] wrote:
I cannot seem to use the drawing tools in a stand-alone, and I am wondering 
if this is at all possible. Since the tool palette is really part of 
Revolution, maybe this is not intended to be functional in a user 
stand-alone? I am simply trying to draw some bargraphs from my script (which 
works fine in my stack while in the editor), but fails in my stand-alone at 
the point where it selects any tools.

Have you considered using graphics (of style rectangle)? It would allow you to set 
the fill, linewidth, etc. very easily.

regards,

Geoff

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



Re: Detecting Network Running

2002-02-19 Thread Peter Reid

   I'm trying to figure out a method of checking whether the currently
  running standalone app developed in Rev is running from a local or
  network drive.  I want to be able to licence my software separately
   for local vs network use.
   Anyone got any suggestions for both Mac and Windows?

Not both, but one: on the Mac, you can use AppleScript to ask the Finder to
inspect the local volume attribute, eg
 tell application Finder
 get the local volume of disk Macintosh HD
 end tell

On Windows... no idea.

   Ben Rubinstein   |  Email: [EMAIL PROTECTED]

Thanks Ben - one down, only one to go!

Cheers

Peter
-- 
Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)870 052 7576
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.co.uk
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution



Re: Drawing tools in standalone

2002-02-19 Thread David Vaughan

John

Klaus has the way it should be done, with a palette, but Mike Mitchell 
(cowhead) today and myself on the 18th in response to Mike Brown 
published essentially identical scripts which allow you to choose any 
tool and then return to the browse tool when you wish. Our method is not 
best practice in that it polls the mouseLoc but at least it does so only 
twice a second (configurable in the Send) rather than continuously, and 
will thus do for a quick or one-off stack.

regards
David

On Tuesday, February 19, 2002, at 10:45 , Klaus Major wrote:

 Hi John,

 I cannot seem to use the drawing tools in a stand-alone, and I am 
 wondering
 if this is at all possible. Since the tool palette is really part of
 Revolution, maybe this is not intended to be functional in a user
 stand-alone? I am simply trying to draw some bargraphs from my script 
 (which
 works fine in my stack while in the editor), but fails in my 
 stand-alone at
 the point where it selects any tools.

 Thanks,
 JR

 yes, this is a bit tricky ;-)

 It is possible, but you have to consider this:

 It is only pssible to change the tool with the browse tool...

 ??? :-)

 The conclusion is to provide a stack that has the browse tool as a 
 default tool,
 no matter what tool is really selected.

 So your tools-stack HAS to be a palette or a modeless.

 It won't work without an extra tools-palette or modeless stack.

 I would prefer palette.
 (Do not forget to reset the tool when closing that palette ;-)
 on closestack
   choose browse tool
 end closestack

 Otherwise you are... ehmm.. lost...


 That's the secret ;-)

 Drop a line if you need furhter info...


 Regards from germany

 Klaus Major
 [EMAIL PROTECTED]

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


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



re: Drawing tools in standalone

2002-02-19 Thread JohnRule

  I cannot seem to use the drawing tools in a stand-alone...

 Have you considered using graphics (of style rectangle)? It would allow 
you to  set the fill, linewidth, etc. very easily.

 regards,

 Geoff


Good idea...definitely a 'Think Different solution!

;-)

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



Re: Drawing tools in standalone

2002-02-19 Thread Dominique Bodin

Hello,

Just a litle question about the Rev 1.1.1 update:
will it be free for the Rev 1.1 registred users ?

Dominique Bodin
[EMAIL PROTECTED]


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



Re: Will the script editing quirks be fixed?

2002-02-19 Thread David Vaughan

Ian

Puzzling.

I can replicate your problem only by positioning the cursor at the start 
of the second line (before the P in Put 2 into y in your example), 
in which case the behaviour is hardly surprising.

If I position the cursor at the end of the prior line, after the x and 
press return and on repeat (which looks like your example and is what 
I ordinarily do for any new line) then behaviour is perfectly normal, 
placing the closure statement on a line before the next existing line.

These seem reasonable behaviours, and since they happen about where you 
are typing I am a little surprised you do not notice it at the time. I 
am quite happy for the Rev people not to spend any time on this issue 
before finalising 1.1.1, which in beta form has proven more stable than 
the 1.1.0 release.

regards
David

On Wednesday, February 20, 2002, at 09:30 , Ian Summerfield wrote:

 Am I the only one suffering from the problem of the auto completion of
 things like on repeat putting the end repeat before another line:

 Put 1 into x
 Put 2 into y

 If I type on repeat between the two:

 Put 1 into x
 On repeat
 Put 2 into y

 Revolution puts in:

 Put 1 into x
 On repeat

 End repeatput2 into y


 It's lost me ages trouble shooting,  often I don't detect it did it, 
 it's
 worse when it's the end statement for a handler, I get:

 On newproc

 End newprocon nexthandler

 Which now means nextHandler fails to exist!

 I worried me to read 1.1.1 seems close to release,  I would have thought
 there are zillions of quirks like this to fix first!  Should we have a 
 few
 more beta's?  I keep telling myself all will be fixed when it goes 
 final so
 I should live with it.  Will it be much more stable?  I'm using the OS X
 release, really because it crashes too often and recovery is fast in X!

 -i-

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


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



Re: Boxes, Grids, Snap to Objects

2002-02-19 Thread David Vaughan

Roger

This is not comprehensive, in that I tackled only to the else 
statement, the drag, but I am sure you can have another go at move if 
need be.

I recognise also that you have not dealt with overlapping yet, but 
revise what you have in the light of comments and try to extend the 
approach. You are welcome back for more help of course.

Actual comments below.

regards
David

On Tuesday, February 19, 2002, at 11:06 , [EMAIL PROTECTED] 
wrote:


 Hi,

 My latest programming adventure requires the following:

  1 - A rectangle graphic that represents the boundery.  800 x 500
 pixels in size.

  2 - Several (3-8) smaller rectangles (or buttons) that must be 
 moved
 using the browse tool.  Various Sizes, but must snap to a grid or other
 objects.

  3 - The smaller rectangles should MOVE if clicked near the top left
 edge, but are not allowed outside the large rectangle.

  4 - The smaller rectangles can be RESIZED if clicked near the 
 bottom
 right, but are not allowed outside the large rectangle.

  5 - The smaller rectangles are not allowed to overlap each other.

 My script follows...  I have achieved some of the requirements, but I 
 would
 like some guidance from the experts (that's you).

 Thank you in advance for any suggestions.
 ~Roger Eller  [EMAIL PROTECTED]

 --

 on mouseDown
   set the cursor to plus
   set the numberFormat to 0.0
-- not sure why
   set the itemDelimiter to ,
-- It already is when you enter the script. Better to change it only 
when you need to.
   put the Width of me into WidthOfBox
   put the Height of me into HeightOfBox
-- You do not use these variables again, but they have a use...see below.

   -- Determine the section of me that was clicked
   if item 1 of the mouseloc = (item 1 of the bottomRight of me)-((the
 width of me)/2) then

 grab me -- Move me

 put the rect of me into myNewRect -- Get the old size
-- Once you have newRect, it is very slightly quicker to use it rather 
than repeatedly getting the property, hence:
put item q of myNewRect into myLeft
-- etc
 put item 1 of the rect of me into myLeft
 put item 2 of the rect of me into myTop
 put item 3 of the rect of me into myRight
 put item 4 of the rect of me into myBottom
-- but why bother, if you never use them again anyway? Just handle 
myNewRect and
--  the box widths which you captured up the top. Read on.

-- The following can also be done by reference to the variable rather 
than repeated property gets.
-- However, better to do it outside mouseDown (e.g. on openCard or a 
preOpen) since you do not
--  indicate that it changes at any time, and this is being executed 
repeatedly on mouseStillDown.
 put the rect of graphic theBigBox into myBigBox
 put item 1 of the rect of graphic theBigBox into BigBoxLeft
 put item 2 of the rect of graphic theBigBox into BigBoxTop
 put item 3 of the rect of graphic theBigBox into BigBoxRight
 put item 4 of the rect of graphic theBigBox into BigBoxBottom

 if myLeft  (BigBoxLeft+5) then
   put BigBoxLeft into item 1 of myNewRect
-- this and the corresponding next statement will change the size of the 
object because you are
--  changing only the top and left. Set the top and left as you do but 
then set the right and bottom by
--  adding WidthOfBox and HeightOfBox to items 1 and 2 of myNewRect to 
create items 3 and 4.
 end if
 if myTop  (BigBoxTop+5) then
   put BigBoxTop into item 2 of myNewRect
 end if

 set the rect of me to myNewRect -- Set the new size

-- all yours for the next half... :-)

   else -- Change the Size of me

 put the rect of me into myNewRect -- Get the old size

 put round((item 1 of the mouseLoc)/10) into myLeft
 put round((item 2 of the mouseLoc)/10) into myTop

 put myLeft*10 into myLeft
 put myTop*10 into myTop

 put myLeft into item 3 of myNewRect
 put myTop into item 4 of myNewRect

 set the rect of me to myNewRect -- Set the new size
   end if
 end mouseDown

 on mouseStillDown
   mouseDown
 end mouseStillDown


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


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



Re: Will the script editing quirks be fixed?

2002-02-19 Thread Terry Vogelaar

 Am I the only one suffering from the problem of the auto completion of
 things like on repeat putting the end repeat before another line:
 
 Put 1 into x
 Put 2 into y
 
 If I type on repeat between the two:
 
 Put 1 into x
 On repeat
 Put 2 into y
 
 Revolution puts in:
 
 Put 1 into x
 On repeat
 
 End repeatput2 into y

The problem is actually a handy feature which looks like a bug when you
don't know what happens. If you type repeat and a return, the end repeat
is automatically filled in, because the repeat has to end somewhere.

The solution is very simple: don't position the cursor before line two, but
after line one. Then you begin with a return and then you type on repeat.

BTW, don't you just mean repeat? Because when you write on repeat, you
are making a new handler called repeat, while you probably just want to
have something repeated...

Terry


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



Re: Drawing tools in standalone

2002-02-19 Thread Terry Vogelaar

 Just a litle question about the Rev 1.1.1 update:
 will it be free for the Rev 1.1 registred users ?

After registering, you will have ALL the updates free for a whole year.
After that year, your license will work for the versions released during
that year, but new versions will not work with your serial number.

Terry


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



Re: Missing hidden characters and htmlText

2002-02-19 Thread Jeanne A. E. DeVoto

At 12:18 AM -0800 2/19/2002, Matt Denton wrote:
I can't find a way to keep the 'hidden' character of a field that has
the imageSource set for it.

I think you'll find this is fixed in 1.1.1b1. (The hidden character, in the
htmlText, is replaced by a tag of the form img src=imageSource here.)

--
Jeanne A. E. DeVoto ~ [EMAIL PROTECTED]
http://www.runrev.com/
Runtime Revolution Limited - Power to the Developer!


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



Re: Drawing tools in standalone

2002-02-19 Thread Jeanne A. E. DeVoto

At 8:39 PM -0800 2/19/2002, Terry Vogelaar wrote:
 Just a litle question about the Rev 1.1.1 update:
 will it be free for the Rev 1.1 registred users ?

After registering, you will have ALL the updates free for a whole year.

Please note that this applies to the Professional edition, but not the
Standard edition.

In answer to the original question, yes: 1.1.1 will be a free upgrade to
all 1.1 license holders.

--
Jeanne A. E. DeVoto ~ [EMAIL PROTECTED]
http://www.runrev.com/
Runtime Revolution Limited - Power to the Developer!


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