View Single Post
09-15-10, 05:07 PM   #3
tayedaen
A Deviate Faerie Dragon
AddOn Author - Click to view addons
Join Date: Jun 2006
Posts: 13
Originally Posted by Vrul View Post
Assuming you have the ScrollFrame/ScrollChild hierarchy correct, shouldn't it look more like:
Code:
	<EditBox name="$parentEdit" enableMouse="true" multiLine="true" autoFocus="false">
		<Size x="264" y="281"/>
		<Scripts>
			<OnCursorChanged function="ScrollingEdit_OnCursorChanged"/>
			<OnTextChanged>
				ScrollingEdit_OnTextChanged(self, self:GetParent())
			</OnTextChanged>
			<OnUpdate>
				ScrollingEdit_OnUpdate(self, elapsed, self:GetParent())
			</OnUpdate>
No.
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)
Time: 09/16/10 00:55:04
Count: 6
Stack: Interface\FrameXML\UIPanelTemplates.lua:379: in function `ScrollingEdit_OnUpdate'
Interface\FrameXML\UIPanelTemplates.lua:356: in function `ScrollingEdit_OnTextChanged'
[string "*:OnTextChanged"]:1: in function <[string "*:OnTextChanged"]:1>