Sample Code

2002-12-06 Thread Dustin Davis
Where do I find sample code to write to Memo?

Thanks!

---
Dustin Davis
Shiblon Software
http://www.shiblon.com

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



Removing item from a list box

2002-12-06 Thread Dustin Davis
When I delete the last item in an inbox I get and "index out of range 
error"

Here is my function:
Int16 DeleteFromList(Int16 ListID, Char* item)
{
FormPtr form;
ListPtr listP;
Char** items;
Int16 numItems, i, j, numSelected, rval;

form = FrmGetActiveForm();
listP = (ListPtr) FrmGetObjectPtr(form, FrmGetObjectIndex
(form, ListID));
items = (Char **) MemPtrNew(255);
numItems = LstGetNumberOfItems(listP);
numSelected = LstGetSelection(listP);
if (numSelected == noListSelection)
{
FrmCustomAlert(AlertDeleteListItem, item, NULL, NULL);
rval = -1;
} else {
//Prompt to remove selection
j = FrmCustomAlert(AlertConfirmDeleteListItem, item, 
NULL, NULL);
if (j == 0)
{
// Romove selection
for (i=0; i<=numItems; i++)
{
if (i != numSelected)
{
items[j++] = 
LstGetSelectionText(listP, i);
}
}
LstSetListChoices(listP, items, (numItems-1));
LstDrawList(listP);
rval = numSelected;
} else {
rval = -1;
}
}

return rval;
}

And my call:
case LeadershipDeleteButton:
if (DeleteFromList(LeadershipLeadershipList, "name") != -1);
form = FrmGetActiveForm();
listP = (ListPtr) FrmGetObjectPtr(form, 
FrmGetObjectIndex(form, LeadershipLeadershipList));
DmRemoveRecord(gLeadershipDB, LstGetSelection(listP));
handled = true;
break;

Thanks!
:D
---
Dustin Davis
Shiblon Software
http://www.shiblon.com

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



GCC Debugger

2002-12-06 Thread Dustin Davis
I've read somewhere that there is a debugger for PRC-Tools. Is this 
correct? How do I go about installing/using it?

Thanks!
:D

---
Dustin Davis
Shiblon Software
http://www.shiblon.com

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



Re: NSBasic

2002-12-10 Thread Dustin Davis
There's no reason to take it off-line. You can't convince me that it is fast 
or that the run-time is small, so there is nothing else really to talk about. 
I know I'm not using the latest generation of Palm, I currently have a Palm 
IIIc which isn't quite a dinosaur yet. Most of the people using my programs I 
would guess are using older palms as well.

Here is the link to the Pascal compiler I mentioned earlier.
http://www.pocket-technologies.com/

I've run some apps created with it and the programs seem to run as fast as 
those created in C, and the .prc files are small. It's been a few years since 
I would guess this is a great choice for Delphi programmers...

> >> Let's take this offline. If anyone in the group wants to keep following
> >> this thread, email me and I'll cc you.
> >
> >Don't run away now, George, it was just getting interesting.
> >Please do CC me at [EMAIL PROTECTED]
> >:-)
> >
> 
> If I was running away, I wouldn't have invited you to follow. :-)
> 
> I'll forward you the thread.
> 
> George Henne 
> NS BASIC Corporation
> http://www.nsbasic.com 


Dustin Davis
http://www.shiblon.com

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



mobilewizardry.com

