Thank you Stephen.

Martin had helped me resolve this off-list and I was about to post the
solution.  That was indeed the issue.

Ended up like this:

def DY_propTest_DefineLayout( in_ctxt ):
        return True

def DY_propTest_ComboMode_OnChanged():
        oProp = PPG.Inspected[0]
        oLayout = PPG.PPGLayout
        buildPPGLayout(oProp, oLayout)
        return True

def DY_propTest_OnInit( ):
        oProp = PPG.Inspected[0]
        oLayout = PPG.PPGLayout
        buildPPGLayout(oProp, oLayout)

Cheers,

DAN


On Fri, Dec 11, 2015 at 11:12 AM, Stephen Blair <stephenrbl...@gmail.com>
wrote:

>
> The PPG object is available in callbacks like OnClicked. Like the doc says:
>
> This object can be manipulated within the event handling script code
> associated with a PPGLayout.
>
>
> So, not in DefineLayout.
>
> In DefineLayout, you should get the PPGLayout object and pass that to your
> rebuild function.
>
> On Fri, Dec 11, 2015 at 5:08 AM, Dan Yargici <danyarg...@gmail.com> wrote:
>
>> OK, I'll admit I'm little wet behind the ears when it comes to this sort
>> of thing.
>>
>> Could someone explain why I get a "# NameError: global name 'PPG' is not
>> defined" error with this test property.
>>
>> http://pastebin.com/Z0YYSVbs
>>
>> Many thanks,
>>
>> DAN
>>
>>
>> On Fri, Dec 11, 2015 at 12:14 AM, Stephen Blair <stephenrbl...@gmail.com>
>> wrote:
>>
>>> Plugins are cached (right click one in the Plugin Manager).
>>>
>>> And there's a cache of PPG layouts.
>>>
>>> Never had the global PPG not defined problem.
>>>
>>> On Thu, Dec 10, 2015 at 4:54 PM, Dan Yargici <danyarg...@gmail.com>
>>> wrote:
>>>
>>>> I have been tearing my hear out for hours now while working with a
>>>> plugin not knowing if I'm seeing the updates I've been making.
>>>>
>>>> It's total voodoo.  Sometimes when I reload, all is well, sometimes
>>>> I'll break something on purpose to be certain that it's reloading/updating
>>>> correctly only to find that it actually isn't and it still works despite
>>>> the fact that I broke *hard coded paths*!
>>>>
>>>> I just thought I'd finally got this thing nailed and then restarted
>>>> Soft only to find it was broken again!
>>>>
>>>> What's puzzling me is that accessing PPG from the plugin seems to be
>>>> intermittent (it complains that no global 'PPG' has been defined) and also
>>>> sometimes it won't fire the callbacks like OnChanged.
>>>>
>>>> Anyone else experienced this behaviour?
>>>>
>>>> Tried on 2013_SP2 and the trial for 2015_SP2, both the same.
>>>>
>>>> Cheers,
>>>>
>>>> DAN
>>>>
>>>
>>>
>>
>

Reply via email to