I've long since considered that it would be awesome to have some way for BASIC programs to use Doors CS's libraries, especially the GUI ones, considering all the nifty functionality that thinks like XLib, PicArc, Omnicalc, and Celtic enable. Up until now, I've never seriously wanted to actually implement such a thing, as I was concerned about breaking compatibility both for past versions of Doors CS, but with the introduction of full Celtic III support (plus plenty of bug fixes), I'm beginning to consider how I could add DCS GUI and possibly more support for BASIC programs. I'd have to choose a token, probably det() since real() and identity() are both overused, and more importantly, I'd have to think of a mechanism. The easiest thing I've thought of is something where the BASIC program would package up basically a GUI Stack into binary and pass it in Doors CS. Doors would render it, and return control, or in another routine, render it and then activate the mouse, returning either a chunk of data containing the stack once it finished, along with either coordinates or an index of the item clicked that stopped mouse activity. As you can see, I'm still very vague on the mechanism, so I need feedback. If you were a BASIC programmer and you were writing Doors CS programs, what features would you like access to? The GUI? The AP system? Other things? Of course, right now I have about 2KB to work with, so it should initially be something simple for me to implement, and hopefully I can optimize down my and Iambian's code and make more room to bring this to fruition, if it sounds like something people are interested in.
Hmm, being able to open a window and use text boxes and such would be nice. I can't really think of too many applications I could use DCS stuff though, without being an asm programmer and making things specific to DCS.
Personally I think access to the GUI stuff would be best. Being able to define a window area and a text string and some buttons would and stuff like that.
tifreak8x wrote:
Hmm, being able to open a window and use text boxes and such would be nice. I can't really think of too many applications I could use DCS stuff though, without being an asm programmer and making things specific to DCS.
Fair enough. Would you want to be merely able to tell Doors CS things to render and have it render them? Or would you also want to be able to invoke the mouse? Would you also want to be able to use any other DCS-specific vectors, like Runprog, for instance?

merthsoft wrote:
Personally I think access to the GUI stuff would be best. Being able to define a window area and a text string and some buttons would and stuff like that.
Excellent, that sounds like the concensus. Again, would you want to be merely able to tell Doors CS things to render and have it render them? Or would you also want to be able to invoke the mouse?
I think it would be great to invoke the mouse. I'm personally unsure how libraries work, so I'm not sure what the code would look like (or what it can look like).


