Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 01:28 03 May 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : 100+ GUI elements?

Author Message
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9066
Posted: 01:22am 23 Dec 2016
Copy link to clipboard 
Print this post

Hi all.

Is there any way to add more then 100 GUI elements?
I have just about used them all up, and I am only about half way through writing the code.

As the code is entirely menu driven(11 GUI pages so far), deleting ANY defined GUI elements is a recipe for disaster, as the code will promptly fall over when it tries to display a page with elements that have been deleted or something of a nightmare to debug if elements are being re-used across different pages.

Anyone got any ideas?

Increasing the number of available GUI elements would be the best solution.
I don't suppose there is a MMBASIC memory address I can POKE to increase this number is there?

Probably not, but you never know unless you ask.
Smoke makes things work. When the smoke gets out, it stops!
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8592
Posted: 01:57am 23 Dec 2016
Copy link to clipboard 
Print this post

Grogster:

I'll back you on this one. Geoff, can this limit be increased in 5.3 please?
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3165
Posted: 08:09am 23 Dec 2016
Copy link to clipboard 
Print this post

Increasing the table size will consume more RAM but it should be not drastic. What is the consensus? Would 200 entries be enough?

The best answer would be to make the table size dynamic but that would be a lot more complex.

Geoff
Geoff Graham - http://geoffg.net
 
WhiteWizzard
Guru

Joined: 05/04/2013
Location: United Kingdom
Posts: 2794
Posted: 08:31am 23 Dec 2016
Copy link to clipboard 
Print this post

Geoff,

IMHO if you make it fixed (as you did previously), then for some people this will be fine, but for others then they will need more (Damned-if-you-do, damed-if-you-don't scenario!!). So dynamic is definitely 'best', but at the overhead of more work at your end!

I must admit I also ran out of GUIs in the early days when trying to do 'tabbed menus'. Some things really are best left for the user to decide. . . .

For everything Micromite visit micromite.org

Direct Email: whitewizzard@micromite.o
 
Phil23
Guru

Joined: 27/03/2016
Location: Australia
Posts: 1664
Posted: 08:39am 23 Dec 2016
Copy link to clipboard 
Print this post

  Geoffg said  The best answer would be to make the table size dynamic but that would be a lot more complex.

Geoff


Regards dynamic table size,

Would OPTION GUI ELEMENTS 150 etc be feasible?

User could then specify a size around what they require.

Phil
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9066
Posted: 11:29am 23 Dec 2016
Copy link to clipboard 
Print this post

I like Phil's idea, but weather that is doable is something only Geoff and Peter would know.

I have re-sorted my elements, and now have about 30-odd spare ones I did not have yesterday. I changed my GUI elements to use strings for the captions instead of pre-defined text when setting up the pages, then I can set the text to what I want with the CTRLVAL= command just before I call that page. That has allowed me to free up all the captions that were in the same place on a page, but different messages, so that one GUI CAPTION element(or set of) does ALL of those messages, just by changing the string it uses before calling the page that shows that caption.

So, this is a learning experience for me too - learning how to deal with GUI elements is new to me, but I am enjoying the process so far, and once you get a handle on GUI INTERRUPT and how to layout the controls on the screen, MMBASIC doing all the GUI management in the background makes writing the actual code to do the useful stuff almost a pleasure in it's simplicity.
Smoke makes things work. When the smoke gets out, it stops!
 
Phil23
Guru

Joined: 27/03/2016
Location: Australia
Posts: 1664
Posted: 03:15pm 24 Dec 2016
Copy link to clipboard 
Print this post

  Grogster said   I like Phil's idea, but weather that is doable is something only Geoff and Peter would know.


IF it is doable, it would be great if OPTION LIST could return something like this:-

GUI ELEMENTS 60/100,
but I understand that would be increasing complexity.

Phil.
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024