wapform_flutter 1.6.8
wapform_flutter: ^1.6.8 copied to clipboard
WapForm for Flutter Community Edition: an open-source Flutter port of a Lazarus/FPC WAP form and report engine for Web and mobile.
Changelog #
1.6.8 #
- WapForm technical manual in English, Traditional Chinese and
Japanese (
doc/): the complete WML reference — cards, datasets, fields, events, reports, the expression function library — with worked examples for Windows, Web and Flutter. See doc/wapform_manual_en.md, doc/wapform_manual_zh-TW.md and doc/wapform_manual_ja.md. - Plain function names. Every expression function that existed only
under a prefixed name (
tt_PADL,COB_UPPER_CASE, …) is now also registered under its plain name (PADL,REPEAT,SPLIT,UPPER_CASE, …). The prefixed names and the publictt_*/COB_*Dart functions keep working unchanged in 1.6.x (they are removed in 2.0.0), so existing WML and Dart code needs no change. - Integer arithmetic stays integer.
+,-and*on two integers now return an integer instead of a float, so a counter written assetvar("K", "K+1")is1, not1.0(andSTR(K)shows1). - Array range declarations.
setvar("X", "[1..999]")declares a zero-filled array whose indexes up to 999 are valid. setvar("X[i]", ...)fixes. A float index (2.0) is accepted instead of being treated as 0, and a typed Dart list (List<int>) is extended without aTypeError.ds.FIELDS[n]reads a field value by position (1-based) in expressions.- Custom functions.
WapEvaluatornow exposesaddFunction0Param…addFunction4ParamandaddFunctionAParam. - Example pages: events survive reopening a page. A page opened with
a shared
DataSetRegistry(as the example menu does) used to leave the datasets it created in the registry when it closed. Reopening the page then reused those datasets, whoseafterScrolland other events were still bound to the closed page, so moving the cursor no longer refreshed the screen. Each page now records the datasets it created and releases them from a shared registry on dispose. ROUND()precision. Rounding to decimal places no longer leaves binary noise:ROUND(6.6,1)is6.6,ROUND(1.005,2)is1.01.- Integer fields round like Delphi. Assigning a fractional value to an
integer field (for example a calculated
Amount*TaxRate/100= 157.5) now rounds half to even like Delphi'sRound(158) instead of truncating (157), so totals match the Windows engine. - Grid cell colors.
TDBGrid.cellStylesets a cell's background and text color per row (WML<onevent type="oncalccellcolors">). - Clean static analysis. Removed unused code and leftover debug
prints (
[DEBUG7 …]console output from datasets). - API documentation. Library, class and member docs for the public API, including every built-in expression function.
- Compatible with 1.6.7.
WapPage(includinghtmlStyle) and theflutter_htmldependency are unchanged; pages generated for 1.6.7 compile and run as before.
1.6.7 #
- Supported platforms declared: Android and Web (
platforms:inpubspec.yaml). Web builds were verified withflutter build webof the example; pub.flutter-io.cn previously inferred Android / iOS only fromflutter_native_html_to_pdf. LICENSEis now the plain LGPL-2.1 text so pub.flutter-io.cn / GitHub can recognize it. The FPC static-linking exception is unchanged and still applies; it is inCOPYING.modifiedLGPL.txt.dart fix/dart formatapplied tolibandtest; the FPC resource-string names (lazarus_db.dart) and WML function names (wapform_expression.dart) keep their original spelling (ignore_for_filefor the naming lints). Analyzer issues 394 -> 54.
1.6.6 #
- Example database account is now
xyz/123(simulated sample values), the same account used by every WapForm sample (example/lib/wapform.ini,example/server/server.js,example/server/sales.sql,INSTALL.md).
1.6.5 #
-
Example pages updated to the latest generator output (
app*.dart,function.dart,main.dart, thewapform_*helpers and their.wmlsources), all importing the runtime aspackage:wapform_flutter/.... -
Fixed publishing/compile errors:
pdfis now a direct dependency (wapform_report.dartimportsPdfPageFormat), andflutter_native_html_to_pdfis^3.0.0, the version that providesHtmlToPdfConverter. -
htmlpinned to<0.15.7:flutter_html3.0.0 does not compile againsthtml0.15.7 (QuerySelector.matcheswas removed). -
Example database account uses simulated values (
wapform/wapform123, created byexample/server/sales.sql) inexample/lib/wapform.iniandexample/server/server.js. -
Example smoke test updated for the
WapAppentry point. -
example/server/sales.sqlreplaced with a complete sample-data export (fictitious companies and people), not hand-written/partial seed data. All 12 tables the example app needs (numaside, which the app populates itself) now have real sample rows, not justsys/mnu/login/users. -
Database renamed from
fluttertosales, matching this real export's actual name — updated consistently acrosssales.sql,server.js,example/lib/wapform.ini,INSTALL.md, andexample/README.md. -
webtable dropped — the regeneratedapp002.dart(since 1.6.0) no longer queries it; a stale reference to it in the mainREADME.md's page-by-page description is fixed. -
The old
mnu.activatevs.activecolumn-name mismatch (worked around with a sync trigger in the previoussales.sql) turns out to have been this repo's own placeholder schema using the wrong column name, not a bug inwapform_menu.dart's query — the real schema has always usedactivate. The trigger workaround is gone; the column is justactivatenow, matching the query directly. -
function.wml's self-test report is now a real, permanentmnumenu item (id 216, "Function Self-Test"), not only akDebugMode-only button — a deliberate choice, confirmed while reviewing this update, that makes it reachable in release builds too for any account with a matchingloginpermission row. Updatedexample/lib/main.dart's comments (which had claimed the opposite) and both READMEs'function.wmldescriptions to match. The debug-only button inmain.dartstays as a faster shortcut during development, not the only path to it anymore. -
Dropped one junk row from the uploaded
mnuseed data (id 123, title'123', empty href) that looked like accidental leftover test data, confirmed as such before removing it. -
INSTALL.mdupdated throughout: seed-data description (real data, not "4 tables seeded, rest blank"), updated row counts in troubleshooting steps, and a stale claim that Web was "the only platform actually exercised" (superseded by 1.6.5's Android verification, missed when that entry was written).
1.6.5 #
- "Platform Support & Web-First Architecture" now reflects Android
as a verified platform, not just future work. Previously said
mobile support "will be added incrementally going forward"; that's
no longer accurate — the full example app (all 12 pages, login, the
data-driven menu, and the report/PDF pipeline) has been fully
tested against real Android hardware, not just the report path in
isolation. Also expanded the "Native HTML reports and printing"
bullet to describe Android's actual print path (native WebView +
PrintDocumentAdapterviaflutter_native_html_to_pdf), alongside the existing Web (window.print()) description. iOS/desktop remain future work.pubspec.yaml's separate warning aboutwebview_flutter/flutter_native_html_to_pdfpotentially breaking the Web build (unconditional imports, unverified against Web specifically) is untouched — Android verification doesn't resolve that, they're different questions. Documentation only.
1.6.4 #
- Removed the prefixed-group framing of the function
library from
README.md(File reference'swapform_expression.dartentry and thefunction.wml/function.dartsection) andexample/README.md— functions are no longer separated into prefixed groups, so describing the library that way no longer matches reality. - Dropped the "13th file" framing for
function.wml/function.dartin both READMEs. Both now close with a pointer to wapform_manual, the complete technical manual at wapform.com, as the reference for WapForm's overall architecture — every tag, every function, how the pieces fit together — rather than treating the manual link as narrowly "what this one test file checks itself against." - Documentation only.
1.6.3 #
- Moved the "download the full manual" pointer from
example/README.mdto the mainREADME.md's "Example pages" section — the intended location; it had been added to the wrong file. Corrected the URL tohttps://wapform.com(washttp://). - While there, fixed the main
README.md's "Example pages" section heading and prose, which still saidexample/lib/pages/— stale since 1.6.0 flattened that directory. Added a short entry for the 13th file,function.wml/function.dart(previously undocumented in the main README, only covered inexample/README.md), and a one-line mention that login/menu now sit in front of the 12 pages. Documentation only.
1.6.2 #
- The manual's structure changed since
function.wmlwas written: the complete function reference is no longer a standalone Chapter 17 — it's now Appendix B, "Complete Function Reference" (Chapter 6, "Expressions and the Function Library," now covers only interpolation syntax and operators). Updated every reference:function.wml's own header comment and its rendered "all tests passed" summary line (user-visible report text, not just a code comment).example/README.md's description offunction.wml/function.dart.- Also noted, since the new manual states it explicitly: Appendix B documents 398 functions in total, and this test file's 363 cases cover most of that, not literally every entry — the README previously implied full coverage without saying so.
example/README.md's wapform.com pointer now cites Chapter 4 ("Complete Tag Reference") and Appendix B by name, instead of a generic "every tag and function." Verified with a real XML parser (not a regex) thatfunction.wmlis still well-formed after the edits. Documentation only — no test-case content or pass/fail logic changed.
1.6.1 #
example/README.md'sfunction.wml/function.dartsection now points to the full WML tag/function reference manual, downloadable from wapform.com —function.wmlonly cross-checks against it, it isn't a substitute for it. Documentation only.
1.6.0 #
Package (lib/) #
wapform_expression.dartgains roughly 60 previously-undocumented functions, added after cross-referencing the newfunction.wml/function.dartself-test report (see below) against Chapter 17 of WapForm's own function reference — functions the documentation described but the engine never actually registered. Also fixes two real bugs the same cross-check surfaced:Color2Hex/Hex2Colorhad the byte order backwards (Delphi'sTColoris BGR, not RGB), andROUND/ROUNDTO's sign handling was inverted relative to the spreadsheet convention this engine follows (Delphi's nativeRoundTouses the opposite sign for "decimal places" vs. "integer places").- Real dataset/UI fixes carried in this release (translated from the
source that already had them fixed):
WapLookupBoxno longer caches an empty lookup map while its dataset isn't open yet (was leaving picker lists permanently empty in some timing cases); alignment fixes inlazarus_dbctrls.dart/lazarus_dbgrids.dart/lazarus_stdctrls.dart. - Reapplied several fixes from 1.0.0–1.5.0 that had drifted back to
their pre-fix state in the uploaded source this release was built
from: the
wapform_filter.dartbarrel export,<report>/<output>naming,rev1/rev2/… file-history relabeling,report_web.dart's import path, and a batch of already-translated English comments that had reverted to Chinese. No new content beyond what was already shipped — carried forward, not re-derived.
Example app (example/) #
- The example is now login → a fully data-driven main menu,
replacing the flat 12-button reference gallery from 1.2.0–1.5.0.
wapform_login.dartandwapform_menu.dartreproduce the desktop WapToolkit's own login dialog and dynamic menu;wapform_session.dartholds one sharedWapEvaluator/DataSetRegistryper app run, so$usernameand friends are readable by every page after login, the way they are in the original WML. Menu contents (groups, items, order, titles, per-user permissions) come entirely from themnu/login/userstables — changing the menu means changing data, not code. - Every file now lives flat in
example/lib/(thepages/subfolder from 1.2.0 is gone) — that's the layout the generator itself produces andmain.dart's imports assume. - New 13th file:
function.wml/function.dart, the package's primary test program — a 363-case self-test report that runs every documented example expression for every function inwapform_expression.dartand checks it against its documented expected value, grouped into six categories with a pass/fail count per category and overall. Not a real menu item (nomnu.hrefrow); reachable only via a[debug] Function self-test reportbutton thatkDebugModestrips from release builds.function.wmlwas originally Big5-encoded (not UTF-8, unlike every other.wmlfile in this repo) — converted, and verified with a real XML parser (not a regex) both before and after translation. - Database name changed from
agtoflutter— updated consistently acrosssales.sql,server.js(including its previously-flagged staleshopcloudcomment/banner, now actually fixed instead of just documented as harmless),INSTALL.md, andexample/README.md. sales.sqlnow seedsusers/mnu/login, not justsys— required for the app to be usable at all under the new login/menu architecture (previously, seeing the 12 pages needed no login at all). Seeded account:admin/admin.- Found and worked around a real schema/code mismatch: the new
wapform_menu.dart's menu query filters onmnu.activate = 1, but the real production schema's column isactive. Addedactivateas a real column kept in sync withactivevia two triggers, with the mismatch documented inline insales.sql— not silently patched, andwapform_menu.dartitself wasn't modified; the actual fix belongs in that query. example/lib/main.dartandwapform_colors.dart's asset loading (assets/wapform.htm, declared inpubspec.yaml) are wired together again after themain.dartreplacement — this exact fix had already been made once in 1.5.0's now-supersededmain.dart.INSTALL.mdandexample/README.mdrewritten throughout to match: the login step and default credentials, the flat file layout, thefunction.wmltest program, and updated troubleshooting entries (the old "Cannot reach the WapDb gateway" status banner no longer exists in the newmain.dart).
1.5.0 #
WapColors.load()is now actually wired up in the example app.example/assets/wapform.htm(the CSS sourceWapColorsparses for report/grid zebra-stripe colors) is now bundled viapubspec.yaml'sflutter.assets, andexample/lib/main.dart'smain()callsawait WapColors.load()beforerunApp()(withWidgetsFlutterBinding.ensureInitialized()first, required for any async call this early). Previously neither existed: the asset wasn't bundled and nothing ever calledload(), so the example always silently ran onWapColors' built-in default colors — not broken (there's a try/catch fallback), just never actually exercising the CSS-driven path the type exists for.- Added
example/lib/pages/wapform.ini, a database-connection profile in the format the desktop WapForm designer tool reads — not consumed by the Flutter app itself. Included as a reference so that opening any of the 12.wmlfiles in the actual desktop tool has a connection profile already pointed at the sameagdatabase this example's backend uses. example/README.mddocuments both new files and what each is actually for.- No changes to
lib/(the published package itself) or to any of the 12 example page.dart/.wmlpairs in this release.
1.4.0 #
- Non-Web PDF generation now actually works, verified against real
Android hardware — replacing the unverified
Printing.convertHtml()approach from 1.1.0, which turned out to have a real upstream bug (dart_pdf#1517): it hangs indefinitely on some devices regardless of content size (tested down to under 10,000 characters, still hung).Printing.layoutPdf()was tried too and depends on a system Print Spooler service some devices don't have, hanging on "preparing preview" without ever calling into this package's code.WapReport.buildPdf()now generates PDFs via a native WebView +PrintDocumentAdapterpipeline (theflutter_native_html_to_pdfpackage), and also reuses the on-screen preview's CSS instead of a separate print stylesheet that was wrapping fields — both changes actually tested on-device, not just theorized. New dependencies:webview_flutter,flutter_native_html_to_pdf. ⚠ Not verified here: whether this breaks the Web build. Both new packages are imported unconditionally inwapform_report.dart(noif (dart.library.html)-style guard likesrc/report_web.dartuses), andflutter_native_html_to_pdfin particular may not have a Web implementation at all. If neither package supports Web,flutter build webcould fail to compile — which would contradict this package's Web-first positioning. Runflutter build webbefore relying on this. WapPage's screen preview and demo-card print path also switched to the native WebView, replacingflutter_html/flutter_html_tablefor full-report rendering — avoidsflutter_html_table's known dry-layout crash, and layout is now handled by a real browser engine instead of a from-scratch HTML re-implementation. The demo card's print path also switched fromPrinting.layoutPdf()toPrinting.sharePdf(), for the same Print Spooler reason as above —sharePdf()goes through Android's Share Intent instead, which doesn't depend on that service.- Print-output scaling is now computed on the Dart side and baked into fixed CSS, replacing an in-browser JS-measurement approach. The report's 116-character ruler line (which can't wrap) needs the printable area to fit at least that many characters; the print font size is now derived directly from a measured (not assumed) characters-per-pixel ratio — an earlier assumed ratio undershot by enough to clip 5 of 116 characters in testing.
- Security fix:
WapFilter's search box now escapes single quotes before buildingWHEREclauses (field = '...') — previously, a user typing'into a search field could break the SQL string literal, at best causing a query error and at worst constructing an unintended condition. Matches the escaping WML's own SQL_WHERE generation already does via REPLACE(). WapFilter's layout rewritten to match the original desktop (Delphi/LazarusTCard._dbfilter) positioning: Search/Clear buttons and the syntax-hint text now share the first row (previously the buttons were placed after the search fields, with the hint on its own line, which didn't match the desktop version), and field width now follows the desktop version's exact formula instead of an approximated one.WapLookupBoxfixed a caching bug where a lookup's picker list could stay empty forever: the lookup map used to get cached regardless of whether the dataset was open yet, so if the record count happened to match on both the "not yet open" and first "now open" builds, the cache never got invalidated. Especially likely to hit dynamically-created lookup sources (lookup="sql;<id>;<SELECT>"), which open later than a<dbtable>-declared dataset. Now returns (and doesn't cache) an empty map while the dataset is closed, so the next build retries.- Re-applied fixes from 1.0.0–1.3.3 that had drifted back to their
pre-fix state in the uploaded source this release was built from
(same underlying files, evidently edited from an older branch):
wapform_filter.dartmissing from the barrel export,<output>/<report>tag naming, therev1/rev2/... file-history relabeling,report_web.dart's import path, and several already-translated English comments that had reverted to Chinese. No new content in any of these beyond what 1.0.0–1.3.3 already covered — carried forward, not re-derived.
1.3.3 #
- Re-attributed three "core definition" claims from WML to
WapForm. WML is just the declarative language WapForm reads and
writes (comparable to HTML being just a markup language, not an
application in itself) — WapForm is the system that adds the
generator/runtime automation on top of it. Three places in the
README stated the "source of truth" / "single definition" / "the
center" role in terms of WML itself; reworded to attribute that
role to WapForm instead:
- "WML is the application's source of truth." → "WapForm is the application's source of truth."
- "WML is the single application definition; the generator expands it..." → "WapForm is the single application definition; the generator expands it..."
- "WML is the center. AI is the accelerator..." → "WapForm is the center. AI is the accelerator..." Left two other WML-related sentences unchanged, since they already describe WML correctly as WapForm's language rather than claiming a central role for it: "WML is a plain-text, declarative application-definition language" and "WML is WapForm's platform-agnostic, declarative application-definition language." Documentation only.
1.3.2 #
- The
<output>→<report>tag rename (documentation-only in 1.1.4, which explicitly noted the actual WML/generator-side rename was out of scope) is now applied throughout the repo, not just in prose: the 5 example WML files that actually use the tag (app002.wml,app004.wml,app007.wml,app012.wml,app901.wml) now declare<report ...>...</report>instead of<output ...>...</output>, and the matching comments in their paired.dartfiles (which describe what the tag compiles to) were updated to match, so each WML/Dart pair stays consistent with itself. Also updatedlib/wapform_report.dart's own file-header comment, which still described itself as corresponding to WML's<output>. - Comment-only / example-content-only changes — no logic changes in
lib/.
1.3.1 #
- Relabeled the per-file "Revision History" headers in
wapform_lookup_box.dart,wapform_expression.dart,wapform_colors.dart, andwapform_report.dart. These four files each carry their own internal edit log using aV1.0/V1.1/V2.0style — a leftover convention from the original Delphi/Pascal sources — which visually collides with this package's own semver (pubspec.yaml, now well past 1.0.0). A reader could easily mistakewapform_report.dart's internal "V2.0" for a claim about the package being at major version 2 (it isn't — the package is at 1.3.1). Renamed torev1/rev2/... and added a one-line note ("unrelated to the package version in pubspec.yaml") to each header.wapform_report.darthad one internal cross-reference to its own old "V2.0" label (in a comment about the PDF-generation fix) updated to match (rev6). wapform_expression.dartalso had four inline comments marking which version range of the originalmyexp_flutterproject (an earlier, separate codebase this file's expression engine was merged from — not part of this package) a section of code came from, e.g. a "custom function library V1.3" marker. Three of the four appeared without "myexp" nearby, so out of context they read the same way — prefixed all three with "myexp" to make the source unambiguous; left the fourth alone since it already sits two lines below an explicit "myexp.pas" comment.- No behavior changes — every edit in this release is a comment-only rename.
1.3.0 #
example/server/schema.sqlrenamed tosales.sql, matching the package's "sales management system" framing (see the "Example pages" section of the main README). All references updated acrossexample/README.md,INSTALL.md, and the file's own header/usage comments.sales.sqlexpanded from 1 table to 13 (cu,em,fm,login,mnu,num,pa,sh,sn,sys,users,ve,web) — every table the 12 example pages actually query, checked against everyselect/insert/updateinexample/lib/pages/app*.dartagainst a real production database dump. Onlysyshas a seed row; the other 12 are created empty (documented inexample/README.mdandINSTALL.md— pages open successfully now, but most show a blank form/grid until you add your own data).- Fixed two example-package bugs found while writing
INSTALL.md:example/pubspec.yamlwas missing theflutter_htmlandurl_launcherdependencies that several of the 12 pages actually import (would have failed to compile), and itsdescriptionstill referenced the old single-page demo. - Added
INSTALL.mdat the repo root: a full step-by-step setup guide starting from installing the Flutter SDK itself (including theC:\flutterWindows convention) through running the example app, with a "why does this need two servers" explanation up front and a troubleshooting section. Linked from the main README's "Install" section. - Added a short "Example pages" section to the main README's file
reference, describing what each of the 12
example/lib/pages/WML/Dart pairs demonstrates, and notingapp012specifically as the source of the grouped-report example used earlier in the README. - Collapsed
example/README.md's own step-by-step setup section (which had grown to duplicate most ofINSTALL.md) down to a short pointer at the new file, keeping only a minimal quick-start snippet — one install guide to maintain instead of two that could drift apart.
1.2.0 #
- Replaced the single-page
example/demo (agp001.dart) with 12 real generator-output pages, each paired with its source.wmlfile in the same folder (example/lib/pages/app001.wml+app001.dart, ...app902.wml+app902.dart) — genuine output from WapForm for Flutter's commercial generator, not hand-written illustrations. Fixed each file's import block (wap/xxx.dart→package:wapform_flutter/xxx.dart) to resolve as a normal pub dependency; no other changes to the generated Dart. example/lib/main.dartrewritten as a flat reference-gallery list of all 12 pages (no shared login/session/menu — each page opens standalone via its ownshowAppXXX(context)), replacing the old single hard-coded button (which also had an untranslated Chinese label, "系統參數建檔" — gone now along with the rest of the old page).example/README.mdrewritten to document the new 12-page set, including a table of what each pair demonstrates (master-detail, grouped reports, filtered search, lookup fields, etc.) mapped back to the corresponding sections of the main README.- Known limitation, called out explicitly in the new README:
server/schema.sqlstill only defines thesystable from the old single-page demo. Of the 12 pages, only page 1 (System Parameters) can actually open successfully against this demo database — the other 11 reference tables that don't exist yet in this schema, and are included as WML/Dart reference pairs to read, not as verified end-to-end demos. Extending the schema to cover all 12 is tracked as follow-up work, not done in this release.
1.1.7 #
- Rewrote "Platform support" as "Platform Support & Web-First
Architecture." The previous version asserted the package "compiles
on mobile, desktop, and web" and that everything "behaves the same
on every platform," qualified only by a PDF-output caveat — an
unverified claim (no actual mobile/desktop compile had been run).
The new version is scoped to what's actually been exercised: Web is
the current focus, with mobile support explicitly framed as future
work, not a present (if imperfect) capability. No longer mentions
PDF/
Printing.layoutPdf()/Uint8List(0)at all — report output is described simply as HTML-based viawindow.print()on Web, without implying PDF support is a near-term gap to be filled. Documentation only.
1.1.6 #
- Merged
WML → embeddedandWML → other platforms(the latter had no examples) into one line naming actual candidates:WML → other platforms: MicroPython, Node.js.
1.1.5 #
- Merged the three COBOL subsections ("Not the Same as Typical AI COBOL → Java Conversion", "Isn't Just an Output Target...", "Doesn't Have to Start From Zero") into one ("On COBOL: Not a Language Converter, and Not Starting From Zero") — they covered one connected argument and reads more directly as a single section instead of three, cutting the repeated setup between them (about 45% shorter).
- While merging, restored a fix that had been silently reverted:
the "future can look like" list was back to
COBOL → WML → Flutter/WML → COBOL(the original order) instead ofCOBOL → WML → COBOL/COBOL → WML → Flutter, which is what this repo settled on. This slipped back in when a full-section rewrite was pasted in wholesale later and carried its own draft of that list along with it. Fixed again here. - Confirmed
wapform_flutter.dart(the barrel file) doesn't need its own bullet entry in "File reference" — it already gets an intro paragraph at the top of that section (added in 1.1.1), which fits better than forcing it into either the Lazarus-layer or WapForm-layer list when it belongs to neither. No change needed.
1.1.4 #
- Fixed the employee-master example's indentation:
<dbquery>and<datasource>are both direct children of<card>and should be indented at the same level;<dbquery>was flush against the left margin instead. - Renamed the report tag
<output>to<report>throughout the README (the grouped-report example and its two mentions in "File reference"). This is a naming change on the WML/generator side — the actual<output>→<report>rename in the WML language and generator itself is out of scope for this repo and being handled separately; nothing inlib/changed here. Going forward, documentation in this repo uses<report>as the standard name. Documentation only.
1.1.3 #
- The "From WML to this API" section's master-detail and report
paragraphs were assertions with no code to back them up, unlike the
employee-master example right above them. Both now have full WML +
Dart examples, matching the employee example's format:
- Master-detail: a shipment order (
sh) with its line items (sn), usingmasterfieldsto refilter the detail on every master-record scroll, plus a<dbgrid><item lookup=>grid column wired to a lookup resolver — based onapp006.wml's real structure, not an invented example. - Grouped report: a customer statement using
<group change="sh.cno">withsetvar-accumulated subtotals, translated into aWapReportsubclass'sparseBlock()— based onapp012.wml's real structure (trimmed from three nested group levels to one, for length). - Both Dart examples were checked against real generated output
(
app006.dart/app012.dart) and the actual class definitions in this repo before being written up, after an initial draft used invented method signatures (emit(), a value-returningparseBlock(),TColumn's constructor taking named parameters) that don't match the real API. Corrected before publishing. Documentation only — no code changes.
- Master-detail: a shipment order (
1.1.2 #
- Fixed the "From WML to this API" example:
<dbquery>was shown as a sibling of<card>(declared at the top level, before the card). The actual WML convention — matching every real WML file in this project — is to declare<dbquery>as the first child inside the<card>it belongs to. Documentation only, no code changes.
1.1.1 #
- README's "File reference" section was missing two things that
actually exist in the package:
wapform_filter.dart(added to the barrel export in 1.1.0, but never documented) now has its own entry next towapform_lookup_box.dart; andwapform_flutter.dartitself (the barrel file) now gets a short intro at the top of the section explaining what it does and why every file lives flat inlib/instead of behindlib/src/(so each one stays independently importable). Documentation only — no code changes.
1.1.0 #
wapform_filter.dartis now exported from the barrel file (wapform_flutter.dart). It existed as a real, working widget (WapFilter, wired into the WML→Flutter generator's<dbfilter>output) but was never added to the barrel export list, so anyone importingpackage:wapform_flutter/wapform_flutter.dartcouldn't reach it without also importing the file directly. Translated its remaining Chinese UI strings to English (Search/Clearbutton labels, the range/wildcard syntax hint text) to match the rest of the package.- Fixed
wapform_report.dart's import of the web-embedding helpers: wasimport 'report_web.dart';, which doesn't resolve sincereport_web.dart/report_web_impl.dart/report_web_stub.dartlive inlib/src/, notlib/. Nowimport 'src/report_web.dart';. - Non-Web PDF generation is wired back in.
WapReport.buildPdf()previously short-circuited to always return an emptyUint8List(0)on mobile/desktop — the native print/share dialog would appear, but the resulting document was blank. It now callsPrinting.convertHtml()with a base64-embedded Chinese font (wapFontFaceCss()), sincePrinting.convertHtml()'s underlying offline rendering engine can't see system-installed fonts and would otherwise render Chinese as tofu boxes. This has not been verified against the currently-lockedprintingpackage version — the translation work here had no pub.flutter-io.cn access to confirmPrinting.convertHtml()'s exact parameter names/return type against the version this package locks; it's written against that package's long-stable public API. If you hit a compile error here (e.g. a named parameter not found), please file an issue with the exact error. This also means the "PDF/print output is Web-only" caveat in this README's Platform Support section may now be outdated — please confirm on your target platform before relying on it, and let us know either way. - Custom paper sizes.
paper="8.5x5.5"-style WxH-in-inches sizes (e.g. Taiwan's common pre-printed continuous-form paper) are now recognized alongside named sizes (A4/letter/...), consistently across screen width, CSS@page, andPdfPageFormatgeneration (customPaperSizeInches()). - Fixed two real dataset bugs surfaced while translating their
explanatory comments to English (not just translation — the
underlying logic was corrected):
lazarus_sqldb.dart: duringapplyRecUpdate(), the old-value snapshot used to build a row'sWHEREclause could be read from the wrong record (whatever the cursor currently pointed at, rather than the record actually being updated) after aDELETEshifted the internal record array — in the worst case, this could delete the wrong row.lazarus_sqldb.dart:resync()no longer applies the base windowed-bufferrmCentercentering logic, which doesn't apply to this subclass (TCustomBufDatasetkeeps the full result set in memory) and was shifting the cursor to an unrelated record after<invoke method="locate">.lazarus_db.dart:TDBGridno longer caps its apparent row count against a windowed-buffer field that doesn't reflect this dataset's real record count — this was causing detail grids to render blank even with data present (e.g. a 22-row grid showing nothing).
- Translated the remaining alignment-fix comments in
lazarus_dbctrls.dart,lazarus_dbgrids.dart, andlazarus_stdctrls.dart(2026-08-14 fixes for single-line field vertical alignment and the data-grid header/border gap) to English. wapform_report_style.dart: translated newly-added CSS comments (the paper/trailing-block visual-stitching rule, the reduced cell padding for short paper sizes, and the:nth-childzebra-stripe fallback for reports without explicitrow1/row2classes).- Known issue carried forward, not addressed in this release: four
[DEBUG7 ...]print()calls remain inlazarus_db.dart(dataEvent/doAfterScroll), left over from verifying the 2026-08-14controlsDisabled()fix. Translated their messages to English, but recommend removing them before their next use —print()can't be filtered by consumers and will spam the console of every app that uses this package.
1.0.0 #
- Added a new README section, "Development Vision & Technical Strategy" (with an "AI-Enabled, Highly Automated Translation" subsection), placed between "About the commercial generator" and "From WML to this API". It explains how this port was built (AI-assisted development against WML as a strongly-typed intermediate representation, rather than freeform AI code generation) and the longer-term portability goal (the same WML definition re-expandable against other target platforms/languages, not just Flutter).
- First 1.0.0 release: no breaking API changes from 0.2.4 — this is a
documentation-only release. Bumped to 1.0.0 as a deliberate signal
that the public API (
lazarus_*.dart/wapform_*.dart) is considered stable going forward; see semver notes below if you're pinning a version constraint.
0.2.4 #
- Removed 18 unused private helper functions/methods from
example/lib/pages/agp001.dart(_key,_lkp,_cal,_execSql,_column,_sysInsert,_sysPost,_sysDelete,_log,_lbl,_td,_lookupBox,_vedit,_vcheck,_vlookup,_refreshVars,_tabPage,_nav) — each had zero call sites in this file (verified by counting references before deleting, not just going on the analyzer's say-so). These are standard WML→Dart helper names the generator emits for every page regardless of which WML tags that particular page actually uses;agp001("system parameters master") is a plain single-table form with no lookup/calculated/grid fields, so the lookup/calc/grid/tab/checkbox helpers were dead weight here — other generated pages that do use<dbtable>/<dbgrid>/etc would keep the equivalent helpers. File goes from 791 to 543 lines; no behavior change, purely removes code nothing calls. - Note (not yet addressed): the same file, along with
example/README.md,example/lib/main.dart,example/pubspec.yaml, and one line in this CHANGELOG, still contain Traditional Chinese comments and UI labels (~116 lines with actual Chinese words, plus separate full-width punctuation cleanup still pending inlib/) — tracked for a follow-up English-language pass, not done in this release.
0.2.3 #
Fixes based on the full flutter analyze output for v0.2.2 (the sample
of 2 issues pub.flutter-io.cn shows isn't the whole picture — thanks to running
the complete analysis locally, this round fixes every warning-level
issue found in lib/, not just the ones pub.flutter-io.cn happened to show).
- Fixed 4 more redundant
!null-assertions inlib/lazarus_db.dart(fieldByName,findIndex,paramByName— lines 4315/4526/5686/7410): same shape as the 6 fixed in 0.2.2 (if (x == null) { databaseErrorFmt(...); }followed byreturn x!;), just missed on the first pass because that pass only searched for the exactint.tryParsevariant. - Fixed 3 more in
lib/lazarus_sqldb.dart(lines 1686/2907/4317), including oneis!check followed by a redundantascast. - Fixed 1 in
lib/wapform_expression.dart:1859(ADDWORKDAYS's workday-stepping loop):d = d!.add(...)—dwas already promoted non-null by an earlierif (d == null) return null;. - Fixed 3
unnecessary_castwarnings (lib/lazarus_db.dart:5588,lib/lazarus_sqldb.dart:842and:4930) — each was anascast immediately after anischeck that had already promoted the type. - Removed dead code the analyzer flagged as unused: an import
(
dart:convertinwapform_report.dart), a local variable (baseinwapform_expression.dart), an import'sshow TNotifyEventinlazarus_stdctrls.dart, and three private helper methods inwapform_expression.dart(_isNull,_stackEmpty,_peek— each had an equivalent inline call already in use elsewhere, e.g._stack.isEmpty). - Removed an unused field,
_prevToken, inwapform_expression.dart(written once, never read). - Removed an unused field,
_openAfterRead, fromTDatabaseinlazarus_db.dart. Worth double-checking against the upstream FPC source: the same field name exists on theTDataSet-family classes elsewhere in this file with a real read/write pair (an "open after design-time load" flag tied toactive/loaded()), butTDatabasehas no such lifecycle — this looked like copy-paste leftover rather than a genuine gap, so it was removed rather than wired up. Flagging in case the upstream source says otherwise. - Not touched (flagged for follow-up, not obviously dead code):
_cellTextinlazarus_dbgrids.dartand_SrcReportinwapform_report.dartboth look like functionality that was written but never wired in, rather than pure dead code — left alone pending confirmation of intent. - Not touched: the
unused_elementwarnings inexample/lib/pages/agp001.dart(a dozen or so private helpers like_key/_lkp/_execSql) — this is example/demo code, not the package itself, and the unused methods look like template scaffolding that may be intentionally there for reference. - Not touched: the large number of
info-levelnon_constant_identifier_nameswarnings on prefixed function names inwapform_expression.dart— these intentionally preserve the original COBOL/Pascal-derived naming convention; renaming several hundred of them tolowerCamelCasewould be a much bigger, more disruptive change than the other fixes in this release and needs a deliberate decision, not a drive-by lint fix.
0.2.2 #
- Fixed 6 redundant null-assertion warnings in
lib/lazarus_db.dart(i!,f!,c!,b!afterint.tryParse/similar): each of these is followed byif (x == null) { databaseErrorFmt(...); }, anddatabaseErrorFmtis declaredNever— so the analyzer already promotesxto non-null past that check, making the trailing!a no-op. Confirmed each of the 6 occurrences shares this exact shape before removing the!; not a behavior change, purely removes dead syntax the analyzer was warning about (pub points: static analysis category). - Shortened
pubspec.yaml'sdescriptionfrom 307 to 162 characters (pub.flutter-io.cn's description-length check caps at 180; the previous text listed every translated FPC unit by name and ran well over). LICENSEnow contains the full Modified-LGPL text directly (the static-linking exception, followed by the complete unmodified LGPL-2.1 text), instead of only pointing toCOPYING.LGPL.txt/COPYING.modifiedLGPL.txt. Those two files are unchanged and still the canonical source for each part —LICENSEnow just also reproduces them inline, verbatim, so pub.flutter-io.cn's and GitHub's automated license detectors (which only read the file literally namedLICENSE) can recognize it as LGPL-2.1.- Converted 849 existing
//comments directly above public declarations (classes, typedefs, top-level functions, and first-level class members) to///dartdoc comments acrosslib/. No comment text or code logic changed — only the leading//became///where a comment already immediately preceded a public API element. Most of this content is the original-Pascal-source cross-references already present in the translation (e.g.db.pas L1898), which is genuinely useful dartdoc content, just written with the wrong comment syntax until now.
0.2.1 #
- Fixed a real name collision in the package's public API: a
never-called top-level
isNull(dynamic v)helper inwapform_expression.dartcollided withpackage:matcher'sisNullmatcher, causing anambiguous_exportcompile error in any file that imported this package alongsideflutter_test(e.g. every test file). Renamed to_isNull(private) — unused anywhere in this codebase, so this is not a behavioral change. - Fixed a syntax bug in
test/wapform_expression_test.dart: an unescaped$in a non-raw string literal ('...via $ substitution') is invalid Dart —$always starts an interpolation, raw or not, unless escaped or the string is a raw string.
0.2.0 #
- Added
test/wapform_expression_test.dart: unit tests for the WML expression engine (WapEvaluator) — arithmetic,cond(), variable management (setVar/setRow/clearVars), a sample of the extended built-in function library, anddatasetResolver-backed$id.fieldexpressions via a lightweight fakeExprDataSet(no network/DB dependency, so this runs anywhere withflutter test). CI now runsflutter testin addition toflutter analyze. - Added
example/: a runnable Flutter app built aroundagp001.dart's "系統參數建檔" (system parameters master file) screen — the real generator output for a single-table CRUD form, unmodified apart from its import block. Includes the WapDb HTTP gateway (example/server/server.js,schema.sql) needed to run it end to end. Seeexample/README.md.
0.1.1 #
- Fixed
flutter analyze's one blocking error:lazarus_db.dartandlazarus_dbgrids.darteach declared a same-namedTFieldNotifyEventtypedef with different signatures, causing anambiguous_exporterror fromwapform_flutter.dart's barrel file. Thedbgrids-local one is now declared inline instead of as a duplicate typedef. - Removed a stray
@overrideonTSQLConnection.getFieldNames()—TSQLConnectionextendsTDatabase, notTDataSet, so there was nothing to actually override (a Pascal name collision between two unrelated classes, not a real inheritance relationship). Not a behavioral bug — no method was being silently skipped — just a stale annotation flagged byflutter analyzeasoverride_on_non_overriding_member.
0.1.0 #
- Initial packaging as a standalone, installable Flutter module.
- Fixed a stale import:
lazarus_sqldb2.dart→lazarus_sqldb.dart(inwapform_lazarus.dartandwapform_lookup_box.dart). - Fixed a stale import:
wap_colors.dart→wapform_colors.dart(inwapform_report.dartandwapform_report_style.dart). - Removed
lazarus_lookup_box.dart: an unused, superseded early version ofwapform_lookup_box.dart(no lookup-map caching / search index — seewapform_lookup_box.dartfor the current implementation). wapform_report.dartno longer importsdart:html/dart:ui_webdirectly. The web-only iframe/print-window code now lives behind a conditional import (src/report_web.dart,src/report_web_impl.dart,src/report_web_stub.dart), so the package compiles on mobile and desktop targets as well as web.- All source comments translated from Traditional Chinese to English.
- Added
pubspec.yaml,LICENSE,COPYING.LGPL.txt,COPYING.modifiedLGPL.txt, and awapform_flutter.dartbarrel export.