|
If you feel like you've gained something valuable or useful out of my programs or libraries, buy me a cup of tea and a donut (Yes, we do have them in Finland) from the button on the left. All the software here is free for all uses, unless epressed otherwise. |
Since you are here, you must be somehow related to CASL programming. Here are some packages and tools I wrote mainly to help myself, but if you like (or need) one, download and give it a try. An email with suggestions and comments would be appreciated.
If you have any questions, please email me at support@jardesignky.com
SetupJar makes distributing your applications a bit easier. It is a powerful toy to create self-extracting installers, zips and other distributor-specific packages.
My products are sold via PayPal, mainly because they claim very little commission. Few peoplw have asked me about the scripts to develop their own "web-stores", so here they are.You should read through all the files, and make necessary changes. Also, you should make all the steps below:
Download scripts
- Make sure that your web host supports Python, PHP and MySQL (Or you can write the Python script in cgi-bin with PHP)
- Create two database tables which are described in the beginning of the PHP file.
- Implement the table from "paypal_test.html" to your product pages.
- Hope for the best.
This command-line utility converts casls source files to plain HTML. This way your customers may view your files with coloured syntax, and it is a bit easier for you to comminicate with your customers over phone, when you are both seeing the same source code.Check out the on-line version here. Syntax is casl2html.exe /source <sourcefilename> /target <html file name> /overwrite /tab <n> /info, where
/source <sourcefilename>; specifies a valid Casl source file. If there are spaces in the file name, it must be quoted.Download converter
/target <html file name>; specifies target HTML file name. If omitted, sourcefile.html will be used. Converter does not overwrite existing html files, unless /overwrite is specified.
/tab <n>; Convert all tab-characters to n spaces. Makes the source code a bit more readable.
/info; print a function list and some additional information on the top of html page.
This package includes useful functions for transferring CASL programs between different platforms. It has the "Date selector" -package described below and a couple of other functions as well. There are parts from CASLsoft and Uli's external packages. I've ruthlessly ripped them here, because they have been known to work. See www.caslsoft.com and www.ulrich-riepert.de for further details and copyrights.Oh yes, my C skills are quite poor, so if someone wants to re-write the PocketPC dll and the ext.c -file, could she/he please send it to me too?
Function reference
########################################################################################################################### # # This package contains parts from CASLsoft and Uli's external packages. I've ruthlessly ripped them here, # because they have been known to work. See www.caslsoft.com and www.ulrich-riepert.de for further # info and copyrights. # # support@jardesignky.com # # ########################################################################################################################### # # This package consists functions to be used in both Palm OS and Pocket PC environment # Files needed: # - gen_api.cpk # - date_select.cff # - time_select1.cff # - time_select2.cff # - ext.c # # Pocket PC installation requires ext.dll # ########################################################################################################################### # # FUNCTION REFERENCE # #-------------------------------------------------------------------------------------------------------------------------- # # fSelectDate(numeric Year, numeric Month, numeric Day, string Caption, object Return, Object Target, numeric DateType); # # Year = default year (if 0, use current) # Month = default month (if 0, use current) # Day = default day (if 0, use current) # Caption = dialog title bar # Return = Frame object to return to when date has been selected. # Target = Target button, label, text or any other object to set the date value to. # Indexed date (YYYYMMDD) will be written to the object's object_string. # DateType = 0 - 15. Type of date to output (see sfFormatDate) # #-------------------------------------------------------------------------------------------------------------------------- # # sfReplace(string haystack, string needle, string new) as string; # # haystack = string where "needle" is searched from # needle = text to be sought # new = replacing text # # Returns new string with needles replaced with new's. # #-------------------------------------------------------------------------------------------------------------------------- # # sfFormatDate(numeric yy, numeric mm, numeric dd, numeric type) as string; # # yy = year in four decimals (e.g. 2003) # mm = month (e.g. 4) # dd = day (e.g. 21) # type = index from 0 to 15, see "saDateFormats" global variable array for formats. # # Returns formatted date. # #-------------------------------------------------------------------------------------------------------------------------- # # fSelectOneTime(numeric ti, string Caption, object return, object target); # # ti = time in format HHMM (e.g. 1140) # return = form where to return once date has been selected # target = control, where the time shold be written. target.display is the time in format HH:MM, # target.object_string is the numerical value in format HHMM) # #-------------------------------------------------------------------------------------------------------------------------- # # fSelectTwoTimes(numeric st, numeric en, string Caption, object return, object target1, object target2); # # st = start time default in format (HHMM) # en = end time default in format (HHMM) # Caption = title of the dialog # return = form object to return when time has been selected. # target1 = object where start time will be written to. # target2 = object where end time will be written to. # # Objects target1 and target2 .display will be filled with selected time in format HH:MM and their # .object_strings will have the selected time in format HHMM. # #-------------------------------------------------------------------------------------------------------------------------- # # sfUserName as string; # # On Palm OS returns user's HotSync name, on Pocket PC returns owner name. # #-------------------------------------------------------------------------------------------------------------------------- # # fFilterFiles(object filelist, string exceptions, string filter); # # filelist = selector object, where the file names are to be shown # exceptions = string containing the files not shown in the list (separated by commas) # filter = gneral filter, e.g. "*.cdb" # # This function updates the selector and displays it as well. # #-------------------------------------------------------------------------------------------------------------------------- # # fWritePreference(numeric ID, string txt, string CreatorID, numeric saved); # # (Palm OS) # ID = Number of preferences slot # CreatorID = decimal representation of the creator ID # txt = Value to be stored in preference slot # saved = true/false. Saves to saved_preferences or unsaved_preferences. # # (Pocket PC) # Values are stored in a registry path like HKCU/Software// # txt = Value to be stored in preference slot # saved = Obsolete # #-------------------------------------------------------------------------------------------------------------------------- # # sfReadPReference(numeric ID, string CreatorID, numeric saved) as string; # # ID = Number of preferences slot # CreatorID = decimal representation of the creator ID # saved = true/false. Saves to saved_preferences or unsaved_preferences. # # (Pocket PC) # Values are stored in a registry path like HKCU// # txt = Value to be stored in preference slot # saved = Obsolete # #-------------------------------------------------------------------------------------------------------------------------- # # nfPixelWidth(string the_string, string the_font) as numeric # # the_string = string, whose width needs to be calculated # the_font = font name (for Palm os only, discarded on Pocket PC) # # Returns the width of chosen text in CASL pixel units. # #-------------------------------------------------------------------------------------------------------------------------- # # InputPanel(mode) as numeric (Pocket PC only) # # mode = 1, if input panel is wanted to show, 0, if hide # # Returns the status (1/0). # #-------------------------------------------------------------------------------------------------------------------------- # # PhoneLookup(string searchtext, string formatstring, numeric clipboard) (Palm OS only) # # A field must be selected, to where the data will be written. # # searchtext = text to search from from the list of names # formatstring = string to format output. you can use any text, and fill address book field into it. # field names must be preceded with caret. For example "Phone number for ^name is ^work" # would produce "Phone number for J-M is 123-456789" # # Allowed field names are: name, first, company, address, city, state, zipcode, country, # title, custom1, custom2, custom3, custom4, work, home, fax, other, # email, main, pager, mobile, listname # #-------------------------------------------------------------------------------------------------------------------------- ###########################################################################################################################
Most of CASL developers know the difficulty of working with date selectors. If you are using runtime, you need to use external libraries to pop up the date selector. CASLpro allows you to compile external C -files eliminating the need on external library, but then your user interface is different for CASLwin.Here's what I came up with. It's quite similar to standard Palm OS date selector, but it's written in pure CASL code. Naturally it's not modal, but it can be called with single function. It also bundles up a date formatter.
For Pocket PC purposes I've added the "two times" and "one time" dialogs, so no extra libraries are necessary. However, based on testing they are quite slow - but better than nothing, until we got some decent calendar controls.
The time dialogs don't always show up correctly on Palm emulator, but on a real device there should be no problems.
Let's say you have a button named buPickDate on a form named frMainpage. If you need to select a date and write it to that button, simply use a function
function buPickDate; SelectDate(2002, 12, 12, "Select date", frMainpage, buPickDate, 0); end; function buTimes; SelectTwoTimes(0, 0, "Select time", frMainPage, txTime1, txTime2); end; function buTime; SelectOneTime(0, "Set time", frMainPage, txTime3); end;The above will start date selector, and write a selected date to button "buPickDate" using date type 0 (m/d/ y). All date types in Palm OS reference manual should be supported.
This library is intended to ease drawing of different gparhs. It allow syou to draw pie charts, bar charts and line charts. It also has a grid drawing feature. (This was done back when CASL version was 3.1...)
Example:
variables; PieChartData[5] = 25,15,33,12,15; # Percent values. Should add up to 100%. BarChartData[3] = 75,50,25; # Percent values. LineChartData[7] = 95,125,120,135,180,245,60; # Numerical data for line chart. end; # Startup function startup; RANGE_X = 1000; # Set these values to match your "Project Settings CASL Display Size". RANGE_Y = 1000; ActiveFrame = FrameToDrawInto; # First we'll create background box and create some bar charts gralib_box(50,50,950,950); gralib_vbar(100, 100, 150, 30, BarChartData[0]); gralib_hbar(300, 100, 30, 150, BarChartData[2]); # Pie chart always makes me hungry.. gralib_pie(350, 500, 150, 5, PieChartData); # Line chart gralib_linechart(600, 500, 300, 250 ,7, LineChartData, 50, 300); # A 3 x 2 grid in the screen. gralib_grid(100,700, 500,800, 3, 2); # Finally we'll create some line at the lower-right of the screen. gralib_circle(750, 350, 50); gralib_angle(750, 350, 30, 100); # This line is longer than the radius of the circle. gralib_line(750, 350, 850, 350); # This is just line betwoon coordinates. end;Download package and demo
Sometimes one needs to analyze, or let user analyse mathematical data on PDA. First I tried to solve all mathematical problems in CASL, but soon realized, that it's sometimes too hard. If you need to handle tabular data, it's best to do that in a spreadsheet.This is written in C, and propably in bad C, since I am not very fluent in it. But managed to do this, though...
That's where iambic TinySheet came in. The procedure is quite simple:
Download package and demo
- Create your tabular data and save it to any file on ou pda. Format it CSV.
- Start Tinysheet like in the example below.
When developing application which has multiple screens it's sometimes difficult to keep track on what form you are, especially if you come to certain form from different forms. CASL provides a handy function, global obejct variable, but it only maintains one last frame object.The solution is to create a "stack" of forms. it is just a pile, where you always add the latest form and when you need to return to previous forms, you can simply check what was the latest form. To do this I wrote a package, which has the following functions:
Download package
- stack_append(form)
- Append a form object to the end of the stack
- stack_first as object
- returns the first object in the stack
- stack_previous
- returns the last added form from the stack
- stack_pop_previous
- same as above, but deletes the returned form from the stack
- stack_del_previous
- only deletes the last added form from the stack
- stack_pop_first as object
- returns and deletes the first item in the stack.
- all stack items are dropped down one bit.
- stack_del_first
- deletes the first item, but does not return anything
- stack_reset
- clears the whole stack
- fReturnToPreviousScreen
- this function always displays the last added frame
- fOpenScreen(nextform)
- displays the form "nextform"
- automatically appends "nextform" to the stack
Every developer runs to users that are not very experienced with computers. On pure Palm applications this is not usually a problem, but when you develop a desktop counterpart for your app, the problems begin. My experience shows, that every tenth user need some sort of help, and in most cases it's about conduit's or erroneus setup.However, when I ask a user to send me a the whole contents of his/her HotSync folder, I get the most wide range of results. Few examples:
Needless to say, these kind of answers don't help me to help them. So I wrote a simple program, which when run, gatheres information about user's computer and some helpful files to a single zip -file. The user can send this file to me, and it's a lot easier to help them.
- Screenshot of Windows Explorer showing the contents of user's HotSync folder.
- Email saying "My HotSync folder is WinTimeJar."
- Email saying "I'm using Handspring Visor."
- Email saying "I zipped it up, but it's too big!" (Later it came to me that the user zipped entire "Program Files" and tired to send it to me.)
Download SupportHelperApp.zip and give it a try. It's a bit of work to get it configured, but email me, and I'll help you.