working method?
Jim Ault
JimAultWins at yahoo.com
Thu Oct 27 01:09:16 EDT 2005
After years of HCard and now 1.5 years with Rev, I am using the following
simplified system as much as possible.
--All handlers go in the stack script, if possible.
--All simple button mouseup scripts are identical
on mouseUp
do (the short name of me)
end mouseUp
--set the LABEL of the btn for the user, the NAME for the program
on mouseDoubleDown
do (the short name of me &"down")
end mouseDoubleDown
on mouseStillDown
do (the short name of me &"stilldown")
end mouseStillDown
--stack handlers -----------------------------------------------
on btnPrev --<proc only called by btn named ³btnPrev²
--single click got you here
put the target into msg
end btnPrev
on btnPrevDown --<proc
--dbl click got you here
put the target into msg
end btnPrevDown
on btnPrevStillDown --<proc
--mouse held down got you here
put the top of target into topp
put the left of target into leftt
--now call function btnLoc() with no parameters
put btnLoc() into newPosition
if newPosition is (topp&","&leftt) then
--no drag since last check
--because we have done nothing to move it
--tracking the mouse loc would do the trick
else
--do something here
end if
end btnPrevStillDown
function btnLoc --<func
--Rev still remembers the last target clicked
put the top of target into topp
put the left of target into leftt
return topp & "," & leftt
end btnLoc
--To document the stack script try something like
on getListOfHandlers
global gOutput
put the script of this stack into procs
filter procs with "*--proc"
put the script of this stack into funcs
filter funcs with "*--<func"
put the long name of this stack & \
" on " & the short date & \
" at " & the short time into gOutput
put return & procs & \
return & return & funcs & \
return & "______ end of handler list" after gOutput
put gOutput into msg
set the clipboarddata to gOutput
--now you have the report in 3 places
-- msg, clip, and a global as long as Rev is running
end getListOfHandlers
Hope this helps you get started.
Also, you can add whatever you wish after the "--<proc" such as why, what
it does, etc and it will be on the report
Jim Ault
Las Vegas
On 10/26/05 7:25 PM, "Charles Hartman" <charles.hartman at conncoll.edu> wrote:
> I know this is going to sound like a *really* dumb question, if only
> because it's so vague. But I'm wondering how people adjust their
> workflow to the way Transcript's code is dispersed among many
> separate scripts.
>
> I keep getting lost. I keep forgetting where my code is that does
> such-and-such. (Which script was that in?) So I keep losing track of
> what I was about to do next, and my concentration falls apart. It's
> making Rev *much* slower for me to program in than supposedly more
> complicated languages like Python and C++.
>
> Anybody think this makes any sense? Any hints how to think about it
> differently?
>
> Charles Hartman
>
>
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
More information about the use-livecode
mailing list