aldweb

Close I. aldweb

Close II. PC Freeware

Close III. Palm Freeware

Close IV. Palm Shareware

Close V. iziBasic Palm

Close VI. Palm Knowledge

Close VII. Pocket Computer

Close VIII. miniPortail

Special !



Mobile version of
the aldweb Site

m.aldweb.com


Neither French, nor English?

Try one of these flags then:
[de] [es] [it] [pt]
Search




Weather / Spam / www

Lyon Weather


aldweb against spam


Newsletter
To receive news about this website, consider subscribing to our Newsletter.
Subscribe
Unsubscribe
298 Subscribers
Family's web sites

Webmaster - Infos
Friends News
Visits

   visitors

   visitors online

Poll
What do you think of the new design of the aldweb Site?
 
Great !
Beautiful
Average
So ugly...
Results
forum.gifForum - iziBasic - Topic #1467

Forum - Forum
iziBasic - iziBasic


Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 257

active  Topic # 1467  pushbutton text bug?

26/10/2006 @ 01:24
by Dave O\'Brien

Anonymous



Hi there, me again.

I'm working on a little "mine sweeper" game in iziBasic, and I've run into a strange behavior that I can't figure out.

I'm using a 12x12 grid of pushbuttons. When the user clicks on a cell, it reveals the # of mines in the 8 cells around it.

Here's the weird part - on pen down, the pushbutton's text sometimes changes to the previously tapped pushbutton's text. I don't think there's a way to capture the pen-down event for a control, so maybe it's something in iziBasic or PP, or perhaps even the Palm OS itself.

I reproduced this on a TX (color) and an old Visor Platinum (monochrome) - same behavior.

I'll try to post some sample code, but I thought I'd tell you in the meantime.

For now, I'm working around this by updating the pushbutton's text from the underlying variable each time it's clicked. Good enough for now.

Thanks for any help.
  Post an answer  Top

[]   


Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n° 1
--------
26/10/2006 @ 20:44
by Dave O\'Brien

Anonymous

visitor
Fooled around some more, and there's another behavior which may (or may not) be related:

The UPDATETEXT function seems to interfere with the rendering of the pushbutton's on/off state.

For example, this code:

UPDATETEXT #1, "Test"
UPDATEVALUE #1, 1

...seems to give a different appearance than the reverse order:

UPDATEVALUE #1, 1
UPDATETEXT #1, "Test"

Seems to me that the text and value should not affect each other.

Will debug this some more and post some actual code that reproduces it.

Thanks.
  Post an answer  Top

Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n° 2
--------
27/10/2006 @ 02:09
by aldweb

Anonymous

visitor
Hello Dave,

Reading you makes me believe that there could be some kind of a "memory leak" somewhere in the data storing of the objects in iziBasic's virtual machine, when using lots of PUSHBUTTONs... To be investigated on my side.

Nevertheless, why use so many PUSHBUTTONs for that kind of game?
Why not use instead some kind of virtual grid made of images (or text) put one next to the other and then capture only one event, a pendown event, find from the X,Y returned values which cell in the grid was selected and have your program react accordingly?
This way of doing should be much faster, less resources consuming and your source code should also be a little bit smaller.

Cheers,
aldweb


@+
aldweb
Write to aldweb   Post an answer  Top

Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n° 3
--------
27/10/2006 @ 07:41
by Dave O\'Brien

Anonymous

visitor
My answer: because it was "izi" to use pushbuttons. ;^)

The pushbutton does what I want:
- it's rectangular(unlike a button)
- it has a settable label
- it stores state (on/off)
- it responds to tap events

But yes, it's a hog on resources. I would eventually like to use images instead, but I wanted to get the basic logic working first, then swap out the pushbuttons later. Iterative development, don't you know. :D

Thanks for any help.
  Post an answer  Top

Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n° 4
--------
31/10/2006 @ 10:48
by aldweb

Anonymous

visitor
Hello Dave,

Would you accept to send me your source code so that I can try to figure out where the issue is in iziBasic's memory management for objects? (of course, as always, I guarantee full confidentiality and I will delete your source code from my device, my e-mail, my hard disk when the needed tests will be finished).

Cheers,


@+
aldweb
Write to aldweb   Post an answer  Top
active topic active   closed topic closed   Sticky Sticky   New New message   -   Correct Correct message   Close Close topic   Make sticky Make sticky
[]
Forum Topic  Forum 



 
^ Top ^