Re: When me is not me
It is this sort of thing which inspired me to start using long id's for everything whenever I make calls to cards or stacks not the one I am currently on. That is why I created getParentCard() and getParentStack(). I then pass the local long id of the callign object to whatever script I am callign in another place. I have posted these in the past, let me know if you need them. All I do is pass the long ID of the object that is calling these functions, and all they do is parse the long id string by eliminating everything before the first occurrance of the word "card" or "stack" respectively. Bob S ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: When me is not me
It certainly sounds like it to me... On Sat, 10 Mar 2018 at 17:05, Brian Milby wrote: > Ali, he was doing the former. So could this actually be a bug? > On Sat, Mar 10, 2018 at 6:17 AM Ali Lloyd via use-livecode < > use-livecode@lists.runrev.com> wrote: > >> In theory that shouldn't be the problem - `the of me` should >> short-circuit to directly evaluating the property of the object with the >> behavior, rather than evaluating `me` as a name first. This is why `put >> the >> long id of me into tID` also works. >> >> Peter, in your original script are you doing >> set the hilitedButton of me to tNum >> directly, or >> local tMe >> put me into tMe >> set the hilitedButton of tMe to tNum >> ? >> >> The latter will have the 'not on the current card' problem, whereas the >> former should (in theory) not. >> >> On Sat, Mar 10, 2018 at 2:41 AM Brian Milby via use-livecode < >> use-livecode@lists.runrev.com> wrote: >> >> > I think I know what is going on. If you add a couple of put statements >> to >> > that script you will find that "me" by itself doesn't include the card >> or >> > stack. So "put me" would give something like [group "Language Choice"] >> > which isn't specific enough from another card. This works: >> > >> > local tID >> > put the long id of me into tID >> > set the hilitedButton of tID to tNum >> > >> > But it can be simpler: >> > >> > set the hilitedButton of the long id of me to tNum >> > >> > I didn't do it from an openStack script, but from the message box while >> on >> > another card. >> > >> > Thanks, >> > Brian >> > >> > On Fri, Mar 9, 2018 at 8:10 PM Peter Bogdanoff via use-livecode < >> > use-livecode@lists.runrev.com> wrote: >> > >> > > Yes, it works great if you are on the card, not if you are somewhere >> > else. >> > > >> > > >> > > > On Mar 9, 2018, at 6:03 PM, Mike Bonner via use-livecode < >> > > use-livecode@lists.runrev.com> wrote: >> > > > >> > > > Nevermind. Another card. DOH >> > > > >> > > > On Fri, Mar 9, 2018 at 6:59 PM, Mike Bonner >> > wrote: >> > > > >> > > >> What version? Its working for me in 9 dp11 by using either >> dispatch >> > or >> > > >> send to the group. >> > > >> >> > > >> In the group: >> > > >> command doit pbtn >> > > >> set the hilitedbutton of me to pbtn >> > > >> end doit >> > > >> >> > > >> And from the message box.. >> > > >> >> > > >> send ("doit" && 2) to group 1 >> > > >> or >> > > >> dispatch "doit" to group 1 with 3 >> > > >> >> > > >> >> > > >> On Fri, Mar 9, 2018 at 6:23 PM, Peter Bogdanoff via use-livecode < >> > > >> use-livecode@lists.runrev.com> wrote: >> > > >> >> > > >>> I learned something today. >> > > >>> >> > > >>> I was trying by script to set the hilite of a radio button in a >> group >> > > on >> > > >>> another card. >> > > >>> >> > > >>> My script is in the group “Language Choice” which is called by >> > > openStack. >> > > >>> I’m thinking that “me” would operate on the group: >> > > >>> >> > > >>>set the hilitedButton of me to tNum >> > > >>> >> > > >>> Didn’t work, even though the script received the message and >> > completed. >> > > >>> The radio buttons were unchanged. I modified it to this, which >> > worked: >> > > >>> >> > > >>>set the hilitedButton of group "Language Choice" of card >> > > >>> "Settings" to tNum >> > > >>> >> > > >>> >> > > >>> I can only think that, a group, even though it is on a single card >> > and >> > > >>> does not have its backgroundBehavior set to true, must be >> referred to >> > > >>> explicitly by the name of the group and the name of the card is >> > > resides in. >> > > >>> Or maybe it’s because the individual buttons didn't have >> sharedHilite >> > > set >> > > >>> to true. >> > > >>> >> > > >>> Peter Bogdanoff >> > > >>> ArtsInteractive >> > > >>> >> > > >>> >> > > >>> ___ >> > > >>> use-livecode mailing list >> > > >>> use-livecode@lists.runrev.com >> > > >>> Please visit this url to subscribe, unsubscribe and manage your >> > > >>> subscription preferences: >> > > >>> http://lists.runrev.com/mailman/listinfo/use-livecode >> > > >> >> > > >> >> > > >> >> > > > ___ >> > > > use-livecode mailing list >> > > > use-livecode@lists.runrev.com >> > > > Please visit this url to subscribe, unsubscribe and manage your >> > > subscription preferences: >> > > > http://lists.runrev.com/mailman/listinfo/use-livecode >> > > >> > > >> > > ___ >> > > use-livecode mailing list >> > > use-livecode@lists.runrev.com >> > > Please visit this url to subscribe, unsubscribe and manage your >> > > subscription preferences: >> > > http://lists.runrev.com/mailman/listinfo/use-livecode >> > ___ >> > use-livecode mailing list >> > use-livecode@lists.runrev.com >> > Please visit this url to subscribe, unsubscribe and manage your >> > subscription preferences: >> > http://lists.runrev.com/mailman/listinfo/use-li
Re: When me is not me
Ali, he was doing the former. So could this actually be a bug? On Sat, Mar 10, 2018 at 6:17 AM Ali Lloyd via use-livecode < use-livecode@lists.runrev.com> wrote: > In theory that shouldn't be the problem - `the of me` should > short-circuit to directly evaluating the property of the object with the > behavior, rather than evaluating `me` as a name first. This is why `put the > long id of me into tID` also works. > > Peter, in your original script are you doing > set the hilitedButton of me to tNum > directly, or > local tMe > put me into tMe > set the hilitedButton of tMe to tNum > ? > > The latter will have the 'not on the current card' problem, whereas the > former should (in theory) not. > > On Sat, Mar 10, 2018 at 2:41 AM Brian Milby via use-livecode < > use-livecode@lists.runrev.com> wrote: > > > I think I know what is going on. If you add a couple of put statements > to > > that script you will find that "me" by itself doesn't include the card or > > stack. So "put me" would give something like [group "Language Choice"] > > which isn't specific enough from another card. This works: > > > > local tID > > put the long id of me into tID > > set the hilitedButton of tID to tNum > > > > But it can be simpler: > > > > set the hilitedButton of the long id of me to tNum > > > > I didn't do it from an openStack script, but from the message box while > on > > another card. > > > > Thanks, > > Brian > > > > On Fri, Mar 9, 2018 at 8:10 PM Peter Bogdanoff via use-livecode < > > use-livecode@lists.runrev.com> wrote: > > > > > Yes, it works great if you are on the card, not if you are somewhere > > else. > > > > > > > > > > On Mar 9, 2018, at 6:03 PM, Mike Bonner via use-livecode < > > > use-livecode@lists.runrev.com> wrote: > > > > > > > > Nevermind. Another card. DOH > > > > > > > > On Fri, Mar 9, 2018 at 6:59 PM, Mike Bonner > > wrote: > > > > > > > >> What version? Its working for me in 9 dp11 by using either dispatch > > or > > > >> send to the group. > > > >> > > > >> In the group: > > > >> command doit pbtn > > > >> set the hilitedbutton of me to pbtn > > > >> end doit > > > >> > > > >> And from the message box.. > > > >> > > > >> send ("doit" && 2) to group 1 > > > >> or > > > >> dispatch "doit" to group 1 with 3 > > > >> > > > >> > > > >> On Fri, Mar 9, 2018 at 6:23 PM, Peter Bogdanoff via use-livecode < > > > >> use-livecode@lists.runrev.com> wrote: > > > >> > > > >>> I learned something today. > > > >>> > > > >>> I was trying by script to set the hilite of a radio button in a > group > > > on > > > >>> another card. > > > >>> > > > >>> My script is in the group “Language Choice” which is called by > > > openStack. > > > >>> I’m thinking that “me” would operate on the group: > > > >>> > > > >>>set the hilitedButton of me to tNum > > > >>> > > > >>> Didn’t work, even though the script received the message and > > completed. > > > >>> The radio buttons were unchanged. I modified it to this, which > > worked: > > > >>> > > > >>>set the hilitedButton of group "Language Choice" of card > > > >>> "Settings" to tNum > > > >>> > > > >>> > > > >>> I can only think that, a group, even though it is on a single card > > and > > > >>> does not have its backgroundBehavior set to true, must be referred > to > > > >>> explicitly by the name of the group and the name of the card is > > > resides in. > > > >>> Or maybe it’s because the individual buttons didn't have > sharedHilite > > > set > > > >>> to true. > > > >>> > > > >>> Peter Bogdanoff > > > >>> ArtsInteractive > > > >>> > > > >>> > > > >>> ___ > > > >>> use-livecode mailing list > > > >>> use-livecode@lists.runrev.com > > > >>> Please visit this url to subscribe, unsubscribe and manage your > > > >>> subscription preferences: > > > >>> http://lists.runrev.com/mailman/listinfo/use-livecode > > > >> > > > >> > > > >> > > > > ___ > > > > use-livecode mailing list > > > > use-livecode@lists.runrev.com > > > > Please visit this url to subscribe, unsubscribe and manage your > > > subscription preferences: > > > > http://lists.runrev.com/mailman/listinfo/use-livecode > > > > > > > > > ___ > > > use-livecode mailing list > > > use-livecode@lists.runrev.com > > > Please visit this url to subscribe, unsubscribe and manage your > > > subscription preferences: > > > http://lists.runrev.com/mailman/listinfo/use-livecode > > ___ > > use-livecode mailing list > > use-livecode@lists.runrev.com > > Please visit this url to subscribe, unsubscribe and manage your > > subscription preferences: > > http://lists.runrev.com/mailman/listinfo/use-livecode > ___ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/
Re: When me is not me
In theory that shouldn't be the problem - `the of me` should short-circuit to directly evaluating the property of the object with the behavior, rather than evaluating `me` as a name first. This is why `put the long id of me into tID` also works. Peter, in your original script are you doing set the hilitedButton of me to tNum directly, or local tMe put me into tMe set the hilitedButton of tMe to tNum ? The latter will have the 'not on the current card' problem, whereas the former should (in theory) not. On Sat, Mar 10, 2018 at 2:41 AM Brian Milby via use-livecode < use-livecode@lists.runrev.com> wrote: > I think I know what is going on. If you add a couple of put statements to > that script you will find that "me" by itself doesn't include the card or > stack. So "put me" would give something like [group "Language Choice"] > which isn't specific enough from another card. This works: > > local tID > put the long id of me into tID > set the hilitedButton of tID to tNum > > But it can be simpler: > > set the hilitedButton of the long id of me to tNum > > I didn't do it from an openStack script, but from the message box while on > another card. > > Thanks, > Brian > > On Fri, Mar 9, 2018 at 8:10 PM Peter Bogdanoff via use-livecode < > use-livecode@lists.runrev.com> wrote: > > > Yes, it works great if you are on the card, not if you are somewhere > else. > > > > > > > On Mar 9, 2018, at 6:03 PM, Mike Bonner via use-livecode < > > use-livecode@lists.runrev.com> wrote: > > > > > > Nevermind. Another card. DOH > > > > > > On Fri, Mar 9, 2018 at 6:59 PM, Mike Bonner > wrote: > > > > > >> What version? Its working for me in 9 dp11 by using either dispatch > or > > >> send to the group. > > >> > > >> In the group: > > >> command doit pbtn > > >> set the hilitedbutton of me to pbtn > > >> end doit > > >> > > >> And from the message box.. > > >> > > >> send ("doit" && 2) to group 1 > > >> or > > >> dispatch "doit" to group 1 with 3 > > >> > > >> > > >> On Fri, Mar 9, 2018 at 6:23 PM, Peter Bogdanoff via use-livecode < > > >> use-livecode@lists.runrev.com> wrote: > > >> > > >>> I learned something today. > > >>> > > >>> I was trying by script to set the hilite of a radio button in a group > > on > > >>> another card. > > >>> > > >>> My script is in the group “Language Choice” which is called by > > openStack. > > >>> I’m thinking that “me” would operate on the group: > > >>> > > >>>set the hilitedButton of me to tNum > > >>> > > >>> Didn’t work, even though the script received the message and > completed. > > >>> The radio buttons were unchanged. I modified it to this, which > worked: > > >>> > > >>>set the hilitedButton of group "Language Choice" of card > > >>> "Settings" to tNum > > >>> > > >>> > > >>> I can only think that, a group, even though it is on a single card > and > > >>> does not have its backgroundBehavior set to true, must be referred to > > >>> explicitly by the name of the group and the name of the card is > > resides in. > > >>> Or maybe it’s because the individual buttons didn't have sharedHilite > > set > > >>> to true. > > >>> > > >>> Peter Bogdanoff > > >>> ArtsInteractive > > >>> > > >>> > > >>> ___ > > >>> use-livecode mailing list > > >>> use-livecode@lists.runrev.com > > >>> Please visit this url to subscribe, unsubscribe and manage your > > >>> subscription preferences: > > >>> http://lists.runrev.com/mailman/listinfo/use-livecode > > >> > > >> > > >> > > > ___ > > > use-livecode mailing list > > > use-livecode@lists.runrev.com > > > Please visit this url to subscribe, unsubscribe and manage your > > subscription preferences: > > > http://lists.runrev.com/mailman/listinfo/use-livecode > > > > > > ___ > > use-livecode mailing list > > use-livecode@lists.runrev.com > > Please visit this url to subscribe, unsubscribe and manage your > > subscription preferences: > > http://lists.runrev.com/mailman/listinfo/use-livecode > ___ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: When me is not me
I think I know what is going on. If you add a couple of put statements to that script you will find that "me" by itself doesn't include the card or stack. So "put me" would give something like [group "Language Choice"] which isn't specific enough from another card. This works: local tID put the long id of me into tID set the hilitedButton of tID to tNum But it can be simpler: set the hilitedButton of the long id of me to tNum I didn't do it from an openStack script, but from the message box while on another card. Thanks, Brian On Fri, Mar 9, 2018 at 8:10 PM Peter Bogdanoff via use-livecode < use-livecode@lists.runrev.com> wrote: > Yes, it works great if you are on the card, not if you are somewhere else. > > > > On Mar 9, 2018, at 6:03 PM, Mike Bonner via use-livecode < > use-livecode@lists.runrev.com> wrote: > > > > Nevermind. Another card. DOH > > > > On Fri, Mar 9, 2018 at 6:59 PM, Mike Bonner wrote: > > > >> What version? Its working for me in 9 dp11 by using either dispatch or > >> send to the group. > >> > >> In the group: > >> command doit pbtn > >> set the hilitedbutton of me to pbtn > >> end doit > >> > >> And from the message box.. > >> > >> send ("doit" && 2) to group 1 > >> or > >> dispatch "doit" to group 1 with 3 > >> > >> > >> On Fri, Mar 9, 2018 at 6:23 PM, Peter Bogdanoff via use-livecode < > >> use-livecode@lists.runrev.com> wrote: > >> > >>> I learned something today. > >>> > >>> I was trying by script to set the hilite of a radio button in a group > on > >>> another card. > >>> > >>> My script is in the group “Language Choice” which is called by > openStack. > >>> I’m thinking that “me” would operate on the group: > >>> > >>>set the hilitedButton of me to tNum > >>> > >>> Didn’t work, even though the script received the message and completed. > >>> The radio buttons were unchanged. I modified it to this, which worked: > >>> > >>>set the hilitedButton of group "Language Choice" of card > >>> "Settings" to tNum > >>> > >>> > >>> I can only think that, a group, even though it is on a single card and > >>> does not have its backgroundBehavior set to true, must be referred to > >>> explicitly by the name of the group and the name of the card is > resides in. > >>> Or maybe it’s because the individual buttons didn't have sharedHilite > set > >>> to true. > >>> > >>> Peter Bogdanoff > >>> ArtsInteractive > >>> > >>> > >>> ___ > >>> use-livecode mailing list > >>> use-livecode@lists.runrev.com > >>> Please visit this url to subscribe, unsubscribe and manage your > >>> subscription preferences: > >>> http://lists.runrev.com/mailman/listinfo/use-livecode > >> > >> > >> > > ___ > > use-livecode mailing list > > use-livecode@lists.runrev.com > > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > > http://lists.runrev.com/mailman/listinfo/use-livecode > > > ___ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: When me is not me
Yes, it works great if you are on the card, not if you are somewhere else. > On Mar 9, 2018, at 6:03 PM, Mike Bonner via use-livecode > wrote: > > Nevermind. Another card. DOH > > On Fri, Mar 9, 2018 at 6:59 PM, Mike Bonner wrote: > >> What version? Its working for me in 9 dp11 by using either dispatch or >> send to the group. >> >> In the group: >> command doit pbtn >> set the hilitedbutton of me to pbtn >> end doit >> >> And from the message box.. >> >> send ("doit" && 2) to group 1 >> or >> dispatch "doit" to group 1 with 3 >> >> >> On Fri, Mar 9, 2018 at 6:23 PM, Peter Bogdanoff via use-livecode < >> use-livecode@lists.runrev.com> wrote: >> >>> I learned something today. >>> >>> I was trying by script to set the hilite of a radio button in a group on >>> another card. >>> >>> My script is in the group “Language Choice” which is called by openStack. >>> I’m thinking that “me” would operate on the group: >>> >>>set the hilitedButton of me to tNum >>> >>> Didn’t work, even though the script received the message and completed. >>> The radio buttons were unchanged. I modified it to this, which worked: >>> >>>set the hilitedButton of group "Language Choice" of card >>> "Settings" to tNum >>> >>> >>> I can only think that, a group, even though it is on a single card and >>> does not have its backgroundBehavior set to true, must be referred to >>> explicitly by the name of the group and the name of the card is resides in. >>> Or maybe it’s because the individual buttons didn't have sharedHilite set >>> to true. >>> >>> Peter Bogdanoff >>> ArtsInteractive >>> >>> >>> ___ >>> use-livecode mailing list >>> use-livecode@lists.runrev.com >>> Please visit this url to subscribe, unsubscribe and manage your >>> subscription preferences: >>> http://lists.runrev.com/mailman/listinfo/use-livecode >> >> >> > ___ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: When me is not me
Nevermind. Another card. DOH On Fri, Mar 9, 2018 at 6:59 PM, Mike Bonner wrote: > What version? Its working for me in 9 dp11 by using either dispatch or > send to the group. > > In the group: > command doit pbtn >set the hilitedbutton of me to pbtn > end doit > > And from the message box.. > > send ("doit" && 2) to group 1 > or > dispatch "doit" to group 1 with 3 > > > On Fri, Mar 9, 2018 at 6:23 PM, Peter Bogdanoff via use-livecode < > use-livecode@lists.runrev.com> wrote: > >> I learned something today. >> >> I was trying by script to set the hilite of a radio button in a group on >> another card. >> >> My script is in the group “Language Choice” which is called by openStack. >> I’m thinking that “me” would operate on the group: >> >> set the hilitedButton of me to tNum >> >> Didn’t work, even though the script received the message and completed. >> The radio buttons were unchanged. I modified it to this, which worked: >> >> set the hilitedButton of group "Language Choice" of card >> "Settings" to tNum >> >> >> I can only think that, a group, even though it is on a single card and >> does not have its backgroundBehavior set to true, must be referred to >> explicitly by the name of the group and the name of the card is resides in. >> Or maybe it’s because the individual buttons didn't have sharedHilite set >> to true. >> >> Peter Bogdanoff >> ArtsInteractive >> >> >> ___ >> use-livecode mailing list >> use-livecode@lists.runrev.com >> Please visit this url to subscribe, unsubscribe and manage your >> subscription preferences: >> http://lists.runrev.com/mailman/listinfo/use-livecode > > > ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: When me is not me
What version? Its working for me in 9 dp11 by using either dispatch or send to the group. In the group: command doit pbtn set the hilitedbutton of me to pbtn end doit And from the message box.. send ("doit" && 2) to group 1 or dispatch "doit" to group 1 with 3 On Fri, Mar 9, 2018 at 6:23 PM, Peter Bogdanoff via use-livecode < use-livecode@lists.runrev.com> wrote: > I learned something today. > > I was trying by script to set the hilite of a radio button in a group on > another card. > > My script is in the group “Language Choice” which is called by openStack. > I’m thinking that “me” would operate on the group: > > set the hilitedButton of me to tNum > > Didn’t work, even though the script received the message and completed. > The radio buttons were unchanged. I modified it to this, which worked: > > set the hilitedButton of group "Language Choice" of card > "Settings" to tNum > > > I can only think that, a group, even though it is on a single card and > does not have its backgroundBehavior set to true, must be referred to > explicitly by the name of the group and the name of the card is resides in. > Or maybe it’s because the individual buttons didn't have sharedHilite set > to true. > > Peter Bogdanoff > ArtsInteractive > > > ___ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
When me is not me
I learned something today. I was trying by script to set the hilite of a radio button in a group on another card. My script is in the group “Language Choice” which is called by openStack. I’m thinking that “me” would operate on the group: set the hilitedButton of me to tNum Didn’t work, even though the script received the message and completed. The radio buttons were unchanged. I modified it to this, which worked: set the hilitedButton of group "Language Choice" of card "Settings" to tNum I can only think that, a group, even though it is on a single card and does not have its backgroundBehavior set to true, must be referred to explicitly by the name of the group and the name of the card is resides in. Or maybe it’s because the individual buttons didn't have sharedHilite set to true. Peter Bogdanoff ArtsInteractive ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode