Artifacts Associated With Ticket 2960221fffffffffffffffffffffffffffffffff
Ticket change [e5a7bcf53f] (rid 104159) by wiede on 2010-02-27 14:54:34:
- assignee initialized to: "dkf"
- cmimetype initialized to: "text/plain"
- comment initialized to:
using the script level of ::oo::define (or ::oo::objdefine) command (for a mostly script level version of Itcl) I am missing a possibility/option to set the USE_DECLARER_NS flag when defining a method and there is no way to set the PUBLIC_METHOD or PRIVATE_METHOD flag for that method, as Itcl cannot use the logic for isPublic as it is implemented in TclOO right now. An additional option to overwrite that logic would be enough. I have done a quick hack in tclOODefineCmds.c TclOODefineMethodObjCmd in adding a "-use_declarer_flag" and a "-protection <protection type>" flag for setting PUBLIC_METHOD or PRIVATE_METHOD or nothing at all likewise. With that feature I can do what I need for Itcl, but that exposes a bug with the "my" command handling when having set the USE_DECLARER_NS flag. I am opening a bug in the bug tracker for that.
- foundin initialized to: "None"
- is_private initialized to: "0"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "wiede"
- subsystem initialized to: "35. TclOO Package"
- title initialized to: "enhanced script level options"
- type initialized to: "RFE"
Ticket change [c62a7a31c1] (rid 121721) by dkf on 2010-02-28 04:53:20:
- icomment:
I suggest implementing a new command in the namespace ::oo::define (and/or ::oo::objdefine). At the C level, you've got access to the core things that the 'method' command uses, so you can do everything they do and more. In particular, you've got TclOOGetDefineCmdContext (to work out what you're working on) and you've got TclOONewProcInstanceMethod and TclOONewProcMethod to actually make methods. (See the code for TclOODefineMethodObjCmd to see how I put these pieces together; it's simple to duplicate.) I don't plan to add flags to 'method' in the near future, so dropping the prio on this as you do have a workaround available.
- login: "dkf"
- mimetype: "text/plain"
- priority changed to: "1 Zero"
- username: "dkf"
- icomment:
Ticket change [25be2713cb] (rid 88220) by wiede on 2010-02-28 16:15:56:
- icomment:
It is correct, that I could a new command in that namespace, I just wanted to avoid duplicating code, but I will use that way now, that you have answered.
- login: "wiede"
- mimetype: "text/plain"
- username: "wiede"
- icomment:
Ticket change [908281bfdc] (rid 226546) by dkf on 2024-05-23 15:45:45:
- closedate changed to: "2460454.15677271"
- closer changed to: "dkf"
- comment changed to:
using the script level of ::oo::define (or ::oo::objdefine) command (for a mostly script level version of Itcl) I am missing a possibility/option to set the USE_DECLARER_NS flag when defining a method and there is no way to set the PUBLIC_METHOD or PRIVATE_METHOD flag for that method, as Itcl cannot use the logic for isPublic as it is implemented in TclOO right now. An additional option to overwrite that logic would be enough. I have done a quick hack in tclOODefineCmds.c TclOODefineMethodObjCmd in adding a "-use_declarer_flag" and a "-protection <protection type>" flag for setting PUBLIC_METHOD or PRIVATE_METHOD or nothing at all likewise. With that feature I can do what I need for Itcl, but that exposes a bug with the "my" command handling when having set the USE_DECLARER_NS flag. I am opening a bug in the bug tracker for that.
- icomment:
8.7 also allows you to override how definition commands are located on a per-class basis, so you can do your own `method` for your own classes without smashing the one for everyone else.
- login: "dkf"
- mimetype: "text/x-markdown"
- resolution changed to: "Wont Fix"
- severity changed to: "Minor"
- status changed to: "Closed"