Re: How to access scripts on a modal card that is stuck / not visible?

2022-03-18 Thread Keith Clarke via use-livecode
Thanks all for the hints and tips. I was able to access the guilty scripts from 
the message bar using edit script of  Thanks Jaque!

As this is just for a personal utility, I’ve made the Browser widget (which is 
only used for login) act as a rough and ready ‘modal dialogue’...
- Browser widget sized to cover all clickable elements on the card other than a 
“Cancel” button, with its visible set to false
- “Login” button with script to set the visible of control “Browser” to true 
and then build and set its authorisation request URL and headers
- Browser widget script with browserNavigateComplete to confirm arrival at the 
post-authentication callback URL and then set the access_token of the stack 
(for global access) and set the visible of control “Browser” to false

Seems to work OK, so now I can concentrate on the web service data - and the 
reason why I started building the stack!
Best,
Keith 

> On 18 Mar 2022, at 17:23, J. Landman Gay via use-livecode 
>  wrote:
> 
> Modes are only for stacks and can't be used for individual cards. It sounds 
> like the whole stack is going modal. There are several ways to edit a script 
> for a control.
> 
> 1. Click the script lines in the project browser, or right click the control 
> in the app browser and choose "edit script".
> 2. In the message box: edit script of . I.e., edit script of btn 1
> 3. Turn off messages in the toolbar. Then you can edit scripts as usual.
> 4. Choose the edit tool, right click the control, choose to edit the script.
> 5. If the stack is already in modal mode, use the message box to: toplevel 
> . Or Cmd-Opt-Shift click the stack and choose toplevel from the 
> Mode menu item. (I assume on Windows that's control-alt-shift.)
> 
> There are also other keyboard shortcuts but those should get you started. 
> Since the mode doesn't change unless you click the button, you should be able 
> to edit the script normally if you don't do that.
> 
> You can display a substack as a modal login, or use a group on the current 
> card.
> 
> --
> Jacqueline Landman Gay | jac...@hyperactivesw.com
> HyperActive Software | http://www.hyperactivesw.com

___
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: How to access scripts on a modal card that is stuck / not visible?

2022-03-18 Thread J. Landman Gay via use-livecode
Modes are only for stacks and can't be used for individual cards. It sounds 
like the whole stack is going modal. There are several ways to edit a 
script for a control.


1. Click the script lines in the project browser, or right click the 
control in the app browser and choose "edit script".

2. In the message box: edit script of . I.e., edit script of btn 1
3. Turn off messages in the toolbar. Then you can edit scripts as usual.
4. Choose the edit tool, right click the control, choose to edit the script.
5. If the stack is already in modal mode, use the message box to: toplevel 
. Or Cmd-Opt-Shift click the stack and choose toplevel from the 
Mode menu item. (I assume on Windows that's control-alt-shift.)


There are also other keyboard shortcuts but those should get you started. 
Since the mode doesn't change unless you click the button, you should be 
able to edit the script normally if you don't do that.


You can display a substack as a modal login, or use a group on the current 
card.


--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
On March 18, 2022 5:31:04 AM Keith Clarke via use-livecode 
 wrote:


1. What’s the syntax needed to open the script of an un-open object via the 
message box, so I can break out of this loop?
2. Can anyone please suggest a worked example or lesson of a pop-up web 
service login dialogue, as I’m clearly doing something basic wrong!





___
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: How to access scripts on a modal card that is stuck / not visible?

2022-03-18 Thread Bob Sneidar via use-livecode
I wasn't aware a card could be made modal as opposed to a stack. I have a 
separate substack for logging in, so I go stack "Login" as modal. That works 
for me. 

Bob S


> On Mar 18, 2022, at 03:28 , Keith Clarke via use-livecode 
>  wrote:
> 
> Hi folks,
> Experimenting with OAuth, I built a “Login” card containing a Browser widget 
> that allows me to access OAuth to log onto an online service. Once 
> authorised, the script on the Browser Widget finished with 'go card “Home”’ 
> where I’m building out some utilities to work with the web service.
> 
> The web service’s access token is short-lived, so I thought I’d convert the 
> Login card into a pop-up dialogue on the Home card for convenience. So, I 
> added a “Login” button to that card to ‘go card “Login” as modal. However, 
> now any attempt to go to the Login card results in either the card flashing 
> up and disappearing or the stack locking with the modal card inaccessible. I 
> seem to have created some kind of loop that is in play in run or edit modes. 
> 
> I’ve not done much with multiple card stacks and never used modes before. So, 
> I have two questions:
> 
> 1. What’s the syntax needed to open the script of an un-open object via the 
> message box, so I can break out of this loop?
> 2. Can anyone please suggest a worked example or lesson of a pop-up web 
> service login dialogue, as I’m clearly doing something basic wrong!
> 
> 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


Re: How to access scripts on a modal card that is stuck / not visible?

2022-03-18 Thread Tom Glod via use-livecode
Hey Keith,

I could probably help you with the first part, but I'd have to take a look
myself at the file. Are you able to share it with me?
Feel free to email.

On Fri, Mar 18, 2022 at 6:29 AM Keith Clarke via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Hi folks,
> Experimenting with OAuth, I built a “Login” card containing a Browser
> widget that allows me to access OAuth to log onto an online service. Once
> authorised, the script on the Browser Widget finished with 'go card “Home”’
> where I’m building out some utilities to work with the web service.
>
> The web service’s access token is short-lived, so I thought I’d convert
> the Login card into a pop-up dialogue on the Home card for convenience. So,
> I added a “Login” button to that card to ‘go card “Login” as modal.
> However, now any attempt to go to the Login card results in either the card
> flashing up and disappearing or the stack locking with the modal card
> inaccessible. I seem to have created some kind of loop that is in play in
> run or edit modes.
>
> I’ve not done much with multiple card stacks and never used modes before.
> So, I have two questions:
>
> 1. What’s the syntax needed to open the script of an un-open object via
> the message box, so I can break out of this loop?
> 2. Can anyone please suggest a worked example or lesson of a pop-up web
> service login dialogue, as I’m clearly doing something basic wrong!
>
> 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


How to access scripts on a modal card that is stuck / not visible?

2022-03-18 Thread Keith Clarke via use-livecode
Hi folks,
Experimenting with OAuth, I built a “Login” card containing a Browser widget 
that allows me to access OAuth to log onto an online service. Once authorised, 
the script on the Browser Widget finished with 'go card “Home”’ where I’m 
building out some utilities to work with the web service.

The web service’s access token is short-lived, so I thought I’d convert the 
Login card into a pop-up dialogue on the Home card for convenience. So, I added 
a “Login” button to that card to ‘go card “Login” as modal. However, now any 
attempt to go to the Login card results in either the card flashing up and 
disappearing or the stack locking with the modal card inaccessible. I seem to 
have created some kind of loop that is in play in run or edit modes. 

I’ve not done much with multiple card stacks and never used modes before. So, I 
have two questions:

1. What’s the syntax needed to open the script of an un-open object via the 
message box, so I can break out of this loop?
2. Can anyone please suggest a worked example or lesson of a pop-up web service 
login dialogue, as I’m clearly doing something basic wrong!

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