Detecting selected text in a resource field

A PocketC native palm library offering native forms and assorted utilities

Postby haines on Sun Jun 16, 2002 3:09 am

I am using a resource form (RsrcEdit) with several fields. I tried detecting the length of the selected text with a=Fctl(GETSELLEN)call. a is zero whether the field text is selected or not. I am selecting by double tapping the text. I tried the same operation with a dynamic form and field and the function worked perfectly. Does this function work only with dynamic forms or am I doing something wrong?
Posts: 29
Joined: Fri Feb 15, 2002 8:55 pm
Location: USA

Postby jstadolnik on Sun Jun 16, 2002 2:46 pm

I can't seem to replicate the problem. GETSELLEN works for me for both resource and dynamic fields. Below is my test code:



library "PToolboxLib"
include "Fctl.h"
#define FORM1 3000
#define BUTTON1 3001
#define FIELD1 3002
#define FIELD2 3003

main() {

if(OpenRsrcDb("field_db")!=1) {
alert("Couldn't find database");

while(1) {
if(Fevent(1)==BUTTON1) {

The PToolboxLib guy.

Edited by - jstadolnik on 06/16/2002 15:01:40
Posts: 1741
Joined: Wed Dec 06, 2000 3:34 am
Location: USA

Postby haines on Tue Jun 18, 2002 10:38 pm

I found the problem in my code. No problem with PtoolBoxLib. Again thanks!
Posts: 29
Joined: Fri Feb 15, 2002 8:55 pm
Location: USA

Return to Pocket Toolbox

Who is online

Users browsing this forum: No registered users and 4 guests