Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3368: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3370: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3371: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3372: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
OrbWorks Community Forum • View topic - Export-Memo Problem

Export-Memo Problem

Discuss OrbForms Designer and PocketC Architect

Postby fabian1131 on Thu Aug 18, 2005 3:14 pm

Hi there!

can anyone help me with the problem in exporting a memofile to a stringlist (export the headers of all memos to a stringlist).

here is the code:

handler btnExport.onselect() {
Memo m;
int i=0;
string stmp;
StringList sl;
for(i=0;i<m.nrecs;i++){ //*1
m.open(i);
stmp=m.line();
sl.add(stmp);
lstMain.setitemslist(sl);
}
lstMain.redraw();
m.close();
}

It compiles but at *1 there is a problem: it says "Memo must be opened/created first" but it counts until it reached the end of the memodatabase?
What is the problem?

thank you

fabian


++ 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 ++
++ 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 ++
fabian1131
 
Posts: 91
Joined: Mon Jun 14, 2004 4:45 pm
Location: South Africa

Postby Gazza on Thu Aug 18, 2005 5:44 pm

You want this outside the loop:

lstMain.setitemslist(sl);
Gazza
 
Posts: 146
Joined: Sat Jan 12, 2002 1:56 am
Location: United Kingdom

Postby fabian1131 on Fri Aug 19, 2005 11:03 am

no i also tried that. i think it is because the memo is open or deleted or something like that.
it runs on the emulator but not on the palm...


++ 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 ++
++ 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 ++
fabian1131
 
Posts: 91
Joined: Mon Jun 14, 2004 4:45 pm
Location: South Africa

Postby FrankG on Fri Aug 19, 2005 3:03 pm

Some ideas to try:

- Add a stringlist clear before the loop: sl.clear();

- Add an alert(stmp) after the stmp = m.line to see if the memo line read is working.

- Add a lstMain.visible = true; to force a redraw of it (which your screen redraw is probably doing anyway.)

That's all I see different between memo code I have and yours.

Good luck,
Frank
FrankG
 
Posts: 210
Joined: Thu Jan 23, 2003 7:58 pm

Postby fabian1131 on Sat Aug 20, 2005 3:40 am

HI!

I found the bug. If anyone is interested:

Memo m;
int i=0;
string stmp;
StringList sl;

for(i=0;i<m.nrecs;i++){
if(m.open(i)==false){ // here i had to check if there
break; // is an error during opening
} // the memo
else{
stmp=m.line();
sl.add(stmp);
lstMain.setitemslist(sl);
}//endelse
} //endloop
lstMain.redraw();
m.close();



thank you all for trying to help me!
thanx a lot!

fabian

++ 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 ++
++ 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 ++
fabian1131
 
Posts: 91
Joined: Mon Jun 14, 2004 4:45 pm
Location: South Africa

Postby dewey on Tue Aug 23, 2005 2:21 am

Actually, you should use "contine" rather than "break" when memo.open fails. Memo.open will fail if the record at that index is already deleted, but that doesn't mean that the next record is deleted.
dewey
Site Admin
 
Posts: 749
Joined: Sun Oct 21, 2007 5:12 am


Return to OrbForms Designer and PocketC Architect

Who is online

Users browsing this forum: No registered users and 2 guests

cron