Re: Correct use of string A 'is in' string B?

2020-10-14 Thread Keith Clarke via use-livecode
Indeed. The joy of web services integration projects - sometimes there are more 
standards and variations of words than characters in a crime drama! :)
Best,
Keith

> On 14 Oct 2020, at 12:25, Tore Nilsen via use-livecode 
>  wrote:
> 
> You should not be to embarrassed. There is a particular reason why I spotted 
> this. I think we have all been there at one time or another.
> 
> Best regards
> Tore
> 
>> 14. okt. 2020 kl. 13:22 skrev Keith Clarke via use-livecode 
>> :
>> 
>> Oh, dear - that's embarrassing! Thanks Tore - time to take a break and check 
>> for updates on my eyeball firmware! :-D
>> Best,
>> Keith
>> 
>>> On 14 Oct 2020, at 12:04, Tore Nilsen via use-livecode 
>>>  wrote:
>>> 
>>> In the url itself you use access_token but in your search you use 
>>> access_code. May this be the reason for your problems?
>>> 
>>> Best regards
>>> Tore Nilsen
>>> 
 14. okt. 2020 kl. 13:00 skrev Keith Clarke via use-livecode 
 :
 
 Hi folks,
 Am I misreading the docs and abusing the 'is in' logic or syntax here...?
 
 In my test case, the browser widget URL takes the form (truncated) 
 https://somewhere.com/callback.lc#access_token=0123456789&;...
 
 This is visible in the field "ResponseURL" but the if statement is not 
 firing. 
 
 Is this a syntax or logic error on my part?
 on browserNavigateComplete
 
 get the URL of widget "Browser" 
 put it into field "ResponseURL" 
 
 # Update Access Token
 
 put it into tURL
 
 if "access_code" is in tURL then
 
 put tURL
 
 do UpdateAccessToken(tURL)
 
 end if
 
 get the HTMLText of widget "Browser" 
 
 put it into field "Content" 
 
 end browserNavigateComplete
 
 BTW I've also tried the inverse if 'tURL contains 'access_code" 
 
 Thanks & regards,
 Keith
 ___
 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: Correct use of string A 'is in' string B?

2020-10-14 Thread Tore Nilsen via use-livecode
You should not be to embarrassed. There is a particular reason why I spotted 
this. I think we have all been there at one time or another.

Best regards
Tore

> 14. okt. 2020 kl. 13:22 skrev Keith Clarke via use-livecode 
> :
> 
> Oh, dear - that's embarrassing! Thanks Tore - time to take a break and check 
> for updates on my eyeball firmware! :-D
> Best,
> Keith
> 
>> On 14 Oct 2020, at 12:04, Tore Nilsen via use-livecode 
>>  wrote:
>> 
>> In the url itself you use access_token but in your search you use 
>> access_code. May this be the reason for your problems?
>> 
>> Best regards
>> Tore Nilsen
>> 
>>> 14. okt. 2020 kl. 13:00 skrev Keith Clarke via use-livecode 
>>> :
>>> 
>>> Hi folks,
>>> Am I misreading the docs and abusing the 'is in' logic or syntax here...?
>>> 
>>> In my test case, the browser widget URL takes the form (truncated) 
>>> https://somewhere.com/callback.lc#access_token=0123456789&;...
>>> 
>>> This is visible in the field "ResponseURL" but the if statement is not 
>>> firing. 
>>> 
>>> Is this a syntax or logic error on my part?
>>> on browserNavigateComplete
>>> 
>>> get the URL of widget "Browser" 
>>> put it into field "ResponseURL" 
>>> 
>>> # Update Access Token
>>> 
>>> put it into tURL
>>> 
>>> if "access_code" is in tURL then
>>> 
>>> put tURL
>>> 
>>> do UpdateAccessToken(tURL)
>>> 
>>> end if
>>> 
>>> get the HTMLText of widget "Browser" 
>>> 
>>> put it into field "Content" 
>>> 
>>> end browserNavigateComplete
>>> 
>>> BTW I've also tried the inverse if 'tURL contains 'access_code" 
>>> 
>>> Thanks & regards,
>>> Keith
>>> ___
>>> 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: Correct use of string A 'is in' string B?

2020-10-14 Thread Keith Clarke via use-livecode
Oh, dear - that's embarrassing! Thanks Tore - time to take a break and check 
for updates on my eyeball firmware! :-D
Best,
Keith

> On 14 Oct 2020, at 12:04, Tore Nilsen via use-livecode 
>  wrote:
> 
> In the url itself you use access_token but in your search you use 
> access_code. May this be the reason for your problems?
> 
> Best regards
> Tore Nilsen
> 
>> 14. okt. 2020 kl. 13:00 skrev Keith Clarke via use-livecode 
>> :
>> 
>> Hi folks,
>> Am I misreading the docs and abusing the 'is in' logic or syntax here...?
>> 
>> In my test case, the browser widget URL takes the form (truncated) 
>> https://somewhere.com/callback.lc#access_token=0123456789&;...
>> 
>> This is visible in the field "ResponseURL" but the if statement is not 
>> firing. 
>> 
>> Is this a syntax or logic error on my part?
>> on browserNavigateComplete
>> 
>> get the URL of widget "Browser" 
>> put it into field "ResponseURL" 
>> 
>> # Update Access Token
>> 
>> put it into tURL
>> 
>> if "access_code" is in tURL then
>> 
>> put tURL
>> 
>> do UpdateAccessToken(tURL)
>> 
>> end if
>> 
>> get the HTMLText of widget "Browser" 
>> 
>> put it into field "Content" 
>> 
>> end browserNavigateComplete
>> 
>> BTW I've also tried the inverse if 'tURL contains 'access_code" 
>> 
>> Thanks & regards,
>> Keith
>> ___
>> 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: Correct use of string A 'is in' string B?

2020-10-14 Thread Tore Nilsen via use-livecode
In the url itself you use access_token but in your search you use access_code. 
May this be the reason for your problems?

Best regards
Tore Nilsen

> 14. okt. 2020 kl. 13:00 skrev Keith Clarke via use-livecode 
> :
> 
> Hi folks,
> Am I misreading the docs and abusing the 'is in' logic or syntax here...?
> 
> In my test case, the browser widget URL takes the form (truncated) 
> https://somewhere.com/callback.lc#access_token=0123456789&;...
> 
> This is visible in the field "ResponseURL" but the if statement is not 
> firing. 
> 
> Is this a syntax or logic error on my part?
> on browserNavigateComplete
> 
> get the URL of widget "Browser" 
> put it into field "ResponseURL" 
> 
> # Update Access Token
> 
> put it into tURL
> 
> if "access_code" is in tURL then
> 
> put tURL
> 
> do UpdateAccessToken(tURL)
> 
> end if
> 
> get the HTMLText of widget "Browser" 
> 
> put it into field "Content" 
> 
> end browserNavigateComplete
> 
> BTW I've also tried the inverse if 'tURL contains 'access_code" 
> 
> Thanks & regards,
> Keith
> ___
> 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


Correct use of string A 'is in' string B?

2020-10-14 Thread Keith Clarke via use-livecode
Hi folks,
Am I misreading the docs and abusing the 'is in' logic or syntax here...?

In my test case, the browser widget URL takes the form (truncated) 
https://somewhere.com/callback.lc#access_token=0123456789&;...

This is visible in the field "ResponseURL" but the if statement is not firing. 

Is this a syntax or logic error on my part?
on browserNavigateComplete

get the URL of widget "Browser" 
put it into field "ResponseURL" 

# Update Access Token

put it into tURL

if "access_code" is in tURL then

put tURL

do UpdateAccessToken(tURL)

end if

get the HTMLText of widget "Browser" 

put it into field "Content" 

end browserNavigateComplete

BTW I've also tried the inverse if 'tURL contains 'access_code" 

Thanks & regards,
Keith
___
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