On 6/2/07, Andre <[EMAIL PROTECTED]> wrote:
> John Labenski <[EMAIL PROTECTED]> writes:
>
> I gather that the binding for the properties is now purely a run time
> behaviour
> and that the name cannot be documented any more.
Yes, I have still to write some extra functions to look at the
bindings from within lua, but I think that it should be possible to
get the property list from either C++ or lua.
> I have been extracting the information from the documentation to allow my
> editor
> to suggest the proper name for both properties and methods. I will use only
> method if the properties are not documented any more.
See above.
> Is the resolution of properties expensive in time after it has been resolved?
Not really. The function to run is not found the first time, example
wxSize::GetWidth so "Width" is not found. A string is allocated, the
first 3 chars are set to 'G' 'e' 't' and the property name "Width"
copied into the rest of the string, then the function is looked up a
second time to see if that exists. It works the same for SetXXX
functions.
So, two function lookups instead of one. However, currently the
lookups linearly iterate through them. I think it should be easy
enough to turn this into a binary search which will make things much
faster. The property notation will be at most 2x slower, but probably
much lower. Previously, the function lookup searched for a property
first and when that failed it looked for a function, so the difference
now is that function calls are given precedence.
> Thank you
>
> Andre
>
> PS: By the way my code is now working again
> (needs more testing always does)
I've committed the changes, could you try again, thanks.
John Labenski
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
wxlua-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wxlua-users