Challenge: how to set the text of a field

David Bovill david at vaudevillecourt.tv
Fri Mar 29 16:17:30 EDT 2013


No joy with the owner - it's a fundamental issue of a reference to the
field / group / target - the owner and all references I know of return the
value associated with the current card not the value of the actual card the
target is on. I view this (and always have as a quite serious bug) - I'm
just checking if anyone knows a way around this (I've never found one). It
only really becomes an issue when you are developing re-useable components
with behaviors - and want to give other authors a good syntax to be able to
interact with them.

For these purposes I've been using a real pig of a handler - and I find I
use it very often:

put the card_Object of the target into cardObject

as far as I know there is no way of finding out the card a control is on
(if it is not the current card) without parsing the long id of the target
and well this is both a pain and slow, and sometimes gives an error - ie
when you get ruggedIDs returned - which lack the card part - and well
sometimes will not convert back to the long id reliably.

No fixes out there?

On 29 March 2013 19:42, J. Landman Gay <jacque at hyperactivesw.com> wrote:

> On 3/29/13 2:30 PM, David Bovill wrote:
>
>  So how can I write a handler to retrun the text of a background group on a
>> card other than the current card? The only way I know of is to do some
>> ugly
>> manual parsing of the long id of the target, and so extract the card id
>> and
>> construct a reference that way - very ugly and in other contexts error
>> prone. What we need is something equivalent to:
>>
>> put the card of the target
>> put the number of the card of the target
>>
>> Any other way of doing this simple task?
>>
>
> Does it have to be a background group? If you make it a shared card group
> then you can get "the owner of me", which will be the card.
>
> --
> Jacqueline Landman Gay         |     jacque at hyperactivesw.com
> HyperActive Software           |     http://www.hyperactivesw.com
>
> ______________________________**_________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/**mailman/listinfo/use-livecode<http://lists.runrev.com/mailman/listinfo/use-livecode>
>



More information about the use-livecode mailing list