I now have a relatively good understanding of the GUI stack using DCSB libs, however I want to give my programs more interactivity by allowing the user to interact with buttons that have been pushed to the GUI.

The problem is, I am unsure of how to provide this interactivity. My question is; supposing I push a button onto the GUI stack, how can I provide some interactivity to allow an event to happen?

Pseudo-code is as follows:

If Button Is Pressed By User:

Do Event

If anyone is able to help, would you mind BBCoding a couple of lines of exemplar TI-BASIC code so I can see how to create a statement in order to incorporate this technique into my programs?

Many thanks
From a high-level view, here's what the flow for using the Doors CS GUI looks like:

1) Push things like windows, hotspots, buttons, input fields, etc onto the GUI stack.
2) Run the GUIMouse
3) When the GUIMouse ends, something will have been clicked. Check what it was.

I'll edit this later. And here's the edit: Take a look at the documentation on DCSBLibs: GUIMouse. It explains what the TRIGGER index in the output from GUIMouse means. You normally call GUIMouse, wait for it to end, act on whatever happened (ie, something was clicked), then if you want the user to continue interacting with the GUI, you call GUIMouse again.
Which is to say: there's no "event handling" per se, all of the routines are synchronous, and only return after what was supposed to happen has happened. You can check their return values for information, but while GUIMouse is running, your code is not.
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum