Right. A property set is an array of properties if I am not mistaken. So
portal_RowNames is the "array" name and headerName is a variable which holds a
value resolving to the name of the property. Hence it compiles.
Bob S
On Jan 16, 2017, at 10:45 , Jeanne A. E. DeVoto via use-livecode
mailto
At 6:56 PM + 1/13/2017, Sannyasin Brahmanathaswami via use-livecode wrote:
But I found this in a script from an associate:
setprop portal_RowNames [headerName] rowNames
and it compiles the first param is a variable inside square braces.
Not sure it this is some LC magic or just this progr
If I recall correctly, that is a keyed custom prop, and also if I remember
correctly, it works with our without the space. (So its like an array, but
its a property with array notation)
portal_RowNames [headerName] and portal_RowNames[headerName] should both
work. (unless I misremember completely)
But I found this in a script from an associate:
setprop portal_RowNames [headerName] rowNames
and it compiles… the first param is a variable inside square braces.
Not sure it this is some LC magic or just this programmer's "style"
-
Bob S: That can only be an element of an array. Withou
What does "do" do with an array expression missing an array name?
--
Richard Gaskin
Fourth World Systems
Mike Kerner wrote:
"Do" is magic
On Fri, Jan 13, 2017 at 10:39 AM, Bob Sneidar via use-livecode <
use-livecode at lists.runrev.com> wrote:
That can only be an element of an array. Wit
but more extensive pointer support would be nice, as would better pointer
ERRR reference syntax. 4D nailed it there.
->x is a pointer to x
y-> is whatever y points to
On Fri, Jan 13, 2017 at 11:48 AM, Mike Kerner
wrote:
> "Do" is magic
>
> On Fri, Jan 13, 2017 at 10:39 AM, Bob Sneidar via u
"Do" is magic
On Fri, Jan 13, 2017 at 10:39 AM, Bob Sneidar via use-livecode <
use-livecode@lists.runrev.com> wrote:
> That can only be an element of an array. Without the preceding array name,
> it will not compile.
>
> Bob S
>
>
> On Jan 12, 2017, at 21:11 , Sannyasin Brahmanathaswami via use-l
That can only be an element of an array. Without the preceding array name, it
will not compile.
Bob S
On Jan 12, 2017, at 21:11 , Sannyasin Brahmanathaswami via use-livecode
mailto:use-livecode@lists.runrev.com>> wrote:
[var] # value inside square braces…
that I see in some scripts… what is
@ pass by reference
Wow! I'm only now learning about this? ….sheesh, this would have solved so many
issues I faced in the past!
and now pass arrays too. Fantastic.
@ Richard: yes "wrap" was the wrong way to state this… "call a function with
dispatch" is was I should have said
BR
PS there is
Filed: http://quality.livecode.com/show_bug.cgi?id=19082
On Wed, Jan 11, 2017 at 1:08 AM Bob Sneidar via use-livecode <
use-livecode@lists.runrev.com> wrote:
> I use this ALL the time. sqlYoga uses special arrays for Record Objects,
> and the elements of one of these arrays can *only* be modified
I use this ALL the time. sqlYoga uses special arrays for Record Objects, and
the elements of one of these arrays can *only* be modified using the
sqlrecord_set command. Because of this, I need to pass these record objects by
reference to update them correctly. Very handy.
Bob S
On Jan 10, 201
Since Livecode version 7.0 it’s also possible to pass an array element by
reference and that also works with “Dispatch”.
Example:
on mouseUp
Put "27" into tTemp["tKey"]
Dispatch "AdjustSetting" with tTemp["tKey"]
# Now tTemp["tKey"] = 62
put tTemp["tKey"]
end mouseUp
on AdjustSettin
Another feature of “dispatch” that is undocumented is that it can be used with
call by reference variables. The variables passed as call by reference can also
be arrays, which can come in handy sometimes.
Example:
on mouseUp
Put "27" into tTemp
Dispatch "AdjustSetting" with tTemp
# no
Monte Goulding wrote:
> Try this:
>
> on mouseUp
> dispatch function "foo" to me with 1,2
> put the result
> end mouseUp
>
> function foo p1, p2
> return p1 + p2
> end foo
Yep, it works.
So it's not so much wrapping it per se, just calling it directly by
adding the "function" specifier to "
Try this:
on mouseUp
dispatch function "foo" to me with 1,2
put the result
end mouseUp
function foo p1, p2
return p1 + p2
end foo
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage
Ali Lloyd wrote:
> The `dispatch function` form of the dispatch command indeed does not
> appear to be documented.
What does that syntax look like?
This works:
on mouseUp
dispatch "foo" to me with 1,2
put the result
end mouseUp
on foo p1, p2
return p1 + p2
end foo
...but this does not
The `dispatch function` form of the dispatch command indeed does not appear
to be documented.
On Tue, Jan 10, 2017 at 9:10 PM Richard Gaskin via use-livecode <
use-livecode@lists.runrev.com> wrote:
> Sannyasin Brahmanathaswami wrote:
>
> > Sometimes you want to do a "remote" call to a function a
A perhaps better way is to put all your functions that you want to call
"remotely" in a button or a script only stack and when you first open your
stack insert the script of into front or back. One thing to keep
in mind however is scoping.
"this" for example refers to the object which called
Sannyasin Brahmanathaswami wrote:
> Sometimes you want to do a "remote" call to a function and get data
> back. At first this appear no possible
>
> send | dispatch | do | call
>
> BUT: FYI you can wrap a function in Dispatch and the value is
> returned in the result.
>
> this is not documented.
for the documentarians among us.
Sometimes you want to do a "remote" call to a function and get data back. At
first this appear no possible
send | dispatch | do | call
BUT: FYI you can wrap a function in Dispatch and the value is returned in the
result.
this is not documented.
20 matches
Mail list logo