Pasting text to and from other programs

2010-11-08 Thread dfepstein


Does someone understand the various hitches that arise when copying styled text 
between Rev and other programs? 



On a Windows XP PC, I copy some text from MS Outlook. When I paste it into a 
Rev field, the apostrophes are missing. 

If I copy from MS Outlook, paste into Notepad, then copy from Notepad and paste 
into a field, the aprostrophes are preserved. 



From a Rev field, I copy some text. When I paste it into an MS Word document, 
the tab characters become underline characters. 



I should say that my copy and paste routines in Rev are scripted using the 
htmlText, setting and getting the clipBoardData[html]. 



Many thanks for any diagnoses or remedies. 



David Epstein 
___
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


Copying text and images together

2010-08-18 Thread dfepstein


Has anyone found a way to convert a Rev field that includes images to some 
format that TextEdit or MSWord would display with the images intact?  Best 
would be if one could set the clipboarddata and then paste the information, 
images and all, into TextEdit or MSWord. 



David Epstein
___
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: group a single object?

2010-05-11 Thread dfepstein




When it comes to groups, however, you can't count on the word last to 
refer to the last group on the card (if the group you want is nested within 
another group, for example).  I believe there's a bug report or 2 in the 
RQCC about this, but one workaround is to use the templateGroup and 
establish a name before grouping the object/s. 



Another workaround is to get the owner of the object immediately after you've 
grouped it: 



group control id aa 

get the long id of the owner of control id aa 



David Epstein
___
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: Math Help?

2010-04-30 Thread dfepstein


I haven't worked this out, but FWIW: 



Draw a vertical line from point X,Y and determine the value of y at the points, 
if any, that your line crosses each of the triangle's 3 line segments.  It 
looks as if X,Y is within the triangle if 

-- at least one intersecting point exists, and 

-- Y is not greater than the greatest y value among those existing points, nor 
less than the least y value among those existing points. 



Try sketching a few cases to see this.  If this is right, you'd need to make 3 
calls to something like 



function yOnASegment x1,y1,x2,y2,x0 

if (x0 = x1 and x0 = x2) or (x0=x1 and x0=x2) then -- the line segment 
includes x0, and we want to find y0: 

  put (y2-y1)/(x2-x1) into s -- slope; but need to provide separately for the 
case where x2=x1 

  return y1+s*(x0-x1) -- not sure I've considered all possible orderings of the 
points here, but you get the idea 

end if 

return empty -- x0 isn't on the segment 

end yOnASegment 



David Epstein
___
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: Sticky popup?

2010-03-04 Thread dfepstein


Scott Rossi asked Is there any way to make the action of popping up a menu 
sticky? 



To imitate a sticky popup I show a stack (named here L9nav) with empty 
decorations, whose buttons trigger the desired actions and cause the stack to 
close.  And I include in the stack an invisible graphic named auto whose 
script, when in use, causes the stack to close when there's a click somewhere 
outside the stack. 



On mousedown: 



insert script of graphic auto of stack L9nav into front 

go stack L9nav as palette 



Graphic auto has this script: 



on focusIn 

get the short name of this stack 

if it is not L9nav then close stack L9nav 

pass focusIn 

end focusIn 



on openField 

get the short name of this stack 

if it is not L9nav then close stack L9nav 

pass openField 

end openField 



And L9nav itself has this script: 



on closeStack 

if there is not a graphic auto then exit closeStack 

get the long name of graphic auto 

remove script of it from front 

end closeStack 



David Epstein
___
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: Windows menu bars

2010-01-27 Thread dfepstein


This suggestion is late and perhaps obvious, but FWIW: 



If the task of adding a menubar to a whole bunch of cards is onerous, it may be 
worth considering bringing the card contents to the menubar.  That is, create a 
viewer (or even editer) stack that includes the menubar, and 
faux-navigate among the source cards by successively copying and deleting 
their content from your viewer/editer stack.  The merits of this depend on the 
relative complexity of the menu and the card content; it is certainly easiest 
to implement if each card's content is a single group. 



David Epstein 







I need to open multiple documents that share the same menu bar. On Mac I 
can just set the default menubar. What do most of you do for Windows? 
___
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: Scaling Groups?

2009-12-11 Thread dfepstein
Before I go off and try to reinvent the wheel, does anyone have a script

that will proportionally scale objects within a group relative to each

other?

Scott Rossi has answered his own question, but FWIW here's my similar approach 
to the same problem. It does not assume that the scaled group stays in the same 
location, but it does require that the intended new rectangle of the group (not 
just a scaling factor) be specified--e.g., set the groupRect of pGroup to 
100,100,400,400

David Epstein



on storeStartingGroupRects gID
-- load a custom property set of group id gID storing its rect and the rects of 
its members
  repeat with n = 1 to the number of controls in group id gID
set the startingRects[n] of group id gID to the rect of control n of group 
id gID
  end repeat
  set the startingRects[0] of group id gID to the rect of group id gID
end storeStartingGroupRects


setProp groupRect r
-- target group's new rect is r; set its members' rects accordingly
  put the short id of the target into gID
  if the startingRects[0] of group id gID is not empty then
repeat with n = 1 to the number of controls in group id gID
  set the rect of control n of group id gID to scaledRect(the 
startingRects[n] of group id gID,the startingRects[0] of group id gID,r)
end repeat
  end if
