EditBox: cursorOffset and cursoHeight
I got some strange errors in the beta concerning new properties of the EditBox:
cursorOffset and cursorHeight. It seems the Blizzard OnLoad code does not set two new properties properly. At least I got nil errors because they were not set. Does anybody have an information about that? Original code (getting nil errors with it): Code:
<EditBox name="$parentEdit" enableMouse="true" multiLine="true" AutoFocus="false"> Code:
<EditBox name="$parentEdit" enableMouse="true" multiLine="true" AutoFocus="false"> |
Assuming you have the ScrollFrame/ScrollChild hierarchy correct, shouldn't it look more like:
Code:
<EditBox name="$parentEdit" enableMouse="true" multiLine="true" autoFocus="false"> |
Quote:
If self.parent is not supplied, then blizzard is adding it for itself. I looked at the code, believe me. This has nothing to do with my findings. Even with your code I get the same error: Code:
Message: Interface\FrameXML\UIPanelTemplates.lua:379: attempt to perform arithmetic on field 'cursorOffset' (a nil value) |
Well the functions ScrollingEdit_OnCursorChanged, ScrollingEdit_OnTextChanged, and ScrollingEdit_OnUpdate are the same on live and beta. That leaves the parenting of your ScrollFrame/EditBox in question (since it is not shown) or you are overlooking the ScrollingEdit_OnCursorChanged difference between what I posted and what you posted (since that is where cursorOffset and cursorHeight are set).
|
Hm, I was detecting this while updating my addon for cataclysm.
The parenting is ok. But perhaps in cataclysm, for locales other then deDE, ScrollingEdit_OnTextChanged is called before ScrollingEdit_OnCursorChanged. That would explain the differences I see. |
All times are GMT -6. The time now is 11:07 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI