IRC log for #riftuidev on 20120331

00:43.44seebsWell, offensive name or not, I'm gonna try to get it into a beta-like state tonight.
00:43.54seebsStupid day job being too interesting to stop working on.
01:42.10TorhalHehe
01:42.38TorhalI know how that is. Ever since I started working on CurseForge, my will to write hobby code has withered considerably.
02:01.55*** join/#riftuidev dolby (~dolby-wow@MMOI/Administrator/pdpc.silver.dolby)
02:01.55*** mode/#riftuidev [+o dolby] by ChanServ
02:58.00seebsSilly question:
02:58.41seebsI just realized that Inspect.Time.Frame() is from-login.  So what should I be using for real timestamps?
02:59.43seebsahh, os.time(0
02:59.45seebs()
03:43.14starlonheh
04:48.17seebsooooh
04:48.37seebswhat if I used pcall for user-provided callbacks instead of randomly being exceptioned out of my code in ways that result in horrible loops?
04:48.39seebsI COULD DO THAT.
04:51.09Imhotharor even xpcall
04:54.38seebsHmm, could do.  For now I'm just ignoring failures.  I care not.
04:54.43seebsIf you give me a bad callback, OWN FAULT
04:57.48seebsWhat are the smallest dimensions the Rift UI will ever report?  I seem to recall being told it always says at least some number vertical and horizontal, and below that it scales without changing pixel counts.
04:58.19Imhothar1024x768
04:59.03seebshmm
04:59.17seebsSo, xpcall is (f, handler).  pcall is (f, ...).
04:59.27seebsDoes xpcall actually mean (f, handler, ...), or does it not let you pass in args?
05:00.40seebsAhh, it does not.
05:00.51seebsSo that means it wants wrappers.  Which makes it fancy and annoying.  But I guess I can do it.
05:01.25Imhotharwell pcall might do the job just as well
05:02.20seebsWell, pcall requires me to do more work to catch/report errors.
05:02.32seebsxpcall(function() foo(bar, baz) end, handler)
05:02.33seebsisn't so bad.
05:07.04Imhotharit's a new GC object per call
06:01.14*** join/#riftuidev Imhothar (bcaebc83@gateway/web/freenode/ip.188.174.188.131)
06:30.36seebsNooooo
06:30.42seebsRiftTextfield doesn't do wordwrap.
06:30.55Imhotharaye
06:31.00seebsAnd I really, really, don't want to try to fake that one up.
06:31.10Imhotharnope
06:31.23seebsSo I may be stalled on RP addon dev, because I cannot think of a sane way to approach this.
06:31.52Imhotharand it doesn't auto-resize so you can't add a scrollbar to it
06:32.03seebsHmm.
06:32.12seebsWell.  I could, because I figured out a workaround for the vertical part.
06:32.38seebsIt's just that... if I try to fake it, I have no clean way to distinguish between line breaks I introduced and line breaks the player really typed.
06:32.54Imhotharyou can't get the width of the longest line
06:32.54seebsnooooo
06:32.59seebsWell, I can.
06:33.01Imhotharso you can't find out how much to scroll
06:33.02seebsI have that one beaten.
06:33.06Imhotharreliably
06:33.08seebsIt is horrible, but it works.
06:33.18seebsI just keep a hidden Text frame and settext it and get its bounds.
06:33.31seebsSeems to work well enough for vertical scrollling.
06:33.57seebsBut I cannot think of a way to fake this up well enough for word wrap.  Hmm.
06:34.13seebsAnd we know the UI has word wrap, because the mail client does it.
06:55.38*** join/#riftuidev starlon (~starlon@tx-184-6-179-33.dhcp.embarqhsd.net)
07:56.20*** join/#riftuidev NerfedWar (~NerfedWar@ACaen-652-1-394-103.w81-48.abo.wanadoo.fr)
08:03.19seebsHuh.  That was about 8 1/2 hours AFTER most of a day's work.
08:03.23seebsNo wonder I'm tired.
08:23.25ZorbaTHuthonestly a lot of the widgets are in pretty bad shape right now. most of that development was done by someone else, and he's been busy on another project. Still trying to get him back. If I end up having to do it myself I will, I just have many other things that would be better served
09:34.21*** join/#riftuidev Mere (~Mere@buzzbee.plus.com)
11:57.31Merehmm, an event bug of some kind...
13:16.24Mereyep, it appears that if a player leaves the group, the addon system spams event.unit.detail.blocked events for that player...
14:16.27ZorbaTHutI'll check that out :) shouldn't be hard to fix
15:20.38*** join/#riftuidev Vexx (~email@ip70-185-100-140.ga.at.cox.net)
17:09.40seebsOkay, so, idle thoughts:  I am thinking it may be POSSIBLE to fake up wordwrap in a RiftTextfield.  It'd be horrendously expensive for large fields, but perhaps possible!
17:10.30seebsThe only real loss I see is that I'll destroy single words larger than the textfield's width, or just not wrap them.
17:10.40seebsHmm.  Destroy them.
17:11.34*** join/#riftuidev ZorbaBeta (tocohl@maximilian.pavlovian.net)
17:11.54Merecouldn't you just make Zorba fix it? :)
17:11.56seebsOohh, wait.  No, that may still be too hard.
17:12.05seebsI don't know that Zorba will have time between now and 1.8.
17:12.12seebsBut this one is looking really, really, hard.
17:12.38seebsI feel that any time a reasaonably well-defined text manipulation task takes me over half an hour of thought and I still don't know whether I can do it, this constitutes being "hard".
17:13.17seebsOkay, phase one.  Imagine that we redefine our concept of the field, such that a newline translates to a space, and a double-newline to a newline.
17:13.59seebsWe can implement this through a two-step process in which we translate all newlines to \1, then translate \1\1 to \n and \1 to ' '.
17:14.11seebsSo, we have a field which is currently in this state.  What we do:
17:14.21seebs1.  Do the newlines to spaces-and-newlines transformation.
17:14.27seebs2.  Set a Text frame to this text.
17:14.40seebs3.  Check its width.  If it is larger than the width of the frame, we then have to wrap it.
17:15.57seebsTo wrap it, we look at each line, and see whether it is too long.  If it is too long, we try to find the first subline that's not too long, change that space into a newline, and try again on the rest of this line.
17:16.17seebsAfter each line, we insert a newline.
17:16.35seebsAt the end of this, we have a thing which has width suitable for the field, at which point we can :SetText() the field with it.
17:17.49seebsThe only special case is that any time we encounter a line with no spaces which is too wide, and have to insert a newline (which then permanently breaks that word at that point), we have to increase the cursor position by one if and only if the cursor was after that point.
17:31.56*** join/#riftuidev Imhothar (bcaebc83@gateway/web/freenode/ip.188.174.188.131)
17:44.46seebsI may just ignore this in the hopes that Zorba magically gets an extra week to work on 1.8 and RiftTextfield ends up acquiring word wrap.
17:51.26ImhotharPraying to your favorite deity might help, too
17:51.37seebsHmm.
17:51.46seebsI dunno, I seem to recall there's rather a backlog at the moment.
17:52.07seebsBut at this point, people who were in imminent danger in 1260-1270 or so are about to get answers.
17:52.13ImhotharThere's always a backlog killing all the fun
17:52.25seebsMost of which will be "you've been dead for nearly 800 years, so I guess that's not really relevant anymore, so why exactly did you stay on hold?"
17:53.06seebsSo, I see basically three options.  I can ignore it and hope it goes away, I can try to fix it in a sort of half-baked way which is easily broken, or I can try to fix it properly.
17:53.15seebsPretty sure a proper fix is an order of magnitude or so too much work.
17:55.07seebsI just sorta worry that if I ignore it, it'll create too large a barrier for the non-coders trying to figure out how to use RP addons.
17:59.12ImhotharOh well, as every addon is gonna use the RiftTextfield people will get used to it over time
17:59.34Imhotharbetter leave it as it is and keep up consistency
17:59.39seebsMy assumption would be that it will eventually aquire :SetFont, :SetFontSize, :SetFontColor, and :SetWordwrap.
18:00.02Imhotharand auto-detect enter, tabs etc without a custom event hook
18:02.46seebsYeah.  I'm assuming the rationale of that is that it's assuming it's a single-line field and you want to tab.
18:02.50seebsHuh.
18:03.13seebsCome to think of it, a general flaw of UI item event hooks:  No indication for "and I have handled it, don't do your usual thing".
18:03.18ImhotharAnd still you got to implement tabbing yourself
18:03.36seebsBecause part of the hassle is needing to insert extra text and select it so the typing hook will delete it.
18:07.31seebsSo for text field events, it might be nice to have a way to do hooks which optionally prevent the operation.
18:08.19ImhotharI'm really curious how thick the sheet between the Addon UI and the Native frames is
18:08.41ImhotharAnd whether some day in the distant future the "native" UI will be built with the Addon system
18:09.28Imhotharwith open Lua code so we could hook an manipulate it to our desire
18:18.49ImhotharHmm I didn't encounter the tab insert behavior you describe
18:19.32ImhotharWorks fine with GetCursor and SetCursor
18:21.36seebsHuh, maybe I'm confused.  Part of this is based on studying luapad.
18:21.42Imhotharfrom the storage viewer: pos = self:GetCursor() self:SetText(string.insert(txt, pos + 1, "\t")) self:SetCursor(pos + 1)
18:22.08seebsAnyway, my guess is that rebuilding the native UI in addon API is a long way out, partially because some of the functionality you want to make that is only safe to have if you retain control over how it's used.
18:22.15Imhotharyes, luapad does the space insertion thing, I never understood why
18:22.36seebsHuh, wonder if it's a leftover from a previous implementation.  It works, anyway.  I could take it out and try something else.
18:22.49seebsBut consider that you can change what buttons do in combat with the base API.
18:22.57seebsIf you allow code to change what buttons do... huh.
18:23.00seebsI just had a wacky idea.
18:23.12seebsNo, not wacky enough.
18:23.13Imhotharthat's what the secure environment is for
18:23.22seebsWell, that's the thing.
18:23.34seebsThe base UI can do stuff that we can't.  Like change the binding of a button while in combat.
18:23.41Imhotharya
18:23.49seebsBecause they *know* that that functionality is used only by things like ability-dragging which are safe to allow.
18:24.19Imhotharthey could always keep some API calls that are restricted to Trion "addons"
18:24.30seebsCould be, but that sounds risky to me.
18:24.32Imhotharand simply fail if called from a third party Addon
18:24.46seebsIt's my one real regret about the UI design -- I wish they'd started on addons about a year earlier and done the UI that way.  :)
18:25.51Imhotharand dragging is technically hardware-triggered, i.e. user-triggered (ignoring fancy HIDs for now), and that could make certain features possible even in restricted lockdown
18:27.48ImhotharI find the way they did it in WoW very elegant: you got "secure" UI elements and tell them what to do on certain events like change target, cast something, drag something onto etc, but you have to specify this behavior before entering combat
18:28.29seebsWell, right now, you can drop an ability on the mouse from code.  But yeah.
18:28.44seebsI wouldn't mind seeing a migration in that direction.
18:28.50ImhotharI'm very keen on what the Trion team comes up with
18:29.00seebsI've been busy on other stuff, so I haven't looked to see whether I can do my own action bars yet.
18:29.08seebsI very much want the ability to make action bars.
18:29.16seebsBut what I *really* want is for someone else to do it for me.
18:29.22Imhotharautobar
18:29.30Imhotharshould be the default in every damn game
18:30.38seebsNot familiar with it.
18:30.39Imhotharit's just so logical to have the action bar do basic decisions like "oh, this button had a healing potion, but the player ran out of healing potions. But there are other healing consumables in the ivnentory, so why not offer one of those instead"
18:30.55seebsAhh, neat.
18:31.10seebsThe big thing I want is to be able to change shape or # of buttons.
18:32.32Imhotharor imagine you have 10 kinds of food in your ivnentory and the action bar automatically places the enxt available on the button, from strongest to weakest so you don't have to open the bags to find the right cake
18:32.44seebsThat makes sense, yeah.
18:33.15ImhotharThat's basically what autobar does in WoW, place similar items on the same action button
18:33.31Imhotharthat button can be "opened" to show all items queued for that button
18:33.40Imhotharfor selective use
18:34.36ImhotharYou still have to klick the button, but you can rely on button X to have "something that heals me" and not have buttons 5-9 wasted on healing items
18:35.23ImhotharIt's a sort of automation though, so I can see some people rage about it
18:36.08seebsI got /ignored once for running Chatterbox.
18:36.15seebsThe nerve of me, RPing on an RP server.
18:36.27Imhotharhaha fun
18:40.11seebsChatterbox is up nextish on my addon list, but I want to get the RP addons in place for 1.8.
18:42.16seebsmeh
18:42.36seebsI want headphones, but headphones I would actually want are 30+ miles away.
18:42.41seebsI don't really feel like Out.
18:42.50seebsI think I'll just live without headphones for a bit.
18:44.07ImhotharIs your spouse shouting around random Addon names?
18:44.23seebsNot right this minute.
18:44.29seebsAlthough I think that was where I got Chatterbox.
18:45.18Imhotharif it had two x's it were even a reference to a music album
18:47.12Imhothargot any feature reuqests for storage viewer, in case you're using it for debugging?
18:49.22Imhotharwas thinking about making a message viewer for comms testing/sniffing
18:49.51ImhotharMake it a "Rift Developer Tools Stuite" something
18:50.03seebsMaybe it'll show up in Trion Dev Tools.
18:50.21seebsI wonder if ZorbaBeta would accept patches and enhancements to TDT.
18:50.39ImhotharTogether with Luapad and your remote executing code that would make quite a useful devkit
18:50.55Imhotharya, I changed /dump to dump the argument instead of _G
18:50.55seebsI dunno, but I think RiftRC may now be a better editor than luapad.
18:50.58Imhotharfound that more useful
18:51.09seebsOh, you might wanna look at SlashPrint, which does that too.
18:51.15seebsPrints arbitrary expressions, etc.
18:51.26seebsBut also much more legible output than dump()
18:51.30Imhotharoh well, changing /dump to do that was a one-liner
18:51.47seebsAs I recall, luapad didn't have snippet-saving working.
18:51.56ImhotharI fixed that myself
18:52.01seebsRiftRC's gimmick includes not just saving snippets, but marking some snippets to be run automatically at login.
18:52.57seebsOh, and constant syntax checks.  :)
18:53.16Imhotharyou run loadstring() on every character chang?
18:53.45seebsAyup.  It turns out that luajit is several orders of magnitude faster than typing.
18:54.25ImhotharI originally had in mind to allow StirageViewer to compress/uncompress only selected parts of the text, but unfortunately RiftTextfield is not binary-safe
18:54.58ImhotharAnd I believe it cuts off at \0, which is kinda unfortunate for displaying binary data
18:55.05seebsheh
18:55.33seebsYeah, I've sort of come to think that, on modern hardware, there's no reason not to do a lot of stuff on any user change.
18:55.48Imhotharindeed
18:56.27Imhothari run pattern searches in my search window thourhg all item types the user owns on any character and it's not noticeable
18:57.02Imhotharconsidering how slowly humans type...
18:57.54seebsYeah.  Same deal for my items-owned tooltips.
18:58.09seebsI'm pretty sure I'm actually duping the entire table of everything the player owns before filtering it.
18:59.42seebsI suppose I could hack around the RiftTextField thing a bit by splitting the editor into two parts, a small editor and a larger text field below it showing what it actually looks like.
19:00.24Imhotharcertainly not a bad idea
19:00.38seebsI dislike it, but I may dislike it less than the currently non-functional state.
19:01.05Imhotharbut... you can guarantee other players to perceive it exactly as the author types it in
19:01.06seebsI'd just show it in a Player Viewer window, except I think small screens won't have the screen real estate to have them both up at once.
19:01.29seebsI suppose I should fix the flags first.
19:01.41ImhotharEven if RiftTextfield had proper wrapping etc. it might not be guaranteed to look exactly the same in a simple Text frame
19:01.48seebsI'm fine with that, honestly.
19:02.05seebsI just want to be able to tell whether I have paragraph breaks in roughly the right places, or see the text I'm editing.
19:02.14Imhotharwysiwyg
19:02.55seebsYeah.  So having the textfield work would be awesome.  Hmm.  What if I had a single editor frame which displayed the contents of whichever textfield you were in?
19:03.11Imhotharhow about adding text markups for building a über bio page with pictures and sparkles and stuff
19:03.20seebsOh, hey.  Idle question:  Have you found any way to filter textfield contents other than retroactively editing them in the TextfieldChange handler?
19:03.30seebsLike, say, a way to reject a key-typed event?
19:03.55seebs'cuz that would be awesome.
19:04.06Imhotharnot yet
19:04.55Imhotharoh btw, in your online docs when showing the methods of a Frame type it lists only the Events
19:05.49seebsYeah, it's... dodgy.
19:05.54seebsHey, I could spend some time fixing that up.
19:06.14seebsRight now, it has a really naive set of rules for guessing what category to put things in.
19:06.16Imhothar<PROTECTED>
19:06.34Imhotharhas=had
19:06.55seebsYeah.  Eww.
19:07.09Imhotharflagging a bool if the next TextfieldChagnge should be accepted or not
19:07.20ImhotharEww. Exactly.
19:07.42ImhotharNow that assumes the order of events is a) consistent and b) meaningful
19:08.17Imhothari.e. TextfieldChange -> KeyDown -> TextfieldChange and not some fancy out-of-order thingie
19:10.23seebsI have had some events demonstrably out of order, though not on a single widget.
19:10.31seebsBut I can get a mousein(new) before I get mouseout(old).
19:10.40Imhothari get that all the time
19:10.54seebsOkay, I have abstracted my rules for identifying the keyword for a thing.
19:10.57Imhotharneed to "fix" those frames by doing the same stuff in MouseMove as in MouseIn
19:12.05seebsAh-hah!  Trickery.
19:12.17seebsI now have a category "UNMATCHED" for all the things that were not identified by something else.
19:17.38ImhotharInteresting, RiftButton has LeftPress, but not RightPress, MiddlePress, ...
19:22.50seebsI think I am buying Zorba's theory that the widgets are not fully finished tasks.
19:23.00Imhotharaye
19:23.16ImhotharIs Trion US or Europe?
19:23.49seebsUS
19:27.05seebsOkay, BEHOLD!
19:27.10seebshttp://www.seebs.net/rift/pts
19:27.14seebsMUCH more usable.
19:27.20ImhotharBEHOLDING
19:27.41Imhotharweee magic!
19:28.15Imhotharwhere is http://www.seebs.net/rift/live ?
19:28.38seebsDoesn't exist, because I am too lazy.
19:28.53seebsI will probably make it and update it when 1.8 goes live and I suddenly care.
19:28.53Imhotharwhere are the unified diffs between pts and live docs?
19:29.03seebsI haven't gotten the patch to make those yet.  :P
19:29.11seebsActually a sorta cool idea, though.
19:29.43seebs.... argh
19:29.49seebsI have totally lost whatever I was doing.
19:30.01seebsI think... uhm.
19:30.08seebsI was...  There was a thing.
19:30.14ImhotharRiftTextfield?
19:30.17Imhotharagain?
19:30.28seebsOhh, I remember.
19:30.35seebsYou pointed out that a frame showed only the events.
19:30.54seebsAnd I fixed that!
19:31.02ImhotharAnd I salute you
19:31.12seebsThe funny thing is, by the time I was looking at it I had forgotten why I was looking at it.  So I just fixed everything in sight.
19:31.25seebsThere is now a category UNMATCHED for any items that don't fit one of the rules.
19:31.26Imhotharvery noble
19:31.35Imhotharyou mentioned that
19:31.38seebsNobility's just another word for forgot what I am doing.
19:31.52seebsBasically, I'm stateless.
19:31.58seebsI have no memory of what I've recently said or done.
19:32.10seebsSo I will tell people the same stories many times because I don't know that I've told them.
19:32.16seebsOn the other hand, I'm really fast.
19:32.35ImhotharIt's like a goldfish, seeing something new every 3 seconds
19:32.38seebsYeah.
19:32.59seebsIt's... basically, if everyone were like me, it would suck.  But having a few people like me around is really useful.
19:33.45seebsI think I may move UI.* to their own category.
19:35.26seebsYeah, that's better than having CreateContext and CreateFrame be their own categories.
19:39.21seebsoooh food
19:39.26seebsI'm gonna go obtain food.
19:39.31Imhotharenjoy
20:44.18seebsnoooo
20:44.29seebs:GetHeight() is wrong on a text field with :SetWordwrap(true)
20:45.52seebsI think I am now truly defeated.  I can't make text frames with wordwrap work even if they're not textfields.
20:49.00seebsWait.
20:49.16seebsThey... huh, that's interesting.  They work when they've actually been rendered, or something.
20:49.27seebsBecause the textfields in my tooltips are getting the right values.
20:50.35seebsweeeird
20:50.44seebsOkay, now I'm stumped.
20:52.55seebsI have a frame which is not showing height as expected, and another which is.  And I can't figure out why.
20:57.23seebsoh
20:57.31seebsbecause I am not setting wordwrap on it
22:27.57seebsOkay, there are still a lot of nuisances.  Like textfields not having :SetEnabled.  Or :SetWordwrap.  Or :LoveUsForOurselves.
22:28.09seebsBut as proof of concept go, it's pretty concepty.
22:28.19seebsNext pass will be making flags work.
22:29.44*** join/#riftuidev Leoon5k (Leoon5k@247.162.9.46.customer.cdi.no)
23:41.30starlonWhat are you working on, seebs?
23:41.45starloncan't keep his mind on reading stuff atm.lol
23:42.25starlonoh he's not here
23:44.24starlonwb Cairenn
23:44.27Cairennhi hi
23:47.28starlonAnother good argument in favor of using LibStub in Rift is shear portability. I didn't have to edit so much of LibScriptable to port it.

Generated by irclog2html.pl Modified by Tim Riker to work with infobot.