Jump to content
  • 0
rje

Screen content management, in BASIC

Question

THE FUZZY PROBLEM

I've divided the screen into a few areas.  Call them windows or something.  

Each window represents a view into some data in my program.  Often they are lists, and I feel like I ought to have a generic handler to manage this.

Tell me your thoughts, including if you think this is over-optimization.

 

ONE FUZZY SOLUTION

Arrays.  Shove everything into arrays and deal with it that way.  For example, the metadata required to define all my windows of list data might be:

(WARNING: pseudocode follows)
// index is the window number.
dim window_top(n)
dim window_left(n)
dim window_width(n)
dim window_height(n)
dim window_lines$(n,30)
dim selected_line_of_data(n)

Right?  And then all I'd need is a subroutine that uses some index variable to draw the appropriate window.


Insane, you might say?  I'm overthinking it?  Or not thinking enough?  Anyone?

 

Attached is the bare frame with nearly no content...

 

Screen Shot 2020-10-09 at 8.57.56 AM.png

Edited by rje

Share this post


Link to post
Share on other sites

1 answer to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

Please review our Terms of Use