Re: [opensource-dev] "Adding a dialog" outdated

2012-10-19 Thread CJ Davies
A combination of exploring the source to see how dialogs are currently 
implemented & Oz's email got me on the right tracks & I can now spawn a 
blank dialog from a new menu entry - incidentally the 2009 page on the 
wiki for adding menu entries is still fairly current.

Quick & dirty blog post about my findings here, might want to copy/drop 
a link on the wiki page until it gets properly updated? No ads on my 
site so this isn't a thinly-veiled attempt to drum up ad revenue for 
myself ;)

http://cjdavies.org/?p=1344

Regards,
CJ Davies

On 18/10/12 23:57, Sodovan Torok wrote:
> On 12-10-18 09:55 AM, CJ Davies wrote:
>> Just noticed that the wiki page hasn't been updated since 2008. Is there
>> any more recent documentation that works?
>>
>> Regards,
>> CJ Davies
> "Use the source, Luke!"
>
> Unhelpful, but true in a rapid moving target like the viewer.
>
> ___
> Policies and (un)subscribe information available here:
> http://wiki.secondlife.com/wiki/OpenSource-Dev
> Please read the policies before posting to keep unmoderated posting privileges
>

___
Policies and (un)subscribe information available here:
http://wiki.secondlife.com/wiki/OpenSource-Dev
Please read the policies before posting to keep unmoderated posting privileges


Re: [opensource-dev] "Adding a dialog" outdated

2012-10-19 Thread Nicky Perian
You can edit that wiki page or put your information in the discussion tab. 
Login to the wiki (upper right) using your SL account information and that will 
open up the edit rights. Using external links is subject to broken link errors 
so, a direct edit would be best.

I had fumbled through that page instructions before and never took time to 
document anything.

Thanks for taking time to document your experiences.
   



>
> From: CJ Davies 
>To: opensource-dev@lists.secondlife.com 
>Sent: Friday, October 19, 2012 5:39 AM
>Subject: Re: [opensource-dev] "Adding a dialog" outdated
> 
>A combination of exploring the source to see how dialogs are currently 
>implemented & Oz's email got me on the right tracks & I can now spawn a 
>blank dialog from a new menu entry - incidentally the 2009 page on the 
>wiki for adding menu entries is still fairly current.
>
>Quick & dirty blog post about my findings here, might want to copy/drop 
>a link on the wiki page until it gets properly updated? No ads on my 
>site so this isn't a thinly-veiled attempt to drum up ad revenue for 
>myself ;)
>
>http://cjdavies.org/?p=1344
>
>Regards,
>CJ Davies
>
>On 18/10/12 23:57, Sodovan Torok wrote:
>> On 12-10-18 09:55 AM, CJ Davies wrote:
>>> Just noticed that the wiki page hasn't been updated since 2008. Is there
>>> any more recent documentation that works?
>>>
>>> Regards,
>>> CJ Davies
>> "Use the source, Luke!"
>>
>> Unhelpful, but true in a rapid moving target like the viewer.
>>
>> ___
>> Policies and (un)subscribe information available here:
>> http://wiki.secondlife.com/wiki/OpenSource-Dev
>> Please read the policies before posting to keep unmoderated posting 
>> privileges
>>
>
>___
>Policies and (un)subscribe information available here:
>http://wiki.secondlife.com/wiki/OpenSource-Dev
>Please read the policies before posting to keep unmoderated posting privileges
>
>
>___
Policies and (un)subscribe information available here:
http://wiki.secondlife.com/wiki/OpenSource-Dev
Please read the policies before posting to keep unmoderated posting privileges

Re: [opensource-dev] "Adding a dialog" outdated

2012-10-19 Thread Richard Nelson

Yes, LLFloaterReg is the current mechanism for creating and displaying new types of floaters (windows).There is a separate mechanism for "notification" style dialogs, in llnotifications*.h/cpp, appropriately enough.  Unfortunately, I don't think there is good documentation in the wiki for that yet.  The closest thing is probably http://wiki.secondlife.com/wiki/Adding_UI_Hints.  Usually the term "dialog" maps to our concept of "notification" so I'm guessing that might actually be more appropriate in your case.R.On Thu, 18 Oct 2012 07:51:23 -0700, Oz Linden (Scott Lawrence)  wrote:
On 2012-10-18 09:41 , CJ Davies wrote:


  I'm trying to follow the "Adding a dialog" page on the wiki

http://wiki.secondlife.com/wiki/Adding_a_dialog

however I suspect it hasn't been updated to reflect changes to the 
codebase & as such I can't get it to work. In particular,

LLUICtrlFactory::getInstance()->buildFloater(this, "floater_foo.xml");

doesn't compile as there is no buildFloater method in LLUICtrlFactory. 
Can anybody shed some light on how we now go about creating dialogs?




It's possible (likely, even) that there's more than one way, but one
I worked on recently worked this way

The floater is registered in newview/llviewerfloaterreg.cpp:

 LLFloaterReg::add("prefs_autoreplace", "floater_autoreplace.xml", (LLFloaterBuildFunc)&LLFloaterReg::build);




It is then shown by code in newview/llfloaterpreference.cpp:

LLFloaterReg::showInstance("prefs_autoreplace");



The code for that floater is in newview/llfloaterautoreplacesettings.cpp





  ___
Policies and (un)subscribe information available here:
http://wiki.secondlife.com/wiki/OpenSource-Dev
Please read the policies before posting to keep unmoderated posting privileges