Author Topic: Call _open_temp_view in combo box on_create fails.  (Read 4809 times)

shadowbane

  • Community Member
  • Posts: 85
  • Hero Points: 4
Call _open_temp_view in combo box on_create fails.
« on: February 19, 2010, 06:20:47 PM »
Hello,

It seems that a call to _open_temp_view fails when placed in a combo box's on_create handler.  Unfortunately, in order to populate this particular combo box I need to run an external command and parse its output.  The call also fails when run in the dialog box's on_load.  If I run the call from a _command, however, it works fine.  The call fails saying that "This property or method is not allowed on this object".  It also reports a stack where the top entry isn't on the line with the _open_temp_view.  But commenting out the _open_temp_view gets me past without issue. 

Has anyone experienced this before?  Know of a workaround or what I'm doing wrong?

I've attached the script for the curious.

shadowbane

  • Community Member
  • Posts: 85
  • Hero Points: 4
Re: Call _open_temp_view in combo box on_create fails.
« Reply #1 on: February 19, 2010, 06:21:46 PM »
Guess I should point out that PendingChanges is the dialog name, and ctlWorkspace is the combo box.  The script I uploaded has the code in the on_load on the dialog box presently.

shadowbane

  • Community Member
  • Posts: 85
  • Hero Points: 4
Re: Call _open_temp_view in combo box on_create fails.
« Reply #2 on: February 23, 2010, 05:26:10 PM »
Answering my own message. (can I give myself a hero point?)

It turns out that the stack was jumping to the wrong line when I double clicked on it.  The actual problem was:
      int orig_buf_id = p_buf_id;
that occured in the routine.  There is no buffer associated with the form or combo box, so this line was failing.

-Tyler