Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 946 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Remove button and/or digit from panel #336710
08/05/10 19:47
08/05/10 19:47
Joined: Sep 2009
Posts: 993
Budapest
Aku_Aku Offline OP
User
Aku_Aku  Offline OP
User

Joined: Sep 2009
Posts: 993
Budapest
How can i remove a button and/or a digit from panel?

Re: Remove button and/or digit from panel [Re: Aku_Aku] #336713
08/05/10 19:54
08/05/10 19:54
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
AFAIK, its not possible.

BUT, if I have the need, I set its data(digit) or bmaps(button) to NULLs,
and move it to x_pos = -100, y_pos = -100.




Last edited by EvilSOB; 08/05/10 19:55.

"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: Remove button and/or digit from panel [Re: EvilSOB] #336716
08/05/10 20:05
08/05/10 20:05
Joined: Sep 2009
Posts: 993
Budapest
Aku_Aku Offline OP
User
Aku_Aku  Offline OP
User

Joined: Sep 2009
Posts: 993
Budapest
Could say, not so dynamic...
Anyway thank the quick reply.
Maybe another feature what should implement in A8.

What will happen if i create a digit to show the value of skill of entity, and i delete the entity?
It will cause a crash?

Last edited by Aku_Aku; 08/05/10 20:19.
Re: Remove button and/or digit from panel [Re: Aku_Aku] #336724
08/05/10 20:34
08/05/10 20:34
Joined: May 2007
Posts: 2,043
Germany
Lukas Offline

Programmer
Lukas  Offline

Programmer

Joined: May 2007
Posts: 2,043
Germany
"What will happen if i create a digit to show the value of skill of entity, and i delete the entity?
It will cause a crash?"
I guess so. If you are "lucky" it won't crash, but you get unpredictable behaviour.


If you want to be able to dynamically create and destroy buttons, you can use my LBGUI (link in my signature). wink

Re: Remove button and/or digit from panel [Re: Aku_Aku] #336725
08/05/10 20:35
08/05/10 20:35
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
I just tested the deleted-entity scenario, and the value just drops to Zero.


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: Remove button and/or digit from panel [Re: EvilSOB] #336739
08/05/10 22:15
08/05/10 22:15
Joined: Sep 2009
Posts: 993
Budapest
Aku_Aku Offline OP
User
Aku_Aku  Offline OP
User

Joined: Sep 2009
Posts: 993
Budapest
I observed a strange situation.
After i created and "deleted" more than 550 buttons and cca. 180 digits, my program was frozen. It was started from SED.
The program devoured cca. 900 MB memory.
What should be the solution?

Re: Remove button and/or digit from panel [Re: Aku_Aku] #336747
08/05/10 22:54
08/05/10 22:54
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
GAH!

Ok, if you are going to be creating and deleting that many,
it may be worth your while trying to find a way to 'remember'
any buttons or digits that have been hidden/deleted,
and re-using them instead of creating new ones...

Say, for example, creating an array for no-longer-used buttons,
and another for no-longer-used digits, storing their element number...

Then using pan_setbutton and pan_setdigits to "modify" the old, hidden
buttons/digits to their new use...


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: Remove button and/or digit from panel [Re: Lukas] #336774
08/06/10 07:01
08/06/10 07:01
Joined: Sep 2009
Posts: 993
Budapest
Aku_Aku Offline OP
User
Aku_Aku  Offline OP
User

Joined: Sep 2009
Posts: 993
Budapest
Nice work.
But actually i try to implement a treeview. As i can see, your demo doesn't contain such a form/control.

So i have to modify my application to work like EvilSOB proposed too.

Re: Remove button and/or digit from panel [Re: Aku_Aku] #336802
08/06/10 12:36
08/06/10 12:36
Joined: Mar 2004
Posts: 206
The Netherlands
R
Roy Offline
Member
Roy  Offline
Member
R

Joined: Mar 2004
Posts: 206
The Netherlands
I don't know exactly what is possible, but you could try to experiment with the pan_setbutton command. It's an easy way to empty button, but i don't think you can completely remove buttons with it..

Re: Remove button and/or digit from panel [Re: Roy] #336987
08/07/10 11:44
08/07/10 11:44
Joined: Sep 2009
Posts: 993
Budapest
Aku_Aku Offline OP
User
Aku_Aku  Offline OP
User

Joined: Sep 2009
Posts: 993
Budapest
I solved the problem with a constant button set, and redefines in loops.


Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1