EDIT: Like I mentioned in the other thread, maybe overwrite Menu( if a parameter is set in the DCS header?

If so, maybe something like
Menu(window_title,return_lbl,item1_type,item1,item1_return,[item2...]

Something like this would be massively massive, so I'm definitely not sure about the syntax because honestly I think it's just unbearable, but I came up with it on the spot.

window_title = The window title, of course
return_lbl = Label if the user presses the X in the top right
item#_type = numerical: 0=menu item,1=text input,2=button
item# = text displayed
[i]item#_return[i] = if *_type=0|2 then it will jump to the label specified. if *_type=1 then it will store the data in the variable specified.

Yeah... I don't freaking know... I'm sure there's plenty of good ideas that will be generated in the very near future.
swivelgames wrote:
I think it would be great to invoke the mouse. I'm personally unsure how libraries work, so I'm not sure what the code would look like (or what it can look like).


EDIT: Like I mentioned in the other thread, maybe overwrite Menu( if a parameter is set in the DCS header?

If so, maybe something like
Menu(window_title,return_lbl,item1_type,item1,item1_return,[item2...]

Something like this would be massively massive, so I'm definitely not sure about the syntax because honestly I think it's just unbearable, but I came up with it on the spot.

window_title = The window title, of course
return_lbl = Label if the user presses the X in the top right
item#_type = numerical: 0=menu item,1=text input,2=button
item# = text displayed
[i]item#_return[i] = if *_type=0|2 then it will jump to the label specified. if *_type=1 then it will store the data in the variable specified.

Yeah... I don't freaking know... I'm sure there's plenty of good ideas that will be generated in the very near future.
Cool! Even if not something to retain in the final version, this is definitely a good starting point in terms of ideas! I particularly like that your idea doesn't simply make a GUI translation of a TI-OS-style menu, in that it also offers text input and buttons. I think I would also like to expand this with at least checkboxes if this is the type of syntax I eventually decided upon. TI-89 / 92 / V200 users like tifreak8x, can you perchance give me some guidance on what those models do with GUIs and interface boxes, and if any of that is translatable?
Definitely would like checkbox support Smile

This might be useful to you, as it pertains to TI-89's Menu( function.
Quote:
Menu(: The Menu( command is very useful indeed. It creates a menu at the bottom of the screen just like the ones that the calculator's operating system uses. The syntax is Menu(Column#,"Title",LabelToGoto. There are five columns, corresponding with the keys [F1] through [F5]. Here is an example:
Code:
:Outpt(4,3,"Select an Option:"
:Menu(1,"Play",P,3,"About",A,5,"Quit",Q
:Lbl P
:~Code for "Play"~
:Lbl A
:~Code for "About"~
:Lbl Q
:ClLCD
~Program Quits~
In this program, "Select an Option" is displayed in the middle of the screen. A menu with three options appears at the bottom of the screen: "Play" is in the first column, "About" is in the third, and "Quit" is in the fifth. If the user presses [F1] (The key below the first option, which is "Play"), the program jumps to label P as if there were a Goto command. If the user hits [F3], it goes to label A. [F5] goes to label Q. You can have more than 5 menu options. If there are more than 5, the user simply hits the [MORE] button to see more options.
Code:
:Menu(1,"Beef",B,3,"Steak",S,5,"Peas",P,6,"Cheese",C,10,"Quit",Q
In the above program, "Beef", "Steak", and "Peas" appear in columns 1, 3, and 5. When the user hits [MORE], "Cheese" appears in column 1 and Quit appears in column 5. Try it out, as this command is very useful.
Source: http://ti86world.tripod.com/programming/chapter04.htm
TI-86, you mean? Smile Still a good point, though. I think I'd ideally like to use more than the bottom of the screen though. Hmm, idea, if I did this, I should probably use the first argument of Menu( to specify whether it is a large window, small window, or invisible window, no?
I you implement mouse control, give control to the TIB programmer; for example, if I click a checkbox, don't have DCS "check" the box, let MY code do that.

All I would need would be rendering routines, and a way (like real(14) for xLib ) to check if an applicable version of DCS is installed (and if not, allow my code to display a message and quit)
rthprog wrote:
If you implement mouse control, give control to the TIB programmer; for example, if I click a checkbox, don't have DCS "check" the box, let MY code do that.
Oh, really? So if a checkbox was clicked, return to the BASIC code and tell you about it, and then let you choose to modify the data passed to make it a checked checkbox, and rerender and re-mouse?

rthprog wrote:
All I would need would be rendering routines, and a way (like real(14) for xLib ) to check if an applicable version of DCS is installed (and if not, allow my code to display a message and quit)
Indeed, I'll probably implement some form of the real(0) trick.
Just providing scrolling menus would be extremely useful.

One menu could scroll like the Math or Prgm menus but is displayed with the font size used by Text(
and one that uses the mouse and has a scroll bar

For syntax I was thinking it would be more like the regular menu command but with one more parameter at the end:

Code:
:Menu("Menu Heading","Option 1",1,"Option 2",2,1
:"for scrolling menu
:Menu("Menu Heading","Option 1",1,"Option 2",2,2
:"for mouse menu
KermMartian wrote:
rthprog wrote:
If you implement mouse control, give control to the TIB programmer; for example, if I click a checkbox, don't have DCS "check" the box, let MY code do that.
Oh, really? So if a checkbox was clicked, return to the BASIC code and tell you about it, and then let you choose to modify the data passed to make it a checked checkbox, and rerender and re-mouse?
I think that's a bad call unless you plan to make custom check boxes. If not DCS should return a list (in the order of the boxes) of what boxes were checked, such as {0, 1, 1, 0, 1, ...} for boxes 2, 3 & 5.

Or, or, or!!! Take input from a matrix, and how that matrix is created, is how the items are displayed. The user creates a matrix in [A] and it could look something like:

Code:
[1 0]
[0 0]
And where there's a 1 in the matrix, the checkbox is pre-checked. After the user (un)checks boxes in DCS, a new matrix [A] is returned with updated values.

I just don't know where you'd get labels for the boxes? perhaps a modified Menu(?

Semi-related, how far can you modify these functions? Maybe you don't want to return and execute Menu as normal but instead return a value have the user determine which label to goto. So the Syntax for Menu( & Checkboxes could look like

Code:
:Menu("What Systems Do You Have?",c,[A],"PS3","XBOX360","WII","PC","HANDHELD")
:Lines to execute after returning control to Program

Where 'c' would stand for check, 'r' for radio, 'L' for list, etc.

I also recall the Menu( supporting Tabs?
Great ideas Alex. I definitely agree with the list idea for text boxes, etc...

However, what about return values for strings and the like?

We're definitely onto something here, though Smile
ti84p wrote:
Just providing scrolling menus would be extremely useful.


Agreed. I wonder if caching is possible... for example, when one scrolls through a list of programs >100 prgms, I've found that it's best to retrieve program names as the user scrolls rather than trying to get them all beforehand (at least in basic)
My concern with something like that is that it's too restrictive. I'd like people to be able to, for example, make titlescreens with images and buttons arranged haphazardly, and have the user click on the button(s) of their choice, for instance, and I'm afraid something like what you guys are describing might prohibit that. Any thoughts? It's also possible that I'm overthinking what BASIC programmers might actually want to do, since it's a long time since I used BASIC. Smile
swivelgames wrote:
Great ideas Alex. I definitely agree with the list idea for text boxes, etc...

However, what about return values for strings and the like?

We're definitely onto something here, though Smile
All DCS would return is what was selected. It'd be pointless to send return values (Strings) to DCS only to have it return one or more back. So, having the program check a return matrix/list for on & off values and going from there.

What is your opinion on the Matrix rather than a list? I for one, would rather prefer a list as BASIC can't use custom matrices.

Regrading it being to restrictive. I've seen far too many non-graphical programs to believe a lot of starting users don't know how to work with the graph screen. And if you provide them with simple tutorials on how to use the graph screen via DCS (such as "Menu(") we might start to see more visually appealing programs.



As for letting a user construct a graph menu of their design, perhaps then a real(#,# would be used instead. This would allow both restrictive and unrestrictive title-screens.
These aren't bad ideas, and I'm starting to formulate more ideas on this count. Putting the GUI-based stuff aside for a second, what about the AP system? Is there any point trying to expose the Associated Program system to BASIC programs, or am I just asking for trouble? Perhaps I should let people stick to CelticIII for editing programs and appvars from BASIC programs?
Hmm, I like the idea actually, how exactly are you thinking about implementing it?
Eeems wrote:
Hmm, I like the idea actually, how exactly are you thinking about implementing it?
I was thinking I would use one of the existing tokens, for example Celtic's det() token, or a new DCS-specific token. Doors CS lets ASM programs FileOpen, FileSave, and FileSaveAs files, so I would have to expose all three of these to BASIC programs. The only problem is that I'm not sure exactly how to deal with passing data around. For FileSave and FileSaveAs, I know that the filename needs to be a string, but what about the {data pointer, data size}? Do I pass a string for that too, or what? It would be better to still return or pass pointers and size words, but I don't really know how willing programmers are to use provisions in Celtic III, for example, to directly modify memory.
KermMartian wrote:
If you were a BASIC programmer and you were writing Doors CS programs, what features would you like access to?


gCn.

EDIT: Assuming, of course, that you're stuck on this calculator thing and refuse to continue work on Multiplicity.
  
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 2
» 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

 

Advertisement