Closed K1D77A closed 10 months ago
You need to do a little extra work to deal with the clog closures. Does this do what you want?
(defun substack-rules (body)
(let ((r (gethash (find-class 'breca::substack) breca::*resource-rules*))
(gui (create-gui-window body :title "Rule Categories")))
(loop :for (category rules) :on r :by #'cddr
:do (let ((my-category category) ; for clog closure purposes
(my-rules rules) ; for clog closure purposes
(d (create-div (window-content gui) :class "rules"
:content
(spinneret:with-html-string
(:div :class "rule"
(:p my-category))))))
(set-on-click d (lambda (o)
(inspect-rules o my-category my-rules)))))))
Yes it did fix it. Thanks. What a silly problem :joy:
Hi I seem to have run into a problem I have my GUI made with clog-gui![image](https://github.com/rabbibotton/clog/assets/10334164/b4f1d113-5733-4ab3-9aff-a87fcedaabf5)
I then have the Rules dropdown which has one option and when selected I have:![image](https://github.com/rabbibotton/clog/assets/10334164/7ad0a770-1dde-4075-8eb2-14c56de0d1fd)
Now what is strange is that whenever i click on any of the options I get the same data displayed in the new window.![image](https://github.com/rabbibotton/clog/assets/10334164/3b7841a3-e695-49c2-bbbf-c215a90bb101)
No matter which I click on I only get the data for the PREMIUM category.
The code I have is the following:
And in my main I just have
I have gone through and checked that all of the values in the set-on-click closure are correct...
Any help would be greatly appreciated. Thanks.