Main Menu

Recent posts

#11
José Roca Software / Re: AfxSort
Last post by Richard Kelly - June 16, 2026, 12:58:17 PM
Thank you Jose for your speedy resolution. I downloaded AfxNova and replaced those two in the Tiko toolchain. I only had to regroup my string parsing to put things in their groups of 5 and the sort works.

DIM bAscending        AS BOOLEAN = True


   nStart = 1
   WHILE nStart < LEN(sReportData)
      sRowSort = ","
      sString = AfxStrExtract(nStart,sReportData,",",",")
      sRowSort = sRowSort + sString + ","
      nStart = nStart + LEN(sString) + 1
      sString = AfxStrExtract(nStart,sReportData,",",",")
      sRowSort = sRowSort + sString + ","
      nStart = nStart + LEN(sString) + 1
      sString = AfxStrExtract(nStart,sReportData,",",",")
      sRowSort = sRowSort + sString + ","
      nStart = nStart + LEN(sString) + 1
      sString = AfxStrExtract(nStart,sReportData,",",",")
      sRowSort = sRowSort + sString + ","
      nStart = nStart + LEN(sString) + 1
      sString = AfxStrExtract(nStart,sReportData,",",",")
      sRowSort = sRowSort + sString + ","
      nStart = nStart + LEN(sString) + 1                         
      AppendElementToArray(arReportData,sRowSort)
   WEND

AfxSortStringArray(arReportData,bAscending)
#12
José Roca Software / Re: AfxSort
Last post by José Roca - June 16, 2026, 07:44:38 AM
Apparently, a problem of using a namespace in the SUBs called by the macros. I have uploaded modified AfxArrays,inc and AfxSort.inc" files.

Also do not forget to add

#define _WIN32_WINNT &h0602

before including these files.
#13
José Roca Software / AfxSort
Last post by Richard Kelly - June 16, 2026, 02:31:14 AM
Does anybody know why the code below gives me a compile error 42 variable not declared Afx_ArrayDWString in AfxSortStringArray(arReportData,True) ?

#INCLUDE ONCE "AfxNova\AfxArrays.inc"
#INCLUDE ONCE "AfxNova\AfxSort.inc"

DIM sReportData       AS DWSTRING
DIM nStart            AS LONG
DIM arReportData(ANY) AS DWSTRING

   sReportData = ",South,Alabama,4784762,4803689,4822023,West,Alaska,714046,723860,731449,West,Arizona,6410810,6467315,6553255" _
               + ",South,Arkansas,2922750,2938582,2949131,West,California,37334410,37683933,38041430,West,Colorado,5048472,5116302,5187582" _
               + ",Northeast,Connecticut,3576616,3586717,3590347,South,Delaware,899824,908137,917092,South,Washington DC,604989,619020,632323" _
               + ",South,Florida,18845967,19082262,19317568,South,Georgia,9714748,9812460,9919945,West,Hawaii,1364274,1378129,1392313" _
               + ",West,Idaho,1570784,1583744,1595728,Midwest,Illinois,12840459,12859752,12875255,Midwest,Indiana,6489856,6516353,6537334" _
               + ",Midwest,Iowa,3050321,3064097,3074186,Midwest,Kansas,2858837,2870386,2885905,South,Kentucky,4346655,4366814,4380415" _
               + ",South,Louisiana,4544125,4574766,4601893,Northeast,Maine,1327585,1328544,1329192,South,Maryland,5787998,5839572,5884563" _
               + ",Northeast,Massachusetts,6563259,6607003,6646144,Midwest,Michigan,9877670,9876801,9883360,Midwest,Minnesota,5310737,5347299,5379139" _
               + ",South,Mississippi,2969137,2977457,2984926,Midwest,Missouri,5996092,6008984,6021988,West,Montana,990735,997667,1005141" _
               + ",Midwest,Nebraska,1829696,1842234,1855525,West,Nevada,2703758,2720028,2758931,Northeast,New Hampshire,1316843,1317807,1320718" _
               + ",Northeast,New Jersey,8803388,8834773,8864590,West,New Mexico,2064767,2078674,2085538,Northeast,New York,19399242,19501616,19570261" _
               + ",South,North Carolina,9559048,9651103,9752073,Midwest,North Dakota,674363,684740,699628,Midwest,Ohio,11538290,11541007,11544225" _
               + ",South,Oklahoma,3759482,3784163,3814820,West,Oregon,3838212,3868229,3899353,Northeast,Pennsylvania,12711308,12743948,12763536" _
               + ",Caribbean,Puerto Rico,3721208,3694093,3667084,Northeast,Rhode Island,1052769,1050646,1050292,South,South Carolina,4635835,4673348,4723723" _
               + ",Midwest,South Dakota,816223,823593,833354,South,Tennessee,6356673,6399787,6456243,South,Texas,25242683,25631778,26059203" _
               + ",West,Utah,2775093,2814347,2855287,Northeast,Vermont,625916,626592,626011,South,Virginia,8025105,8104384,8185867" _
               + ",West,Washington,6743636,6823267,6897012,South,West Virginia,1854019,1854908,1855413,Midwest,Wisconsin,5689591,5709843,5726398" _
               + ",West,Wyoming,564367,567356,576412,"
               
   nStart = 1
   WHILE nStart < LEN(sReportData)
      sString = AfxStrExtract(nStart,sReportData,",",",")
      AppendElementToArray(arReportData,sString)
      nStart = nStart + LEN(sString) + 1
   WEND               

   AfxSortStringArray(arReportData,True)
