Jump to content

OIP Popups

Recommended Posts

Struggling with making an OIP Popup object functional- the goal is to just have a text based popup with the a list of symbols from an external resource.

I've gotten the popup widget inserted into the OIP, and I've successfully populated it with the names of the symbols from the library file and I have it linked to an existing parameter. However after this I'm not having any luck.


The popup is there, defaulting to blank data. If I click on it, it'll pop open and show me the list of symbols but from here clicking on anything doesn't actually set the field and the popup just returns to an empty field. I'm monitoring the events and there doesn't seem to be anything of note happening on selection with kObjOnInitXProperties  kParametricRecalculate and kObjOnWidgetPrep cycling as usual after modifying a parameter. What am I missing here?

Link to comment

Thanks Pat- that's already the approach I'm using here to build the list. I'm presumably doing this stage correctly as it's getting all the correct data but perhaps this also part of my problem if I'm doing something odd at this stage.


Here's a bit more info to clarify:

I'm using vs.BuildResourceListN on the Lighting Stands library file and getting all the names added correctly with vs.GetNameFromResourceList and vs.vsoWidgetPopupAdd.


In the event script I'm inserting the Widget and this works correctly. 

if theEvent == kObjOnInitXProperties:	#Mostly lifted from _c_'s event example
  ok = vs.SetObjPropVS(kObjXPropHasUIOverride, True)
  ok = vs.SetObjPropCharVS(kWidgetGroupMode, vs.Chr(kWidgetGroupAutomatic))
 #removed other unrelated inserts to keep this clean and clear
  ok = vs.vsoInsertWidget(cP___div2 - 1, kWidgetSeparator, cP___div2, O_GetLocParmName(vs.GetName(pioRecordHandle), '__div2'), 0)
  ok = vs.vsoInsertWidget(symbolContainer-1, kFieldPopUp, symbolContainer, O_GetLocParmName(vs.GetName(pioRecordHandle), '__SymbolList'), 0)

Parameters are set in the Plug in Manager.



Widgets are linked correctly in the OIP, but the Symbols popup is blank by default. 



Clicking the popup will show everything that was added to it, but selecting anything from the list will just return the popup to the blank state as seen above.


Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...