Re: bitmap movie

2003-08-16 Thread alexrousseau_jta
Just set your event timeout to something less than evtForever,
then, in your form's event handler, process penDownEvent like
this:

if (playing)
  Stop();

Alex


--- In [EMAIL PROTECTED], Dave Lippincott [EMAIL PROTECTED] 
wrote:
 Allow events to be processed during your movie loop just as in any 
form or
 your main event processing.  You could even be selective as to 
which events
 you allow to be processed so you don't loose frame rate.  This 
would not be
 a process specific to a Palm app.
 I'd look over a few game examples for Palm OS specific code.  
(look in the
 SDK examples)
 
 - Original Message - 
 From: John McDowell [EMAIL PROTECTED]
 Newsgroups: palm-dev-forum
 To: Palm Developer Forum [EMAIL PROTECTED]
 Sent: Friday, August 15, 2003 10:34 AM
 Subject: Re: bitmap movie
 
 
  Can someone point me to an example of this?
 
  John Mc
 
  Dave Lippincott [EMAIL PROTECTED] wrote in message
  news:[EMAIL PROTECTED]
  
   Allow the message queue to be processed while performing your 
loop.
 Allow
   system messages to be processed, keep an eye out for your break
 condition.
  
   - Original Message -
   From: John McDowell [EMAIL PROTECTED]
   Newsgroups: palm-dev-forum
   To: Palm Developer Forum [EMAIL PROTECTED]
   Sent: Tuesday, August 12, 2003 4:12 PM
   Subject: bitmap movie
  
  
I have a series of bitmaps which when run one after another 
form a
 crude
movie. I put them into a loop and I would like the movie to 
keep
 running
until the user taps the screen.
   
What is the best way to break out of the loop?
   
John Mc
   
   
   
--
For information on using the Palm Developer Forums, or to 
unsubscribe,
   please see http://www.palmos.com/dev/support/forums/
   
  
  
  
 
 
 
  -- 
  For information on using the Palm Developer Forums, or to 
unsubscribe,
 please see http://www.palmos.com/dev/support/forums/
 
 
 
 -- 
 For information on using the Palm Developer Forums, or to 
unsubscribe, please see http://www.palmos.com/dev/support/forums/


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/


Re: Hide/Show form without lost the Form's memory

2003-07-24 Thread alexrousseau_jta
Hi there,

Have you tried FrmPopupForm() instead of FrmGotoForm()?
FrmPopupForm() would not unload the form that was
active before its invocation.

As for making controls on the previous form accessible
while the new one is up, I don't know the answer off hand
but have a (wrong?) feeling that it wouldn't be possible
with either of these 2 calls.

Good luck
Alex


--- Régis Daniel de Oliveira [EMAIL PROTECTED] wrote:
 Hy all!

 I'm developing an app that will fill a list with 3000 recs. I need
 to put this list in a form, and this list will pass informations to
 another form, using a global variable. But, each time that a call
 this form that have this list, the list needs to be reloaded.

 Is there any way to load this list only on the first time that the
 form is loaded and, after this, hide and show the form without
 discharging the memory, avoiding, with this, the necessity to lose
 time reload all the items again?

 Ps.: When the form is hide, i need to have access to all controls
 of the back form.

 Thanks all!
 Régis Daniel




--
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/


Re: Advice sought on design of a db of linked lists of linked lists of bitmaps?

2003-07-11 Thread alexrousseau_jta
--- In Jeremy Neal Kelly [EMAIL PROTECTED] wrote:
  It's certainly possible to save your linked lists in a database,
  but the only method I know of is quite tedious. If you like,
  I'll write it up for you; otherwise, perhaps someone has a neat
  trick for doing this.
 
 Er... as you can see, I went ahead and did just that; this paragraph
 should've been edited out. Sorry for the confusion!
 
  ~ J.

What confusion ?! Your explanation was pure gold. Your comment on
unexpected resets convinced me to go the easier way (as did your
explanation BTW :).

Thanks a lot for your help!
Alex



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/


Re: Advice sought on design of a db of linked lists of linked lists of bitmaps?

2003-07-11 Thread alexrousseau_jta
--- Jeremy Neal Kelly [EMAIL PROTECTED] wrote:
 Perhaps you've already written code that uses linked lists,
 but in case you haven't, let me ask: why do you need them?
 Why not manipulate the data directly in the databases? This
 type of access is marginally slower, but if I understand the
 purpose of your application, the difference shouldn't be
 noticeable.
...


I forgot to ask: When you say marginally slower, is it
still fast enough to load a 2-bit-depth 160x160 bitmap
in 250ms or less?

If not, I guess I'll have to use some form of cache...
Shouldn't be too hard in this case though because I only
need to pre-load the frames that make up a shot, and
there's rarely more than 5 or 6 per. Also, shots usually
last 1 second or more, so that should give me ample time
to preload the next shot's constituent frames.

Only thing that worries me is the jog shuttle response. TBC...

Thanks once more
Alex



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/


Re: Advice sought on design of a db of linked lists of linked lists of bitmaps?

2003-07-11 Thread alexrousseau_jta
Hi,

Thanks for your good advice. I am completely ignorant of VFS
(still focusing on OS 3.5+ support at this time).

How would it help the user if I supported VFS?

Also, I intend to support OS3.5+ and I guess that I'll still
need a Dm-conversant layer in there, like you did.

Thx!
Alex