#14
José Roca Software / Re: cPDF Class
Last post by Richard Kelly - June 15, 2026, 08:01:19 PM
I added a report generator. You provide the report canvas size, header, columm headers and an array of values and get a report built. Attached is an example.

Code used to build attached sample report:

   sFontID = ocPDF.PDFFont(FONT_ARIAL,PDF_FONT_NORMAL)
   sFontIDBold = ocPDF.PDFFont(FONT_ARIAL,PDF_FONT_BOLD)
   nLineHeight = ocPDF.PDFLineHeight(sFontIDBold, 12)
   uRectangle.Height = uMetrics.DrawingHeight - 70           
   uRectangle.Width = 434.5 'uMetrics.DrawingWidth
   uRectangle.FillColor = ITEM_IGNORE
   uRectangle.Radius = 0
   uRectangle.LineAttributes.Color = RGB_WHITE
   uRectangle.LineAttributes.Width = .5
   uRectangle.LineAttributes.Cap = ITEM_IGNORE
   uRectangle.LineAttributes.Join = ITEM_IGNORE
   uRectangle.LineAttributes.Miter = ITEM_IGNORE
   uRectangle.LineAttributes.Dash.Array1 = ""
   uRectangle.LineAttributes.Dash.Phase = 0
   uMainMargins.bottom = 4
   uMainMargins.top = 4
   uMainMargins.left = 4
   uMainMargins.right = 4
   sTemplateID = ocPDF.PDFCreateReportTemplate(50,50,TEXT_JUSTIFY_CENTER,uMainMargins,uRectangle)
   uRectangle.LineAttributes.Color = RGB_LIGHTGRAY
   uRectangle.Height = 60
   uRectangle.FillColor = &HBDD2F2  'Bisque
   ocPDF.PDFCreateReportHeaderTemplate(sTemplateID,uMainMargins,uRectangle)
   uRectangle.FillColor = RGB_WHITE
   uRectangle.Height = nLineHeight * 3
   ocPDF.PDFCreateReportColumnHeaderTemplate(sTemplateID,uMainMargins,uRectangle)
   uTextDescriptor.FontID = sFontIDBold
   uTextDescriptor.FontSize = 12
   uTextDescriptor.FontColor = RGB_BLACK
   uTextDescriptor.Angle = ITEM_IGNORE
   uTextDescriptor.Justify = TEXT_JUSTIFY_CENTER
   uTextDescriptor.Underline = ITEM_IGNORE
   uRectangle.FillColor = &HFFFFF0  'Azure
   uRectangle.Width = 200
   ocPDF.PDFAddReportColumns(sTemplateID,uMainMargins,"State",uRectangle,uTextDescriptor,TEXT_VERTICAL_CENTER,ITEM_IGNORE,RGB_WHITESMOKE)
   uRectangle.Width = 75
   ocPDF.PDFAddReportColumns(sTemplateID,uMainMargins,"2010",uRectangle,uTextDescriptor,TEXT_VERTICAL_CENTER,ITEM_IGNORE,RGB_WHITESMOKE)
   uRectangle.Width = 75   
   ocPDF.PDFAddReportColumns(sTemplateID,uMainMargins,"2011",uRectangle,uTextDescriptor,TEXT_VERTICAL_CENTER,ITEM_IGNORE,RGB_WHITESMOKE)
   uRectangle.Width = 76   
   ocPDF.PDFAddReportColumns(sTemplateID,uMainMargins,"2012",uRectangle,uTextDescriptor,TEXT_VERTICAL_CENTER,ITEM_IGNORE,RGB_WHITESMOKE)
   uRectangle.FillColor = RGB_WHITE
   uTextDescriptor.FontSize = 14
   ocPDF.PDFAddHeaderText(sTemplateID,0,5,uTextDescriptor,"Sample Report using U.S. Population Estimates (as of July 1)")
   uTextDescriptor.FontSize = 12 
   
   nLineHeight = ocPDF.PDFLineHeight(sFontID, 12)
   uTextDescriptor.FontID = sFontID
   uReportRow.Height = nLineHeight * 2
   uReportRow.Margins = uMainMargins
   
   sReportData = ",Alabama,4784762,4803689,4822023,Alaska,714046,723860,731449,Arizona,6410810,6467315,6553255" _
               + ",Arkansas,2922750,2938582,2949131,California,37334410,37683933,38041430,Colorado,5048472,5116302,5187582" _
               + ",Connecticut,3576616,3586717,3590347,Delaware,899824,908137,917092,Washington DC,604989,619020,632323" _
               + ",Florida,18845967,19082262,19317568,Georgia,9714748,9812460,9919945,Hawaii,1364274,1378129,1392313" _
               + ",Idaho,1570784,1583744,1595728,Illinois,12840459,12859752,12875255,Indiana,6489856,6516353,6537334" _
               + ",Iowa,3050321,3064097,3074186,Kansas,2858837,2870386,2885905,Kentucky,4346655,4366814,4380415" _
               + ",Louisiana,4544125,4574766,4601893,Maine,1327585,1328544,1329192,Maryland,5787998,5839572,5884563" _
               + ",Massachusetts,6563259,6607003,6646144,Michigan,9877670,9876801,9883360,Minnesota,5310737,5347299,5379139" _
               + ",Mississippi,2969137,2977457,2984926,Missouri,5996092,6008984,6021988,Montana,990735,997667,1005141" _
               + ",Nebraska,1829696,1842234,1855525,Nevada,2703758,2720028,2758931,New Hampshire,1316843,1317807,1320718" _
               + ",New Jersey,8803388,8834773,8864590,New Mexico,2064767,2078674,2085538,New York,19399242,19501616,19570261" _
               + ",North Carolina,9559048,9651103,9752073,North Dakota,674363,684740,699628,Ohio,11538290,11541007,11544225" _
               + ",Oklahoma,3759482,3784163,3814820,Oregon,3838212,3868229,3899353,Pennsylvania,12711308,12743948,12763536" _
               + ",Puerto Rico,3721208,3694093,3667084,Rhode Island,1052769,1050646,1050292,South Carolina,4635835,4673348,4723723" _
               + ",South Dakota,816223,823593,833354,Tennessee,6356673,6399787,6456243,Texas,25242683,25631778,26059203" _
               + ",Utah,2775093,2814347,2855287,Vermont,625916,626592,626011,Virginia,8025105,8104384,8185867" _
               + ",Washington,6743636,6823267,6897012,West Virginia,1854019,1854908,1855413,Wisconsin,5689591,5709843,5726398" _
               + ",Wyoming,564367,567356,576412,"   
   
   nStart = 1
   WHILE nStart < LEN(sReportData)
      sString = AfxStrExtract(nStart,sReportData,",",",")
      uReportRow.StringID = ocPDF.CreateStringID(sString)
      uReportRow.VerticalAlignment = TEXT_VERTICAL_CENTER
      uTextDescriptor.Justify = TEXT_JUSTIFY_LEFT
      uReportRow.TextDescriptor = uTextDescriptor
      AppendElementToArray(arRows,uReportRow)
      nStart = nStart + LEN(sString) + 1
      sString = AfxStrExtract(nStart,sReportData,",",",")
      uReportRow.StringID = ocPDF.CreateStringID(TRIM(FORMAT(VAL(sString),"###,###,###")))
      n2010Total = n2010Total + VAL(sString)
      uTextDescriptor.Justify = TEXT_JUSTIFY_RIGHT
      uReportRow.TextDescriptor = uTextDescriptor
      AppendElementToArray(arRows,uReportRow)
      nStart = nStart + LEN(sString) + 1
      sString = AfxStrExtract(nStart,sReportData,",",",")
      uReportRow.StringID = ocPDF.CreateStringID(TRIM(FORMAT(VAL(sString),"###,###,###")))
      n2011Total = n2011Total + VAL(sString)
      AppendElementToArray(arRows,uReportRow)
      nStart = nStart + LEN(sString) + 1
      sString = AfxStrExtract(nStart,sReportData,",",",")
      uReportRow.StringID = ocPDF.CreateStringID(TRIM(FORMAT(VAL(sString),"###,###,###")))
      n2012Total = n2012Total + VAL(sString)     
      AppendElementToArray(arRows,uReportRow)
      nStart = nStart + LEN(sString) + 1
   WEND
   
   
   uTextDescriptor.FontID = sFontIDBold
   uReportRow.TextDescriptor = uTextDescriptor
     
   ' Insert a blank row before totals
   
   uReportRow.StringID = ocPDF.CreateStringID(" ")
   AppendElementToArray(arRows,uReportRow)
   AppendElementToArray(arRows,uReportRow)
   AppendElementToArray(arRows,uReportRow)
   AppendElementToArray(arRows,uReportRow)

   uReportRow.StringID = ocPDF.CreateStringID("Totals")
   AppendElementToArray(arRows,uReportRow)
   uReportRow.StringID = ocPDF.CreateStringID(TRIM(FORMAT(n2010Total,"###,###,###")))
   AppendElementToArray(arRows,uReportRow)
   uReportRow.StringID = ocPDF.CreateStringID(TRIM(FORMAT(n2011Total,"###,###,###")))
   AppendElementToArray(arRows,uReportRow)
   uReportRow.StringID = ocPDF.CreateStringID(TRIM(FORMAT(n2012Total,"###,###,###")))
   AppendElementToArray(arRows,uReportRow)     
 
   ocPDF.PDFDrawRows(sTemplateID,arRows())

