[Archived]
When you're using the GUI stack with Doors, you need to call a function that will render the stack. There are two functions that do so: RenderGUI and GUIMouse. Assuming you want the user to use the mouse for input, you should use GUIMouse after all the GUI elements are pushed to the stack. See this page for more information on what the different arguments of GUIMouse are.
ok, thanks!
How should I format this? Should I have the GUIMouse after return:end or where? Because it shows a blank screen when I go to test it.


Code:
:DCS6
"0000000000000000000039002500230821142124214411840F040108011001E0
If 1337!=det([[42
Then
   Disp "Incompatible","DCS7+ Required","dcs.cemetech.net
Return:End
sum(12,39.5,5,4
sum(7,2,8,8,"50A8885020","PocketLife v60.1
sum(7,5,32
sum(7,4,3,1,0,"First Name
sum(7,4,44,1,0,"Last Name
sum(7,7,40,21,"New Life
sum(7,4,7,32,0,"LIVE.DIE.REPEAT.
sum(7,9,3,8,26,8,""
sum(7,9,44,8,26,8,""
Disp "PocketLife v0.1","BY BASIC Studios
You should put GUIMouse right after all of the GUI elements you want to display are pushed to the stack; in this case you should put it right after the last sum(7) command you have.
ok. Thank you! I'll try it out.
Forum etiquette note: if you have the last post in a topic, and it's within 24 hours of your post, edit your post instead of replying (what you've done is called double-posting, and it's frowned upon).

The flow looks something like:
  1. Open the GUI stack (sum(9), which should go before all your PushGUIStack calls)
  2. Call PushGUIStack a bunch of times (as you've done)
  3. Call GUIMouse, which will render the mouse and let you click on things
  4. It will return most of what you want in Ans - see the GUIMouse page. The fourth and last element will tell you what was clicked - until you get the hang of the GUI stack, I recommend displaying the value of that element to understand what clicking different things does.
When I try to move the mouse, the last piece of code (the disp part) shows on top and I cant do anything. How do I resolve this?
ClrHome before you open the GUIStack.
ok, thank you!

Edit: When I click the left button the disp shows again.
Yes, that is a problem I ran into with jsTIfied, but with Wabbitemu it worked right, so I think it is a jsTIfied bug.
oh, ok.
EDIT: what about making a functional GUIButtonText. How do I make it so for example:

Code:
If
button clicked=1
then
-opens gui-
You just create the button by pushing it to the GUI stack, and when GUIMouse returns, the number in the four element of Ans will be something specific if that button was clicked (instead of the close button on the window being clicked). If the button is the 6th item you pushed to the GUI stack, that value will be 6.
What are those things below your replies? How do I get it? (the ticalc.org user, etc.)

Edit: also I donít understand what you just said.

Edit 2: I didnít understand anything. Whatís ans how do you program it, etc.
The Ans variable is usually filled with the result of the last calculation performed - if either on the homescreen or in your program you have a computation on a line by itself, the result will be stored in Ans. For example, :3 in a BASIC program stores 3 in Ans, 4*50->X stores 200 in both X and Ans, 6A^2->B stores 6*A^2 in both B and Ans, etc.

Doors CS (and other libraries) use Ans as a way to pass arguments into functions and get results out again. In fact, Ans can be one of many data types, depending on what the last computation was. It can be a scalar (number), a list, a string, etc. The GUIMouse call makes it a 4-element list; in TI-BASIC, you access elements of list with parentheses, so L1(1) is the first element of list L1, Ans(4) is the fourth element of Ans (if Ans contains a list), etc.

If you're brand-new to TI-BASIC, I recommend taking a look at tifreak8x's BASIC tutorial archive and biasedly, my Programming the TI-83 Plus/TI-84 Plus book.
Oh! I understand now! Thanks!

Edit: So is this correct?:

Code:
If ans(4)=5
   sum(9
   sum(7,2,8,8,"0040004040","Information
   sum(7,5,32
  
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 GMT - 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

 

Advertisement