Re: Call vs Send

2005-06-10 Thread Mark Wieder
Dennis-

Thursday, June 9, 2005, 7:39:52 PM, you wrote:

DB It simulates the stock markets (every stock) for the past ten years,

Now *there's* a depressing idea...

on SimulateStockMarketForLastTenYears
  create graphic tanked
  set the style of it to line
  set the points of it to 0,0,200,200
end SimulateStockMarketForLastTenYears

g ...no big arrays involved...

-- 
-Mark Wieder
 [EMAIL PROTECTED]

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


Re: Call vs Send

2005-06-10 Thread Dennis Brown

Now why didn't I think of that.  It's so simple!
Leave it to Rev to be able to script a complex problem in a simple way.
However, I think the points should be two lines bubble and tanked  
--and we haven't got to the end of the tanked line yet.


Dennis

On Jun 10, 2005, at 12:18 PM, Mark Wieder wrote:


Dennis-

Thursday, June 9, 2005, 7:39:52 PM, you wrote:

DB It simulates the stock markets (every stock) for the past ten  
years,


Now *there's* a depressing idea...

on SimulateStockMarketForLastTenYears
  create graphic tanked
  set the style of it to line
  set the points of it to 0,0,200,200
end SimulateStockMarketForLastTenYears

g ...no big arrays involved...

--
-Mark Wieder
 [EMAIL PROTECTED]

___
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: Call vs Send

2005-06-09 Thread Rob Cozens

Hi Dennis,


Nonworking script in field PN1:

on mouseUp
  call SaveMeTxt
end mouseUp


Did you try call SaveMeText   ?

Per Transcript Dictionary (call command), The entire handler including 
parameters must be enclosed in quotes.


Rob Cozens CCW
Serendipity Software Company

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

 from The Triple Foole by John Donne (1572-1631) 


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


Re: Call vs Send

2005-06-09 Thread Dennis Brown

Rob,

Yes I did.  Both seem to work if you don't have parameters. But as I  
posted, the call is not required to get the proper functionality.


Dennis

On Jun 9, 2005, at 9:07 AM, Rob Cozens wrote:


Hi Dennis,



Nonworking script in field PN1:

on mouseUp
  call SaveMeTxt
end mouseUp



Did you try call SaveMeText   ?

Per Transcript Dictionary (call command), The entire handler  
including parameters must be enclosed in quotes.


Rob Cozens CCW
Serendipity Software Company

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

 from The Triple Foole by John Donne (1572-1631)
___
use-revolution mailing list
use-revolution@lists.runrev.com
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: Call vs Send

2005-06-09 Thread Richard Gaskin

Dennis Brown wrote:

Richard,

Going through your tutorial is what made me try to improve my scripts  
with call.  I thought that the call would execute a script in another  
place but keep the context of where it was called from.  So 'me'  would 
be the field that the call originated from and not the card  that the 
script was in.  But after a test, it looks like that is not  the case 
--too bad. 


Does send do what you need?

It is the target that returns the name of my  field, but the 
group name is left off which is bad for me because I  have the same name 
repeated in many differently named groups. I have  groups of fields and 
buttons that are created from templates on the  fly, along with many 
saved values for each (in custom properties).   These are related to 
various setup conditions for running  simulations.  I obviously want the 
minimum  scripts in the  duplicates, and most of the script in a common 
place where changes  are manageable.  Perhaps you should be prepared to 
make sure nobody  else makes this mistake in your tutorial.


Using the long id of the target will provide an absolute reference to 
the specific object, but I'm not sure why simply the target doesn't 
return the same value.  Hmmm  makes the target rather less useful, 
unless there's a benefit to the truncated descriptor it returns that I'm 
just not seeing.


But to be honest, it's very rare that I use either call or send. 
Both are up there with do in terms of a modest amount of additional 
overhead needed to handle them relative to calls natively in the message 
path.


Could there be another way to handle that using the native message path, 
maybe a common handler in the master group or card script?


Also, what sort of simulation are you working on?

--
 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: Call vs Send

2005-06-09 Thread Dennis Brown


On Jun 9, 2005, at 9:23 PM, Richard Gaskin wrote:

Using the long id of the target will provide an absolute  
reference to the specific object, but I'm not sure why simply the  
target doesn't return the same value.  Hmmm  makes the  
target rather less useful, unless there's a benefit to the  
truncated descriptor it returns that I'm just not seeing.


I found that the long name of the target is what was required to  
get me what I needed.


But to be honest, it's very rare that I use either call or  
send. Both are up there with do in terms of a modest amount of  
additional overhead needed to handle them relative to calls  
natively in the message path.


Speaking of do.  That is another on that should be combined with  
these call/send in a tutorial.  I try to avoid it, but I have to use  
it often because I don't know any other way to reference a variable  
or a custom property who's name is in a variable --though for speed  
reasons, I never do this inside a critical loop.  Very useful when  
making complex one card stacks that would be a memory and support  
killer with many cards.


Could there be another way to handle that using the native message  
path, maybe a common handler in the master group or card script?


Yes that is what worked.  I put the common scripts in my card script  
now and use the native message path.



Also, what sort of simulation are you working on?


It simulates the stock markets (every stock) for the past ten years,  
looking for algorithmic and statistical relationships in the  
performance.  There is a lot of data, which is why I have been  
pushing the speed thing in large arrays.  I have worked on similar,  
but less aggressive simulations many years ago in HyperCard, then  
SuperCard, and I was just considering a switch to MetaCard (for speed  
reasons) when the previous project was dropped.  I haven't done  
anything in programming for the last 5 years, until this project came  
up --so everything is new again.


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


Re: Call vs Send

2005-06-09 Thread Dick Kriesel
On 6/9/05 6:23 PM, Richard Gaskin [EMAIL PROTECTED] wrote:

 Using the long id of the target will provide an absolute reference to
 the specific object, but I'm not sure why simply the target doesn't
 return the same value.  Hmmm  makes the target rather less useful,
 unless there's a benefit to the truncated descriptor it returns that I'm
 just not seeing.

The truncated descriptor enables the simple structure if the target is me
in handlers for system messages and even application messages.

What are the relative timings of handlers in the message path vs. handlers
outside?

-- Dick


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


Re: Call vs Send

2005-06-09 Thread Richard Gaskin

Dick Kriesel wrote:

On 6/9/05 6:23 PM, Richard Gaskin [EMAIL PROTECTED] wrote:



Using the long id of the target will provide an absolute reference to
the specific object, but I'm not sure why simply the target doesn't
return the same value.  Hmmm  makes the target rather less useful,
unless there's a benefit to the truncated descriptor it returns that I'm
just not seeing.


The truncated descriptor enables the simple structure if the target is me
in handlers for system messages and even application messages.


That would still work if  both the target and me used absolute 
references.  Within scripts the engine seems to know what the target 
refers to, but looking at the string returned when asking for the 
target we should expect confusion if there are two such objects with 
the same name.


Curious inconsistency


What are the relative timings of handlers in the message path vs. handlers
outside?


About twice as long, but as with many benchmarks with Transcript it 
hardly matters:  twice as long sounds like a big deal, but on my 1GHz 
G4 that's still less than a microsecond. :)


--
 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: Call vs Send

2005-06-09 Thread Dar Scott


On Jun 9, 2005, at 9:51 PM, Richard Gaskin wrote:

What are the relative timings of handlers in the message path vs. 
handlers

outside?


About twice as long, but as with many benchmarks with Transcript it 
hardly matters:  twice as long sounds like a big deal, but on my 
1GHz G4 that's still less than a microsecond. :)


Do you mean millisecond?

I find addition to be less than a microsecond, but a path call is 8 to 
15 microseconds for the 3rd invocation and up. A send or call takes 50 
to 70 microseconds for the 3rd call and up.  (2 short parameters)


Maybe we should compare notes.

This is on a dual 1.25 GHz G4.

Dar

--
**
DSC (Dar Scott Consulting  Dar's Lab)
http://www.swcp.com/dsc/
Yahoo!  RevCon West in one week!
**

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


Re: Call vs Send

2005-06-09 Thread Dick Kriesel
On 6/9/05 6:23 PM, Richard Gaskin [EMAIL PROTECTED] wrote:

 But to be honest, it's very rare that I use either call or send.
 Both are up there with do in terms of a modest amount of additional
 overhead needed to handle them relative to calls natively in the message
 path.

On 6/9/05 8:51 PM, Richard Gaskin [EMAIL PROTECTED] wrote:

 What are the relative timings of handlers in the message path vs. handlers
 outside?
 
 About twice as long, but as with many benchmarks with Transcript it
 hardly matters:  twice as long sounds like a big deal, but on my 1GHz
 G4 that's still less than a microsecond. :)

Are there stronger reasons for you to use call and send very rarely?  I
ask because I've been using send a lot.

-- Dick


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


Re: Call vs Send

2005-06-09 Thread Richard Gaskin

Dar Scott wrote:


On Jun 9, 2005, at 9:51 PM, Richard Gaskin wrote:

What are the relative timings of handlers in the message path vs. 
handlers

outside?



About twice as long, but as with many benchmarks with Transcript it 
hardly matters:  twice as long sounds like a big deal, but on my 
1GHz G4 that's still less than a microsecond. :)



Do you mean millisecond?

I find addition to be less than a microsecond, but a path call is 8 to 
15 microseconds for the 3rd invocation and up. A send or call takes 50 
to 70 microseconds for the 3rd call and up.  (2 short parameters)


Maybe we should compare notes.

This is on a dual 1.25 GHz G4.


No, my bad: I slipped a digit.

My times were:

0.00336 0.00871

Using this script:

-- in button used to run the test:  
on mouseUp
  put 10 into tMax
  --
  put the millisecs into t
  repeat tMax
foo
get the result  world
  end repeat
  put  the millisecs - t into t1
  --
  put the millisecs into t
  repeat tMax
call foo of btn test
get the result  world
  end repeat
  put  the millisecs - t into t2
  --
  put t1/tMax  t2/tMax
end mouseUp


-- in card and in btn test:
on foo
  return hello
end foo


Even so, a 5 microsecond difference isn't bad for most needs, esp. 
considering how rarely one truly needs to use either call or send.


--
 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: Call vs Send

2005-06-09 Thread Richard Gaskin

Dick Kriesel wrote:

On 6/9/05 6:23 PM, Richard Gaskin [EMAIL PROTECTED] wrote:


But to be honest, it's very rare that I use either call or send.
Both are up there with do in terms of a modest amount of additional
overhead needed to handle them relative to calls natively in the message
path.


On 6/9/05 8:51 PM, Richard Gaskin [EMAIL PROTECTED] wrote:


What are the relative timings of handlers in the message path vs. handlers
outside?


About twice as long, but as with many benchmarks with Transcript it
hardly matters:  twice as long sounds like a big deal, but on my 1GHz
G4 that's still less than a microsecond. :)


Are there stronger reasons for you to use call and send very rarely?  I
ask because I've been using send a lot.


I don't feel too strongly about it one way or another. I just don't find 
myself needing send often in the stuff I'm doing.  But if you need it 
I see no harm in using it.


--
 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: Call vs Send

2005-06-08 Thread Richard Gaskin

Dennis Brown wrote:
I have two versions of a script.  The first uses an implicit send and  
works.  The second uses a call and does not work.  I was trying to  
simplify and expand my scripting abilities with call, but I must be  
missing something, because I can't see what is wrong with it.  I  
appreciate any insights.


The stack for this coming Saturday's online conference has a demo in it 
called Call vs Send, with a discussion of the differences between the two:

http://support.runrev.com/scriptingconferences/


--
 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: Call vs Send

2005-06-08 Thread Dar Scott


On Jun 8, 2005, at 1:54 PM, Dennis Brown wrote:

I have two versions of a script.  The first uses an implicit send and 
works.  The second uses a call and does not work.  I was trying to 
simplify and expand my scripting abilities with call, but I must be 
missing something, because I can't see what is wrong with it.  I 
appreciate any insights.


There are some differences between the 1) implicit send or invocation 
and 2) send  call.  There are also differences between send and call.


They might not apply to this particular case, but they might to some 
things you might try.


The 'me' refers to the object that holds the script.  An alternative 
you can use is 'the target' which is the name of the object that the 
original (top level) message was sent to.  That is changed on a send or 
call.


A send or call can have parameters.

In your case you might be able to use 'the target' unless it runs into 
ambiguity problems.


You might be better off passing 'the id of me' and letting the support 
function get what it needs from that.  Like this:


   saveMeTxt the long id of me

Unfortunately, 'the target' is suitable in only well controlled cases.  
It might not uniquely identify the target.


(There is also an unsupported way.)

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


Re: Call vs Send

2005-06-08 Thread Andre Garzia


On Jun 8, 2005, at 5:33 PM, Dar Scott wrote:



(There is also an unsupported way.)

dar


Dar,

now, I am curious...

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: Call vs Send

2005-06-08 Thread Dennis Brown

Richard,

Going through your tutorial is what made me try to improve my scripts  
with call.  I thought that the call would execute a script in another  
place but keep the context of where it was called from.  So 'me'  
would be the field that the call originated from and not the card  
that the script was in.  But after a test, it looks like that is not  
the case --too bad.  It is the target that returns the name of my  
field, but the group name is left off which is bad for me because I  
have the same name repeated in many differently named groups. I have  
groups of fields and buttons that are created from templates on the  
fly, along with many saved values for each (in custom properties).   
These are related to various setup conditions for running  
simulations.  I obviously want the minimum  scripts in the  
duplicates, and most of the script in a common place where changes  
are manageable.  Perhaps you should be prepared to make sure nobody  
else makes this mistake in your tutorial.


Thanks,
Dennis

On Jun 8, 2005, at 4:04 PM, Richard Gaskin wrote:


Dennis Brown wrote:

I have two versions of a script.  The first uses an implicit send  
and  works.  The second uses a call and does not work.  I was  
trying to  simplify and expand my scripting abilities with call,  
but I must be  missing something, because I can't see what is  
wrong with it.  I  appreciate any insights.




The stack for this coming Saturday's online conference has a demo  
in it called Call vs Send, with a discussion of the differences  
between the two:

http://support.runrev.com/scriptingconferences/


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



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


Re: Call vs Send

2005-06-08 Thread Dennis Brown

Dar,

Yes, you see my problem exactly.  It is the target that returns the  
name of my field, but the group name is left off which is bad for me  
because I have the same name repeated in many differently named  
groups. I have groups of fields and buttons that are created from  
templates on the fly, along with many saved values for each (in  
custom properties).  These are related to various setup conditions  
for running simulations.  I obviously want the minimum  scripts in  
the duplicates, and most of the script in a common place where  
changes are manageable.


I am already using a script that pass the name and group to the  
handler, but I wanted to make it even simpler and just call the  
routine without generating a parameter to pass.


Thanks,
Dennis


On Jun 8, 2005, at 4:33 PM, Dar Scott wrote:



On Jun 8, 2005, at 1:54 PM, Dennis Brown wrote:


I have two versions of a script.  The first uses an implicit send  
and works.  The second uses a call and does not work.  I was  
trying to simplify and expand my scripting abilities with call,  
but I must be missing something, because I can't see what is wrong  
with it.  I appreciate any insights.




There are some differences between the 1) implicit send or  
invocation and 2) send  call.  There are also differences between  
send and call.


They might not apply to this particular case, but they might to  
some things you might try.


The 'me' refers to the object that holds the script.  An  
alternative you can use is 'the target' which is the name of the  
object that the original (top level) message was sent to.  That is  
changed on a send or call.


A send or call can have parameters.

In your case you might be able to use 'the target' unless it runs  
into ambiguity problems.


You might be better off passing 'the id of me' and letting the  
support function get what it needs from that.  Like this:


   saveMeTxt the long id of me

Unfortunately, 'the target' is suitable in only well controlled  
cases.  It might not uniquely identify the target.


(There is also an unsupported way.)

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



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


Re: Call vs Send

2005-06-08 Thread Dar Scott


On Jun 8, 2005, at 2:48 PM, Andre Garzia wrote:


(There is also an unsupported way.)



now, I am curious...


the executionContexts



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


Re: Call vs Send

2005-06-08 Thread Dick Kriesel
Dennis --

You can find the name of the group that contains the target in the long
name of the target.

-- Dick


On 6/8/05 2:03 PM, Dennis Brown [EMAIL PROTECTED] wrote:

 Dar,
 
 Yes, you see my problem exactly.  It is the target that returns the
 name of my field, but the group name is left off which is bad for me
 because I have the same name repeated in many differently named
 groups. I have groups of fields and buttons that are created from
 templates on the fly, along with many saved values for each (in
 custom properties).  These are related to various setup conditions
 for running simulations.  I obviously want the minimum  scripts in
 the duplicates, and most of the script in a common place where
 changes are manageable.
 
 I am already using a script that pass the name and group to the
 handler, but I wanted to make it even simpler and just call the
 routine without generating a parameter to pass.
 
 Thanks,
 Dennis
 
 
 On Jun 8, 2005, at 4:33 PM, Dar Scott wrote:
 
 
 On Jun 8, 2005, at 1:54 PM, Dennis Brown wrote:
 
 
 I have two versions of a script.  The first uses an implicit send
 and works.  The second uses a call and does not work.  I was
 trying to simplify and expand my scripting abilities with call,
 but I must be missing something, because I can't see what is wrong
 with it.  I appreciate any insights.
 
 
 There are some differences between the 1) implicit send or
 invocation and 2) send  call.  There are also differences between
 send and call.
 
 They might not apply to this particular case, but they might to
 some things you might try.
 
 The 'me' refers to the object that holds the script.  An
 alternative you can use is 'the target' which is the name of the
 object that the original (top level) message was sent to.  That is
 changed on a send or call.
 
 A send or call can have parameters.
 
 In your case you might be able to use 'the target' unless it runs
 into ambiguity problems.
 
 You might be better off passing 'the id of me' and letting the
 support function get what it needs from that.  Like this:
 
saveMeTxt the long id of me
 
 Unfortunately, 'the target' is suitable in only well controlled
 cases.  It might not uniquely identify the target.
 
 (There is also an unsupported way.)
 
 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
 
 
 ___
 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: Call vs Send

2005-06-08 Thread Dar Scott


On Jun 8, 2005, at 3:03 PM, Dennis Brown wrote:

Yes, you see my problem exactly.  It is the target that returns the 
name of my field, but the group name is left off which is bad for me 
because I have the same name repeated in many differently named 
groups. I have groups of fields and buttons that are created from 
templates on the fly, along with many saved values for each (in custom 
properties).  These are related to various setup conditions for 
running simulations.  I obviously want the minimum  scripts in the 
duplicates, and most of the script in a common place where changes are 
manageable.


I am already using a script that pass the name and group to the 
handler, but I wanted to make it even simpler and just call the 
routine without generating a parameter to pass.


This is a problem that I have in making custom controls.

The simplest thing to do is pass 'the long id of me' and use that to 
get the owner and siblings.


This deserves a new feature suggestion.  Changing 'the target' might 
break some code.  Adding idiomatic meaning to 'the long id of the 
target' might be confusing.  Maybe 'the target' can be an object whose 
text meaning is what it is now, but will work with 'the long id of'.  
The same with 'the owner of'.  That is, 'the target' and 'the owner of' 
are objects.  I might be confused as to what is happening.


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


Re: Call vs Send

2005-06-08 Thread Dar Scott


