View Single Post
09-12-10, 08:56 AM   #1
tayedaen
A Deviate Faerie Dragon
AddOn Author - Click to view addons
Join Date: Jun 2006
Posts: 13
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">
                <Size>
                  <AbsDimension x="264" y="281" />
                </Size>
                <Scripts>
                    <OnUpdate>
                        ScrollingEdit_OnUpdate(self,0);
                    </OnUpdate>
                    <OnTextChanged>
                        ScrollingEdit_OnTextChanged(self);
                    </OnTextChanged>
New code (working):
Code:
              <EditBox name="$parentEdit" enableMouse="true" multiLine="true" AutoFocus="false">
                <Size>
                  <AbsDimension x="264" y="281" />
                </Size>
                <Scripts>
                    <OnUpdate>
                        self.cursorOffset = self.cursorOffset or 0;
                        self.cursorHeight = self.cursorHeight or 0;
                        ScrollingEdit_OnUpdate(self,0);
                    </OnUpdate>
                    <OnTextChanged>
                        self.cursorOffset = self.cursorOffset or 0;
                        self.cursorHeight = self.cursorHeight or 0;
                        ScrollingEdit_OnTextChanged(self);
                    </OnTextChanged>