Page 1 of 1

PostPosted: Thu Jun 05, 2003 12:52 pm
by cisco
is there anyway to intercept the "Done" button on the console screen?
i.e., when i press "Done", my application exits (and i don't want it
to ;-)

i've worked around it by hooking the "Application Launcher"
silkscreen button (pressing it returns the user to the "graphical"
layout), but it'd make much more sense for the "Done" button to
do this.

PostPosted: Thu Jun 05, 2003 1:09 pm
by jstadolnik
Using the Fevent() PToolbox event capture function will allow you to trap the Done button.


The PToolboxLib guy.

PostPosted: Thu Jun 05, 2003 1:28 pm
by cisco
thanks, i'll give that a shot!

PostPosted: Thu Jun 05, 2003 3:02 pm
by cisco

i hadn't used the PToolbox library before now ... so i've got,
hopefully, a quick question:
-i used ccontrols to quickly layout my main form and provide
an easy link between a table and my database
-as soon as i "include" the PToolbox library and recompile, all
the text in my form turns into what looks like large/bold
-i'm on a sony nx70 (os5)

any ideas? some interaction between ccontrols and ptoolbox?
(i'd just as soon *not* rewrite everything by removing ccontrols.)

thanks in advance,

PostPosted: Thu Jun 05, 2003 3:43 pm
by jstadolnik
There's a bug in the current version of the PToolboxLib which effect OS5 Sony devices (well, actually it's a Sony bug) which will cause this kind of behavior. Though setting the hi-res mode via the PToolbox Sony() function (e.g. Sony(1,1);) may fix the problem.

I could send you the v7.6.0 beta with fix if you'd like (it also has jog-dial support). If interested send me an email.


The PToolboxLib guy.

PostPosted: Thu Jun 05, 2003 5:22 pm
by cisco
sounds like i'll definitely need that beta version.

i've been looking thru the functions docs for Fevent() ...
it doesn't sound like i can trap on the "Done" button without
knowing the ID PocketC assigned to it ... assuming it even has a unique ID to begin with. i don't think ccontrols even lets me muck
with IDs for items, although i suppose that could just all be hidden
from the casual user (i.e., me). and i guess it's PocketC that's
directly responsible for the "Done" button since all i do is use
puts() followed by a graph_off()... (then sit in an event loop
waiting for the "Application Launcher" button to be pressed, at
which point i restore my form ... etc, blah, blah, blah ;-)

i think i'll need to play around a little more with PToolboxLib, and
who knows, maybe even resort to reading some documention, before i'll
be able to make use of it.

PostPosted: Thu Jun 05, 2003 6:48 pm
by jstadolnik
It's just matter of experimenting to see what Fevent() returns for the Done button. Just do something like this:

while(1) {

You can also create your own "output" field with PToolbox and control what buttons are on the screen. Such a field would not be limited in size like PocketC's output form is. See the field_demo.c file in the PToolbox examples directory.


The PToolboxLib guy.