Hal Mueller [EMAIL PROTECTED] wrote:
 I needed some similar linking in one of my products.  I also did 
 _not_ need record categories.  So I ended up using the category 
 support to designate my record type.  Where you have addresses of 
 records, I used record IDs (supplied my own record ID).
 
 I ended up with an enumerated type that listed all of the record 
 types, and a sort routine that sorted records by category (and then 
 appropriately within category).  I also tagged first polygon
 index, first line index, etc to boost lookup speed.
 
 I suggest you design from the beginning with VFS in mind.  For me, 
 this meant writing two levels of encapsulation routines for record 
 access (e.g. FindPolygon(database, poly #), FindLine(database, line 
 #), GetRecordHandle(datbase, recordIndex)).  The lower level of 
 routine chose either Dm or VFS calls, depending on where the
 database was located (VFSFileDBInfo/DmDatabaseInfo, 
 VFSFileDBGetRecord/DmGetRecord).  I also wrote my own VFS version
 of DmFindSortPosition.  I don't do any on-device editing of these
 databases, but if I did I would want to transparently copy a VFS DB 
 to RAM, work with it, and then return it to RAM (allowing for the 
 possibility that power could die or card could be removed at any 
 moment).



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/


Re: Advice sought on design of a db of linked lists of linked lists of bitmaps?

2003-07-11 Thread alexrousseau_jta
Hal Mueller [EMAIL PROTECTED] wrote:
 At 21:46 + 7/11/03, alexrousseau_jta wrote:
 How would it help the user if I supported VFS?
 
 More memory (probably more important for you than for most apps, 
 since I can see this becoming graphics-heavy).  And easier
 exchange (here Fred, take a look at this one).  Depends on how
 big your database is of course, and also how it's structured
 (does each storyboard live in its own database?  or do you have
 one monolithic db?)
 
I'm going to follow Jeremy Neal Kelly's suggestion and split the
data into relational databases (clips, shots, and frames). The
dependencies are such that it will be a triolith.  :)


 Heck, these days I think it's worth at least considering the idea
 of _requiring_ VFS for certain apps.  If it's file-heavy, and if
 the user might want to import/export graphics or music from other
 programs, doing all that with a FAT32 file system saves a lot of 
 design and operation headaches.  I can only think of about 4 
 current-production devices without VFS, and they're all either 
 low-end or specialty (baby Zire, Meazura, Fossil, Symbol).
 
You convinced me. VFS it is, then. sigh. More work ahead.

Thanks
Alex



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/


Re: Advice sought on design of a db of linked lists of linked lists of bitmaps?

2003-07-11 Thread alexrousseau_jta
Jeremy Neal Kelly [EMAIL PROTECTED] wrote:
 alexrousseau_jta [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
 
  I forgot to ask: When you say marginally slower, is it
  still fast enough to load a 2-bit-depth 160x160 bitmap
  in 250ms or less?
 
 I'm glad to be of service! As for the 'slowness', my (rough)
 understanding is that it has to do with the write protection
 affecting the storage area; database operations need to account
 for this, whereas operations on the dynamic heap do not. (Perhaps
 there is other upkeep associated with databases -- someone else
 could better answer that.) Anyway, this upkeep occurs at the
 record level, and once it is accomplished, read and write
 operations take place (I believe) at the same speed they would
 on the dynamic heap. Therefore, an application processing many
 small records likely would demonstrate a performance loss from
 using databases, but one such as yours with (relatively) few
 records will not.

My storyboards (for 10 minute films) would hold up to 100 shots,
each holding an average of 3 drawings, hence 300 records, the latter
being stored in the drawings database (per your earlier suggestion).
I can see this thing becoming huge if the user is working on a few
films. But I'm not too worried about that yet. I'll do a db access
performance test in a few days and that will help me decide whether
to cache or not to cache.

 Would someone care to confirm my thinking here?
 
 As for loading your bitmaps in a quarter-second -- well, I haven't
 actually tried it, but I'd be surprised if it were any slower than
 that.
 

Best !
Alex


 
 Best regards,
 Jeremy Neal Kelly
 Software Engineer
 Peapod



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/


Re: help: getting nilEvents when I don't need any !

2003-07-07 Thread alexrousseau_jta
--- Ezekiel Sanborndeasis [EMAIL PROTECTED] wrote:
 There are a number of reasons nilEvents might come through your
 event loop. Try not to worry about that. If you don't use them,
 then just ignore them. If you do use them for timing or something
 like that, check to make sure that it is the nilEvent you are
 looking for. If not, you can post a new one back into the queue at
 a desired amount of ticks into the future (see EvtSetNullEventTick)
 
 -Ezekiel Sanborn de Asis
 PalmSource Developer Support
 
I was hoping to optimize my application and figured that for every
undesired event there is an undesired price to pay. I guess I'll
just have to live with it (reminds me of those bank machine
transaction fees :).

Thanks!
Alex


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/


Re: help: getting nilEvents when I don't need any !

2003-07-07 Thread alexrousseau_jta
--- Aaron Ardiri [EMAIL PROTECTED] wrote:
  I use EvtGetEvent(event, evtWaitForever) in my main event loop,
  and I don't expect to see any nilEvents after that. Yet, I do.
  Pressing down on the digitizer will trigger a penDownEvent,
  followed by a nilEvent.
  
  Does anyone know if this is normal behavior?
 
 why do you process the nilEvent if you dont expect to see it?
 how about just ignoring it?

I tested for it, and hence detected its presence. And I am trying
my best to ignore it:

case nilEvent:
  handled = true;
  break;

Still, bugs me quite the bit as I am trying to optimize my
application (tight animation loops and all), and am figuring that
some machine cycles are spent hosting some totally uninvited guest.
Anyway, if I can't, I can't. :(

Thanks
Alex


 -- 
 For information on using the Palm Developer Forums, or to 
unsubscribe, please see http://www.palmos.com/dev/support/forums/


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/