Page 1 of 1

PostPosted: Wed Jun 01, 2005 1:36 pm
by Techdojo
Hi there,
I've just started playing with OrbForms and I'm very impressed - however there was one feature I was looking for and it's to be able to trap system alarms (or more accurately be woken up by them).

Is it possible to set a system alarm to wake an orbforms program at a given time, the idea I had in mind was for a parking meter timer, so that you set the time and then turn off the Palm to save the battery, the device can wake up at a given time and play an alert beep...

Thanks (in advance) for any help...


PostPosted: Thu Jun 02, 2005 3:40 am
by dewey
At this time there is no way to do that with OrbForms. If you are willing, you could create a native add-in to do this pretty easily (depending on your familiarity with C Palm development).

PostPosted: Fri Jun 03, 2005 10:58 am
by Techdojo
Thanks for that, I'll have a look in the manual for these...

FWIW - In future versions, could you supply some kind of callback hook that is used based on the different types of app calling conditions.. ???



PostPosted: Fri Feb 03, 2006 5:05 am
by Aqua32
Im not familiar with it but heres a link explaining how to do it with C: ... m_mgr.html

PostPosted: Fri Feb 10, 2006 2:23 am
by FlashBIOS
Alarm manager support was the feature I was most hoping would be in OrbForms v4.0. I was rather bummed when it wasn't there. I have quite a number of projects that could be developed in OrbForms if it was.

Dewey has said a couple of times over the years (I searched, alarm support has been asked for for a while) that it could be done rather easily as an add-in. Maybe if we all ask nice enough he would be able to whip one up for us himself as if someone who knows how already did that person doesn't seem to be sharing. :D

PostPosted: Fri Feb 10, 2006 6:14 pm
by fabian1131
Good Idea, FlashBIOS, lets ask nicely. Maybe lets also ask nicely for the *.wav support...;).

++ Vielen Dank dass Sie meinen Post lesen++
++ Thank you for reading my post ++
++ Merci beaucoup pour lire ma poste ++
++ Grazie per lettura del mio messaggio ++

PostPosted: Fri Feb 10, 2006 8:07 pm
by jstadolnik
Alarms cannot be handled with an add-in. An add-in can be used to schedule an alarm, however, Orbforms/PocketC Architect provides no way of intercepting the alarm.

When an alarm is triggered in the PalmOS, the sourcing application is called with a specific alarm launch code. OrbForms provides no way to intercept this launch code, so it can't know whether it was launched because of an alarm or because of normal user initiated launch.

An additional complication is that all applications called via the alarm mechanism cannot use global variables (native global variables, not global variables in the OrbForms virtual machine language). This is an artifact of the PalmOS. I suspect that OrbForms and PocketC use global variables (though I may be mistaken), and thus cannot intercept alarm launch codes. Jeremy could probably shed some light on this.

Now even if OrbForms doesn't use global variables for running it's virtual machine engine for executing a program's code (OrbForms is like Java in this respect), it will likely still need to allocate some chunks of heap memory to run the engine. As a general rule, the part of an application intercepting an alarm should very lightweight, allocating a minimal amount of memory so as not to intefer with the interrupted application. I don't know how much memory the OrbForms engine needs to allocate in order to run (this may depend on what the user's program does), but it may be an issue too.


The PToolboxLib guy.

PostPosted: Sat Feb 11, 2006 6:53 pm
by dewey
Joe is absolutely right here. To answer his question, yes, the runtime requires native global data.