[Vimoutliner] outline level numbering is wacked?
Sam Roberts
sroberts at uniserve.com
Sat Mar 10 19:51:04 EST 2007
(sending again now that I am subscribed, sorry if it appears twice)
I don't know, maybe I am using it wrong, but it sure doesn't make sense to me!
The coloring is also a screwed up, since it seems to be following the
numbering.
I'm quite enjoying vimoutliner mode other than this.
Here's what I see (NOTES is attached), lines starting with -- are comments:
=======================================
-NOTES
- Data structure
- objc is the module table
- ; objc = {
4 ; class = lua_objc_lookup_class
-- why is the whole preformatted thing not at the same level, 4?
4 ; __lua_objc_ids = {
4 ; <light userdara of value ptr> = <light userdata of id>
4 ; }
- id (an obj-c object) is represented as a table:
- ; id = {}
4 ; id->metatable = {
4 ; __index = lua_objc_method_lookup
4 ; __gc = lua_objc_release
4 ; __lua_objc_id = <light userdata of id>
4 ; }
3 _ FIXME id uses {}, not ud, so __gc doesn't work!
-- why is this at level 3, its level 4!
- string, number, and boolean all have the same metatable as an id, minus the __lua_objc_id
- : its presence is used as a flag, if there is a metatable for the value, its "pointer"
4 : is looked up in objc.__lua_objc_ids, to find an id for this value
- _ FIXME this doesn't work,
-- why not at level 4, like the line above?
- _ id is randomly lost
-- why not at level 5?
- : NSStrings that compare equal will have the same lua pointer
- _ no garbage collection on this table, it is a memory leak!
- : not sure how this could be fixed
6 : Why is all this done, anyhow, why not attach appropriate metatables to userdata?
-- level 6? this level was 4 a little while ago!
- Todo
2 _ use full userdata instead of tables for id
-- how come level 2 is numbered now, but didn't used to be?
-- also, this is level 3, not 2?
2 _ allow NSArray/NSDictionary, NSNumber, NSString, etc., to behave more luaish?
2 _ We could cache results from NSSelectorFromString() - benchmark it...
2 _ Why does an NSAutoreasePool lie and say respondsToSelector:@selector(retain) is true?
vim:ft=vo_base:ts=2:sw=2:
=======================
-------------- next part --------------
NOTES
Data structure
objc is the module table
; objc = {
; class = lua_objc_lookup_class
; __lua_objc_ids = {
; <light userdara of value ptr> = <light userdata of id>
; }
id (an obj-c object) is represented as a table:
; id = {}
; id->metatable = {
; __index = lua_objc_method_lookup
; __gc = lua_objc_release
; __lua_objc_id = <light userdata of id>
; }
_ FIXME id uses {}, not ud, so __gc doesn't work!
string, number, and boolean all have the same metatable as an id, minus the __lua_objc_id
: its presence is used as a flag, if there is a metatable for the value, its "pointer"
: is looked up in objc.__lua_objc_ids, to find an id for this value
_ FIXME this doesn't work,
_ id is randomly lost
: NSStrings that compare equal will have the same lua pointer
_ no garbage collection on this table, it is a memory leak!
: not sure how this could be fixed
: Why is all this done, anyhow, why not attach appropriate metatables to userdata?
Todo
_ use full userdata instead of tables for id
_ allow NSArray/NSDictionary, NSNumber, NSString, etc., to behave more luaish?
_ We could cache results from NSSelectorFromString() - benchmark it...
_ Why does an NSAutoreasePool lie and say respondsToSelector:@selector(retain) is true?
vim:ft=vo_base:ts=2:sw=2:
-------------- next part --------------
"Extra mappings *****************************************************
"This mapping is fold-level and fold-state dependent
"map <S-Down> dd p
"map <S-Up> dd <up>P
"Common Plugins
" This variable holds name of all VO modules you want to load. Do NOT use ru
" directly in this file, because you will get into many strange surprises. If
" you do not want to load any VO modules leave it blank (default). This
" variable can be freely modified in ~/.vimoutlinerrc.
"let g:vo_modules2load = ""
"let g:vo_modules_load = "checkbox:hoist"
"let g:vo_modules2load = "checkbox"
let g:vo_modules_load = ""
"User Preferences ***************************************************
"let maplocalleader = ",," " this is prepended to VO key mappings
"setlocal ignorecase " searches ignore case
"setlocal smartcase " searches use smart case
setlocal wrapmargin=5
setlocal tw=100
setlocal tabstop=2 " tabstop and shiftwidth must match
setlocal shiftwidth=2 " values from 2 to 8 work well
"setlocal background=dark " for dark backgrounds
"setlocal nowrap
"Hoisting ***********************************************************
"Uncomment and set to 1 to debug hoisting
let g:hoistParanoia=0
"Custom Colors *****************************************************
" colorscheme vo_light
" seems not to take effect!
More information about the VimOutliner
mailing list