00:34 selud joined #geoloqi
04:30 caseorganic-m joined #geoloqi
08:29 caseorganic-m joined #geoloqi
08:58 workshop joined #geoloqi
09:18 caseorganic joined #geoloqi
09:27 plamb joined #geoloqi
10:41 plamb joined #geoloqi
14:13 workshop joined #geoloqi
16:05 <aaronpk> workshop: do you happen to know how to get an NSMenu to reload itself after you add items to it? I add items to it after the menu is shown.
16:06 <workshop> thinking
16:06 <workshop> uh it should be dynamic
16:06 <workshop> is this a normal menu bar menu, or someplace else?
16:06 <aaronpk> up in the system menu bar
16:06 <workshop> oh the top right?
16:06 <aaronpk> basically I want to do exactly what os x's wifi thing does
16:07 <workshop> oh while it's open ?
16:07 MarkDilley joined #geoloqi
16:07 <aaronpk> you click, then it says "searching..." and then it updates with new results
16:07 <workshop> so i think that's a custom view, that came along in 10.5 i think
16:07 <workshop> not a standard nsmenu
16:07 <workshop> lemme check something
16:08 <workshop> yeah you want -[NSMenuItem setView:]
16:08 <workshop> and it was 10.5
16:08 <workshop> you just make an item-looking view
16:08 <aaronpk> that's how they got the little icons in there too?
16:09 <workshop> thinking
16:09 <workshop> it would be a pain to add that stuff back in manually
16:09 <workshop> then again, it's more of a benefit to the user, so maybe they did that
16:12 <workshop> maybe they added the dynamic airport menu in 10.6
16:12 <workshop> in which case it could be NSMenuDelegate protocol
16:12 <workshop> but it's not clear to me if that's dynamic-dynamic, as in while you're looking
16:12 <workshop> or just pre-show
16:12 <workshop> honestly i'd google for "nsmenu dynamic airport"
16:12 <workshop> i've not done a live-refresh menu
16:13 <workshop> but have done lots with just-in-time refreshing
16:13 <aaronpk> I managed to hook into the menuWillOpen delegate thingy to run the http request when the menu pops down
16:14 <workshop> one sec, lemme ask some folks
16:14 <aaronpk> I can set the view on an individual row of the menu?
16:14 <aaronpk> if so, I could grab the "viewWillAppear" event on that custom view
16:14 <aaronpk> and the rest of the rows could be default items
16:15 <workshop> maybe make an nsmenuitem with a view
16:15 <workshop> just try an image view to test
16:15 <workshop> then stick it in the menu along with some regular textual items
16:15 <workshop> and see if it shows
16:16 <workshop> then, put a threaded progress spinner in it instead and see if that run loop actually runs & spins the thing
16:16 <workshop> while shown
16:16 <workshop> one quick way to test if update-live will even work
16:16 <aaronpk> oh darn, there isn't an initWithView on NSMenuItem
16:17 <workshop> is to trigger a performSelector:... withDelay: on show
16:17 <workshop> of like 2 or 3 seconds
16:17 <workshop> and have it add an item above some other item
16:17 <workshop> so, like, you show the menu, and a second or two later, a new item appears
16:17 <aaronpk> does that run it on a different thread?
16:17 <workshop> it runs in the main thread
16:17 <workshop> there is a bg method, but that one is fg
16:17 <aaronpk> ok. i'm arleady modifying the list using callbacks
16:17 <workshop> just after a delay, in a later pass of the run loop
16:18 <workshop> well this is just a test
16:18 <workshop> the same way you trigger your http request
16:18 <workshop> you would do a loop that mods the menu as necessary
16:18 <workshop> basically, this would be a simple test to see if delayed menu editing live-updates
16:19 <workshop> or if you're barking up the wrong tree by trying and should go full custom view
16:21 <aaronpk> it doesn't run that method until after the menu loses focus
16:21 <aaronpk> so... custom view it is apparently
16:22 <workshop> yeah... wondered
16:22 <workshop> my guess is there is no run loop happening for the meu
16:23 <workshop> you may even have to create one and start it manually in your view
16:23 <workshop> you'll know if it blocks
16:23 <workshop> fwiw i've never seen an airport-like menu anyplace else
16:23 <workshop> so either they redid it all or maybe they tie into the nsmenuitem drawing routines manually to save some time (private api)
16:24 <workshop> i have seen custom views, though
16:24 <workshop> i do it myself in pukka
16:24 <workshop> well, actually, no
16:24 <workshop> that's a window that appears in the right place in response to menu fire
16:24 <aaronpk> the airport behavior is exactly what I want
16:24 <workshop> vpn is another menu item that updates
16:24 <workshop> (apple stock one)
16:24 <workshop> has a time connected counter)
16:25 <workshop> as does clock
16:25 <aaronpk> and battery too I think
16:25 <workshop> trying to think of an app...
16:29 <workshop> there we go, that's a cheer up
16:29 <workshop> i knew it had "menu" in the name - lol
16:29 <workshop> big help
16:29 <workshop> lots of custom menus iirc
16:29 <aaronpk> haha yea, that's been happening to my google searches too.
16:30 <workshop> that ONE time when deleting old apps i don't use anymore that i used to keep around in case i needed to reference them bites me
16:31 <workshop> this is what past me feared
16:32 <workshop> yeah, and its submenu
16:32 <workshop> i just remember them being nice and view-y
16:32 <workshop> specific feedback: "the ux is questionable"
16:32 <workshop> you can ask questions of it
16:32 <aaronpk> oh, like quora?
16:36 plamb- joined #geoloqi
16:38 <aaronpk> came in that email at the bottom
17:14 caseorganic joined #geoloqi
18:04 caseorganic-m joined #geoloqi
18:06 workshop joined #geoloqi
18:14 MarkDilley joined #geoloqi
23:14 MarkDilley joined #geoloqi