I'm toying around with the idea of also supporting images in a report.

#15
PlanetSquires Software / Tiko Editor v1.3.1 release
Last post by Paul Squires - June 15, 2026, 12:31:48 PM
https://www.freebasic.net/forum/viewtopic.php?p=311459#p311459

Version 1.3.1 release: https://github.com/PaulSquires/tiko/releases

Download the "Source code (zip)" file from the Release page (https://github.com/PaulSquires/tiko/releases), or directly via the following link: https://github.com/PaulSquires/tiko/releases/tag/1.3.1

To install, simply unzip to a folder path that does not contain spaces. To uninstall, delete the folder. Tiko does not install any additional files elsewhere in your system nor does it store information in the Windows Registry.

It is safe to copy the files from this version release over your previous v1.3.0 release because the download does not contain a settings.ini or keybindings.ini file that would overwrite your existing files.

NOTE: THE NEW DEBUGGER INTEGRATION IS SOMEWHAT PRIMITIVE AT THE MOMENT. IT WILL GET BETTER AS TIME PROGRESSES.

Version 1.3.1 (June 15, 2026)
- Added: Environment Option to allow check for any new available Tiko versions and display message in menu bar.
- Fixed: The Replace button's tooltips would not display if the Find/Replace dialog was expanded using the expand toggle arrow.
- Fixed: Tiko's internal parser not correctly handling some unicode text (changed existing zstring to more correct DWSTRING).
- Fixed: "Compile / Command Line" not being passed to the Debugger.
- Fixed: Tiko Help viewer: Changing topic ensures that the cursor set to start of the topic text.
- Fixed: Tiko Help viewer: Code to help ensure always displayed above the editor.
- Fixed: When popup code completion activated it was possible that another edit window (like Notes or Compiler Output) could receive subsequent keyboard input.
- Fixed: Added code to prevent main statusbar tooltip text from continuously refreshing.
- Fixed: Refactored some internal text encoding conversion functions (thanks José Roca).
- Fixed: Refactoring to editor horizontal scrollbar dealing with long line widths.
- Changed: Do not add an -x flag during the compile process because it could interfere with an embedded #cmdline set by the user in code.
- Changed: The second "Code Editor" label in Environment Options changed to "Advanced Code Editor".
- Changed: Updated AfxNova library includes to latest repository as of June 15, 2026.
- Changed: Updated freebasic_manual.chm help file to latest as of June 15, 2026.
- Changed: The French language file has been updated (thanks docroger).
- Changed: The German language file has been updated (thanks hajubu).
- Changed: The Chinese Simplified language file has been updated (thanks fbfans).
#16
José Roca Software / Re: AfxNova progress
Last post by hajubu - June 14, 2026, 06:25:03 AM
Hi, I just updated my previous Html-Help for Tiko 1.3 , which is based on your md-DOCS-folder.

enclosed are two zip containing the changes , the instructions, and Readme
                    and the ready-to-use AfxNova_Web.

Readme_first_if_you_like. - Have Fun !

br. Hans (hajubu)

P.S:
ref_to_: details post May 29 - AfxNova progess

downloads available - Testpan_AfxNova_Web_260613__3fa6207 ->
  -> Planetsquires Software -> Tiko 1.3 and AfxNova Docs as integrated HelpTool

#17
PlanetSquires Software / Re: Tiko 1.3 and AfxNova Docs ...
Last post by hajubu - June 14, 2026, 06:07:51 AM
hi, It's me  -- UPDATE -- 260616
Hi, I just update my previous Html-Help for Tiko 1.3 , which is based on the md-DOCS-folder of Jose Roca AfxNova-Main dated : 260616_0310_ (sha 69b2fa....) ->(DWSTRINGCLASS and ARRAY_MACROS ( docs and related bi,Inc  in AfxNova-Main/Github)

Testpan_AfxNova_Web_260616_69bf2a3 
upd 260613_DWSTRINGCLASS and 260616_Array_macros

enclosed are two zip containing the changes , the instructions, and the last Readme...zip  and the ready-to-use AfxNova_Web.  Have Fun !

b.r. Hans (Hajubu)
#18
José Roca Software / Re: AfxNova progress
Last post by José Roca - June 13, 2026, 04:18:11 PM
The canvas can now display images, loaded from disk or a URL. With automatic scrolling, zoom, save and copy, print and preview, and with my "on-demand" function system, I can create a massive library without bloat. The 64-bit executable is 81 KB.
#19
José Roca Software / Re: AfxNova progress
Last post by José Roca - June 11, 2026, 01:24:00 PM
I have added methods to draw text that can also be used with effects to, for example, draw logos.

#20
José Roca Software / Re: AfxNova progress
Last post by José Roca - June 09, 2026, 09:56:14 PM
The embeded WebView2 control also has contextual localized menus that allow to save or copy the image, and shortcut keys. For example, you can zoom the image with Ctrl+/-, or using Ctrl and the mouswheel. Scrollbars are added automatically if needed. And Ctrl+P activates the browser printer dalog, so we have printing and print preview for free. We can generate PDF files if we choose a driver like Microsoft Print to PDF or any other that you prefer.

We can also drop images, pdf files and other objects in the control.