2002-12-11 Thread Dustin Davis
> in regards to creating small programs, yes, you can do it - however,
> if you want globals and multiple code segments, you'll need something
> like this library to link against :) most of the demo's submitted in
> the competition (http://www.mobilewizardry.com/palm/contest/) were
> actually not linking to this library.

Man, looking at those contest entries is discouraging... I'll never be at that 
level. Aaron, looking at your programs must must consider yourself the King of 
palm programming...

--
Dustin Davis
http://www.shiblon.com

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



Re: mobilewizardry.com

2002-12-11 Thread Dustin Davis
> heh.. they are not all my programs.

Yeah, I know their not yours, but I was speaking of the programs on Ardiri.com 
and, of course, PilRC.

----
Dustin Davis
http://www.shiblon.com

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



Re: using Visual Basics to program Palm OS

2002-12-11 Thread Dustin Davis
> If you can't write in C then by all means use one of the other 
> programming languages, but don't moan about runtime modules
> or code size.  

This is why I would advocate learning C. There is a learning curve with any 
language you choose to use if you are new to the Palm. I'm just suggesting 
that it may be beneficial to take the time to dig into C if you feel you can.

Don't get me wrong. NSBasic served my purposes. It more than paid for itself 
in less than 3 months. Now it is just hard for me to get rid of the crutch 
when I am struggling with my C programming and I know how simple it is to do 
it in NSBasic.

--
Dustin Davis
http://www.shiblon.com

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



Re: using Visual Basic to program Palm OS [long]

2002-12-11 Thread Dustin Davis
Well it looks like we have a BASIC expert...

> Anyone can write a program in a language they are familiar with.
> You know C.  Other people know Basic much better.  Some know
> Pascal or Perl, etc better.  Some people can write books in Latin.

Yeah, I'm still waiting for someone to release a perl-Pk (Palm Kit) module :o) 
Hey, and maybe Microsoft can give us a feature in Access to export to palm...

-- 
Dustin Davis
http://www.shiblon.com

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



RE: using Visual Basics to program Palm OS [long]

2002-12-12 Thread Dustin Davis
It sounds like your in a similar boat - except you started with AppForge 
instead of NSBasic. I just wish the learning curve was not so steep. 

> the program on a real pda, but there is a noticeable lag time between
> when you tap the icon and when the first screen shows up.

This is the same with NSBasic. I had to put a splash screen up just you the 
user would know their palm had not died.

Does anyone know of a website that has common palm C functions that could just 
take object ID's and do what you need... Maybe I could create such a site - 
but I would need help from real programmers to show me what my functions are 
doing wrong!

:D
Quoting David Martin <[EMAIL PROTECTED]>:

> I weaseled into an AppForge project six months ago, and the here is my
> two cents worth about it:
> 
> runtime is indeed 350K! ...so I will never be able to free up enough
> space on my Palm III to run any AppForge proggies.
> 
> They "gave" me a Handspring Visor for the project, so I can at least run
> the program on a real pda, but there is a noticeable lag time between
> when you tap the icon and when the first screen shows up.
> 
> One of the nice things is you can read and write PDBs from a desktop
> application, which is great for making canned pdbs.
> 
> no support for passing user-defined data types (read 'structs') to
> functions.
> 
> the widgets are all non-palm, but they are consistent, and only a couple
> of them take a while to figure out (AFOwnerDrawGrid!).
> 
> In my spare time I have been learning how to use pilrc and gcc; I like
> it better though the learning curve is a little steeper.
> 
> If I were starting from scratch tomorrow I would have gone with C,
> PocketC, or NSBasic just to retain the wider potential client base that
> might not be ready to part with their Palm III or V yet.
> 
> (If only I could write Palm proggies in PERL!)
> 
> David Martin
> qrsparadigm.com
> 
> 

-- 
Dustin Davis
http://www.shiblon.com

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



GCC Debugger

2002-12-16 Thread Dustin Davis
Can anyone provide me with the GCC debugger in action. I'm still confused as 
to how it is supposed to work...

Thanks!
:D

-- 
Dustin Davis
http://www.shiblon.com

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



Cygwin help [OT]

2002-12-17 Thread Dustin Davis
I'm hoping there are experienced Cygwin users here...

I want to use a run command in TextPad to open my project and compile my 
code... I'm guessing I can do this with a batch file and a some sort of 
initialization file. In dos I typed "bash --help" and noticed there is a "--
init-file" option. Can someone tell me how to set this up? I'm guessing my 
init file would have these commands to compile:

cd MyProject
make

Thanks,
:D

-- 
Dustin Davis
http://www.shiblon.com

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



Re: Cygwin help [OT]

2002-12-17 Thread Dustin Davis
It won't work for me. Is there something you must specify on the install?

Quoting Henk Jonas <[EMAIL PROTECTED]>:

> If you have cygwin installed, you can just put cygwin commands in any 
> comand line window. So, I guess there is no need to call bash, a .bat 
> will do it...
> 
> Henk
> 
> Dustin Davis wrote:
> > I'm hoping there are experienced Cygwin users here...
> > 
> > I want to use a run command in TextPad to open my project and compile my 
> > code... I'm guessing I can do this with a batch file and a some sort of 
> > initialization file. In dos I typed "bash --help" and noticed there is a
> "--
> > init-file" option. Can someone tell me how to set this up? I'm guessing my
> 
> > init file would have these commands to compile:
> > 
> > cd MyProject
> > make
> > 
> > Thanks,
> > :D
> > 
> 
> 
> -- 
> -
> [EMAIL PROTECTED]   www.metaviewsoft.de
> 
> http://www.handango.com/PlatformTopSoftware.jsp?authorId=95946";>
> http://user.cs.tu-berlin.de/~jonash/werbung_palmos.jpg";>
> ---------
> 
> 
> -- 
> For information on using the Palm Developer Forums, or to unsubscribe, please
> see http://www.palmos.com/dev/support/forums/
> 


-- 
Dustin Davis
http://www.shiblon.com

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



Re: Cygwin help [OT]

2002-12-18 Thread Dustin Davis
Textpad is a general text editor for windows. I use it for everything. see 
textpad.com

Quoting Henk Jonas <[EMAIL PROTECTED]>:

> hm, I don't know. All I see is that when I call "Run..." from Windows 
> start-menu I can enter things like "ls" or "sh anyscript" and it will be 
> executed. What exactly is TextPad?
> 
> Henk
> 
> Dustin Davis wrote:
> > It won't work for me. Is there something you must specify on the install?
> > 
> > Quoting Henk Jonas <[EMAIL PROTECTED]>:
> >>If you have cygwin installed, you can just put cygwin commands in any 
> >>comand line window. So, I guess there is no need to call bash, a .bat 
> >>will do it...
> >>
> >>Henk
> >>
> >>Dustin Davis wrote:
> >>>I'm hoping there are experienced Cygwin users here...
> >>>
> >>>I want to use a run command in TextPad to open my project and compile my 
> >>>code... I'm guessing I can do this with a batch file and a some sort of 
> >>>initialization file. In dos I typed "bash --help" and noticed there is a
> >>
> >>"--
> >>
> >>>init-file" option. Can someone tell me how to set this up? I'm guessing
> my
> >>
> >>>init file would have these commands to compile:
> >>>
> >>>cd MyProject
> >>>make
> >>>
> >>>Thanks,
> >>>:D
> >>>
> 
> -- 
> -
> [EMAIL PROTECTED]       www.metaviewsoft.de
> 
> http://www.handango.com/PlatformTopSoftware.jsp?authorId=95946";>
> http://user.cs.tu-berlin.de/~jonash/werbung_palmos.jpg";>
> -
> 
> 
> -- 
> For information on using the Palm Developer Forums, or to unsubscribe, please
> see http://www.palmos.com/dev/support/forums/
> 


-- 
Dustin Davis
http://www.shiblon.com

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