end groupRect

function scaledRect rA,rB,rY
-- return a rectangle rX whose position and size relative to rY is the same 
as rA's position relative to rB
  repeat for each char k in 12
put comma  relativeF(item k of rA,item k of rY,item k+2 of rY,item k of 
rB,item k+2 of rB) after hold
  end repeat
  repeat for each char k in 34
put comma  relativeF(item k of rA,item k-2 of rY,item k of rY,item k-2 of 
rB,item k of rB) after hold
  end repeat
  return char 2 to -1 of hold
end scaledRect

function relativef q,e,g,p,r
-- return value f whose value relative to e and g is the same as q's value 
relative to p and r (rounded)
  return round(e+(q-p)/(r-p)*(g-e))
end relativeF
___
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: revEnterprise dp-5 / revMedia beta / revWeb beta

2009-10-30 Thread dfepstein
Richard Miller wrote:
...
1. Create a popup button. It will come with three lines of data in it.

...
3. Go back and enter this into the message box:

put return  tab  tab  choice x after line 1 of btn 1

4. In the development environment, choice x should now appear as a 
sub-choice of the first menu item, and you should be able to select it.
...

Looks like there's an extra tab in your step 3.

David Epstein
___
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: Challenge: How can we set the rect of a polygon to its visual rect? (and a tentative solution)

2009-08-17 Thread dfepstein
It appears that Rev defines the rect of a regular polygon to be the rectangle 
that encloses all possible rotations of that polygon.  To see this, create a 
regular polygon as graphic 1, create a rectangle as graphic 2, in the message 
box set the rect of grc 1 to the rect of grc 2, and then set the angle of grc 
1 to various numbers.

This seems like a useful enough feature that I wouldn't call it a bug.

David Epstein
___
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: Detecting a grabEnter?

2008-09-04 Thread dfepstein
My question about grabEnter has led to an interesting broader discussion of 
the relative merits of grab vs mouseMove..
I would be happy to write a more complicated mouseMove-controlled script, but 
as far as I can tell that won't solve the problem I posed. If the user is 
dragging an object, whether using grab or by a script reacting to mouseMove 
events, no objects beneath that object receive a mouseEnter or mouseLeave 
message, because the mouse remains within the object being dragged.
I can think of ways of amending Transcript that would solve this 
problem--probably by extending the current usage of the various messages 
associated with drag and drop actions. But is there any way to do what I want 
with the language as it is? Capturing mouseMove doesn't tell me what control 
the dragged object has just moved on top of unless at each nudge of the mouse 
I compare the mouseLoc with the rectangles of all potential target objects.
David Epstein
___
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: Detecting a grabEnter?

2008-09-04 Thread dfepstein
Bonjour Eric,
Your suggestion is intriguing but I haven't understood it.  What is an 
automatic blend level?  If by script I set the dragged object's blendLevel to 
50, I still do not detect a mouseEnter when it's dragged over another object.
Many thanks.
David Epstein

 Bonjour David, 
 
 Actually, 2.9 drag and drop feature is able to solve your problem if 
 you accept dragged object's automatic blend level. 
 
 Le 4 sept. 08 à 15:49, [EMAIL PROTECTED] a écrit : 
 
  My question about grabEnter has led to an interesting broader 
  discussion of the relative merits of grab vs mouseMove.. 
  I would be happy to write a more complicated mouseMove-controlled 
  script, but as far as I can tell that won't solve the problem I 
  posed. If the user is dragging an object, whether using grab or 
  by a script reacting to mouseMove events, no objects beneath that 
  object receive a mouseEnter or mouseLeave message, because the 
  mouse remains within the object being dragged. 
  I can think of ways of amending Transcript that would solve this 
  problem--probably by extending the current usage of the various 
  messages associated with drag and drop actions. But is there any 
  way to do what I want with the language as it is? Capturing 
  mouseMove doesn't tell me what control the dragged object has 
  just moved on top of unless at each nudge of the mouse I compare 
  the mouseLoc with the rectangles of all potential target objects. 
  David Epstein 
___
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


Does Palette command work?

2008-08-06 Thread dfepstein
Using Rev Media 2.9 in Windows XP

palette stack a -- no effect
go stack a as palette -- works correctly

Do others experience this?

David Epstein
___
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: Relayering and dragging a group within a group

2006-06-07 Thread dfepstein
Thanks to Ken Ray for his suggestion (quoted below) of how to grab a group on 
the same mousedown that relayers it.  Unfortunately, using send doesn't work, 
I think because (according to MC docs) we can only call grab from a mouseDown 
handler.  In fact I think it's the peculiar character of the grab command 
that's the key here, since other commands inserted after a stop editing 
statement will work.

David Epstein

 on mouseDown
  if button is in the target then

-- (1) put the group this button belongs to on top of other
-- groups that are subgroups of group wb:
put the short id of the owner of the target into tgid
start editing group wb
set the layer of group id tgid to top
stop editing
send grabIt  tgid to me in 50 milliseconds
  end if
 end mouseDown

 on grabIt pID
-- (2) move this group with the mouse until the mouse is released:
grab group id pID of group wb -- DOES THIS WORK?
 end grabIt


 Ken Ray
___
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