[Seaside] JSObject printOn:
renggli at gmail.com
Tue Dec 22 12:29:44 UTC 2009
> Shouldn't JSObject>>printOn: be something else, so printOn: can show
> information in the inspector? And
The use of #printOn: has legacy reasons.
> addLoadScript: anObject
> loadScripts := loadScripts copyWith: anObject.
> ^ anObject
> could more meaningfully reference aJSObject ?
Also it makes it possible to use any objects (like strings themselves)
can be added as load scripts. Furthermore it avoids a naughty
dependency: #addLoadScript: is in Seaside-Core, while JSObject is in
an optional extra package.
> As we rely on examples instead of documentation, these little things can
> really impede 'getting' what a class is doing, IMHO.
You are not the first one to complain about the (mis)use of #printOn:.
Personally, I don't think it is too bad: it clearly communicates what
it prints to.
I agree that it would probably be better to change it to something like
Unfortunately this is not easily possible given the wide application
libraries for over 4 years now.
More information about the seaside