From ee3d463024179514f09d80d962d1b9765462dd6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Sat, 6 Apr 2019 19:04:28 +0200 Subject: Add temporary set-attributes! --- module/vcalendar.scm | 13 +++++++++++-- module/vcalendar/primitive.scm | 1 + 2 files changed, 12 insertions(+), 2 deletions(-) (limited to 'module') diff --git a/module/vcalendar.scm b/module/vcalendar.scm index 0f1a3c57..ab404a1a 100644 --- a/module/vcalendar.scm +++ b/module/vcalendar.scm @@ -45,8 +45,17 @@ (as-string attr) (as-string prop))) -;; TODO replace this with procedure-with-setter -(define-public prop get-property) +(define (set-property! component attr prop val) + (%vcomponent-set-property! + component + (as-string attr) + (as-string prop) + val)) + +(define-public prop + (make-procedure-with-setter + get-property + set-property!)) (define-public (properties component attr) (%vcomponent-property-list component (as-string attr))) diff --git a/module/vcalendar/primitive.scm b/module/vcalendar/primitive.scm index f41a7803..400750c9 100644 --- a/module/vcalendar/primitive.scm +++ b/module/vcalendar/primitive.scm @@ -15,6 +15,7 @@ %vcomponent-get-attribute %vcomponent-get-property + %vcomponent-set-property! %vcomponent-property-list %vcomponent-attribute-list -- cgit v1.2.3