On Jun 8, 2005, at 3:16 PM, Dick Kriesel wrote:

You can find the name of the group that contains the target in the 
long

name of the target.


That only gets you the name of a group that contains something with the 
same name as the target.  Unlike 'me', 'the target' does not uniquely 
identify the desired object.


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


Re: Call vs Send

2005-06-08 Thread Robert Brenstein

Dar,

Yes, you see my problem exactly.  It is the target that returns the 
name of my field, but the group name is left off which is bad for me 
because I have the same name repeated in many differently named 
groups. I have groups of fields and buttons that are created from 
templates on the fly, along with many saved values for each (in 
custom properties).


get the short name of the owner of fld x

will give you the group name within which btn x resides. This 
syntax assumes that all passed objects are certain to be in a group. 
Otherwise, get the owner ans inspect the first word for the type of 
object.


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


Re: Call vs Send

2005-06-08 Thread Robert Brenstein

On Jun 8, 2005, at 3:16 PM, Dick Kriesel wrote:


You can find the name of the group that contains the target in the long
name of the target.


That only gets you the name of a group that contains something with 
the same name as the target.  Unlike 'me', 'the target' does not 
uniquely identify the desired object.


Dar



Hmm, I just created two groups named differently, each with a button 
of the same name. Each button called same a handler on the card with:


 get the short name of the owner of the target

This returned a different, and correct, group name depending which 
button I clicked.


Isn't this what the original poster wanted?

Similarly

  get the id of the target

returns the proper, and unique, id of the button clicked. So while 
the target itself returns incomplete description to uniquely identify 
an object, it can still be used to get unique identification as far 
as I can see.


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


Re: Call vs Send

2005-06-08 Thread Dar Scott


On Jun 8, 2005, at 5:13 PM, Robert Brenstein wrote:


Similarly

  get the id of the target

returns the proper, and unique, id of the button clicked. So while the 
target itself returns incomplete description to uniquely identify an 
object, it can still be used to get unique identification as far as I 
can see.


You are right.  I even tried the long id.  I even tried it in a card 
handler called by the mouseup.


I must have slipped universes again.  Where I came from that didn't 
work.  We had to use 'me'.


Sigh.

Dar



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


Re: Call vs Send

2005-06-08 Thread Dennis Brown
Thanks Robert,Dick,Dar,Richard,, --empty item at end of list in case  
I forgot anyone ;-)


That is the answer I need.  In my button or field script I can just put:

on mouseUp --this was actually called by another button and not  
actually clicked on by me

  DoMyFieldScript --couldn't be simpler
end mouseUp

Then in the card I put:

on DoMyFieldScript
  put the long name of the target into myCompletePath
  put (token 1 to 5 of the long name of the targetquote into  
myNameAndGroup

  put the id of the target into myID --many ways to use this reference
  put (token 1 to 5 of the long name of fld id myID)quote into  
myNameAndGroup

  put the short name of fld id myID into myName
  etc.,etc.,etc...
end DoMyFieldScript

This is such a basic concept for consolidating multiple object  
scripts that need to refer to the calling object --and it turns out  
to be simple.  It seems like a whole scripting tutorial could be  
devoted to all the theme and variations on this target etc. concept.   
A simple example of each variation along with how and why it should  
be used would be a great reference.  I am sure there are many more  
tricks like this than I am aware of yet.


Dennis


On Jun 8, 2005, at 7:13 PM, Robert Brenstein wrote:


On Jun 8, 2005, at 3:16 PM, Dick Kriesel wrote:


You can find the name of the group that contains the target in  
the long

name of the target.





Hmm, I just created two groups named differently, each with a  
button of the same name. Each button called same a handler on the  
card with:


 get the short name of the owner of the target

This returned a different, and correct, group name depending which  
button I clicked.


Isn't this what the original poster wanted?

Similarly

  get the id of the target

returns the proper, and unique, id of the button clicked. So while  
the target itself returns incomplete description to uniquely  
identify an object, it can still be used to get unique  
identification as far as I can see.


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