BBS:      TELESC.NET.BR
Assunto:  src/syncterm/scripts/syncterm.wren src/syncterm/wren_bind.c
De:       Deuc¨
Data:     Tue, 28 Apr 2026 17:47:40 -0700
-----------------------------------------------------------
https://gitlab.synchro.net/main/sbbs/-/commit/5f7ae2341062bd086a309ade
Modified Files:
	src/syncterm/scripts/syncterm.wren src/syncterm/wren_bind.c
Log Message:
SyncTERM: Wren foreign toString overrides

The default Object.toString returns "instance of "  fine
for opaque values, useless for data-bearing ones.  Adding overrides
on the foreigns where it earns its keep.

Natural-form (no class prefix; the value has an obvious string form):
  Directory    path with trailing slash, or "Cache/" for the lazy
                BBS-cache directory; "(dead)" suffix when invalidated
  File         path with " (open)" / " (dead)" suffix
  SFTPEntry    server's longname (ls-style) when present, else name

Debug-form ("ClassName(field=val, ...)"; no canonical string form):
  KeyEvent      "KeyEvent('a' 0x0061)" with text when printable,
                 "KeyEvent(0x3B00)" otherwise
  MouseEvent    "MouseEvent(event=N at X,Y)" or "...at X,Y-X',Y'"
  Cell          "Cell(0xNN attr=0xNN)"
  Cells         "Cells(count=N)"  metadata only; scripts can use
                 cells.join(", ") for content via Sequence
  HookHandle    "HookHandle(calls=N)"
  SFTPStat      "SFTPStat(size=N, mode=0NNN, mtime=T)"
  SFTPError     "SFTPError: : " using the new
                 sftp_err_short_name helper for library codes and
                 sftp_get_errcode_name for SSH_FX_* server statuses

SFTPHandle deliberately keeps the Object default  the alive case
is no improvement, and "is the handle closed" wants an explicit
getter, not state buried in toString.  ExtAttr / LastColumnFlag /
FlowControl / CustomCursor / VideoFlags also keep the default 
they're niche bitfield snapshots that scripts query field-by-field.

Co-Authored-By: Claude Opus 4.7 (1M context) 
n
---
  mSynchronetn  hgVertrauen n hHome of Synchronet n gh[vert/cvs/bbs].synchro.net

-----------------------------------------------------------
[Voltar]