Hello Forum,
I'm getting a "Member not found." error for a particular property of an ActiveX control. The ExternalStructure reveals that the property is, indeed, there, and the control instantiates correctly in every other way. Here's the code: XtremeCommandBarsPresenter>>#loadMenuBar: anXtremeMenuBar | thisBar | thisBar := commandBars addMenuBar: anXtremeMenuBar name. thisBar doubleGripper: anXtremeMenuBar keepsImageAndCheckMarkSeparate. ^anXtremeMenuBar where "commandBars" is an instance variable defined in #onViewAvailable in the following manner: commandBars := self view controlDispatch activeMenuBar commandBars and XtremeMenuBar>>#keepsImageAndCheckMarkSeparate answers a Boolean (XtremeMenuBar is my high-level model of this CommandBar). I have confirmed that the instance variable "imageAndCheckMarkSeaparated" in XtremeMenuBar is initializing properly to a Boolean. Any ideas? Thank you. Cheers, Eric |
"Eric Taylor" <[hidden email]> wrote in message
news:002101c6d9f4$38a0fcc0$6500a8c0@server... > Hello Forum, > > I'm getting a "Member not found." error for a particular property of an > ActiveX control. >... > XtremeCommandBarsPresenter>>#loadMenuBar: anXtremeMenuBar > > | thisBar | > thisBar := commandBars addMenuBar: anXtremeMenuBar name. > thisBar doubleGripper: anXtremeMenuBar > keepsImageAndCheckMarkSeparate. > ^anXtremeMenuBar > ... What type is #addMenuBar: defined as returning? If it is returning a generic IDispatch, then this might explain the error you are seeing. Trying inserting a #asImplType to down-cast the result to the actual type. HTH OA |
Support at Object Arts,
Ah, yes. Blair warned me about this with respect to this very same ActiveX control. I've been on the watch for this "downcasting" issue. It would seem I was bitten again. Thank you. Cheers, Eric > -----Original Message----- > From: Support at Object Arts [mailto:[hidden email]] > Posted At: Wednesday, September 20, 2006 11:01 AM > Posted To: comp.lang.smalltalk.dolphin > Conversation: ActiveX Control Member: 'Member not found.' Error > Subject: Re: ActiveX Control Member: 'Member not found.' Error > > "Eric Taylor" <[hidden email]> wrote in message > news:002101c6d9f4$38a0fcc0$6500a8c0@server... > > Hello Forum, > > > > I'm getting a "Member not found." error for a particular property of > > ActiveX control. > >... > > XtremeCommandBarsPresenter>>#loadMenuBar: anXtremeMenuBar > > > > | thisBar | > > thisBar := commandBars addMenuBar: anXtremeMenuBar name. > > thisBar doubleGripper: anXtremeMenuBar > > keepsImageAndCheckMarkSeparate. > > ^anXtremeMenuBar > > ... > > What type is #addMenuBar: defined as returning? If it is returning a > generic > IDispatch, then this might explain the error you are seeing. Trying > inserting a #asImplType to down-cast the result to the actual type. > > HTH > > OA |
In reply to this post by Support at Object Arts
Support at Object Arts,
>What type is #addMenuBar: defined as returning? I have explored your suggestions a little further, and I don't believe the problem revolves around type. #addMenuBar: returns a type of XtremeCommandBarsICommandBar (CommandBar for short), and that is, indeed, the type I'm seeing in the debugger. #doubleGripper and #doubleGripper: are, in fact, defined in XtremeCommandBarsICommandBar. >Try inserting a #asImplType to down-cast the result to the actual type. I assume you mean at the point where I assign the #addMenuBar:'s answer to an instance variable. I tried both of the following: | thisBar | thisBar := (commandBars addMenuBar: anXtremeMenuBar name) asImplType. ...and... | thisBar | thisBar := (commandBars addMenuBar: anXtremeMenuBar name) downCast. Neither has any effect, and the problem persists. Still stumped. Cheers, Eric > -----Original Message----- > From: Support at Object Arts [mailto:[hidden email]] > Posted At: Wednesday, September 20, 2006 11:01 AM > Posted To: comp.lang.smalltalk.dolphin > Conversation: ActiveX Control Member: 'Member not found.' Error > Subject: Re: ActiveX Control Member: 'Member not found.' Error > > "Eric Taylor" <[hidden email]> wrote in message > news:002101c6d9f4$38a0fcc0$6500a8c0@server... > > Hello Forum, > > > > I'm getting a "Member not found." error for a particular property of > > ActiveX control. > >... > > XtremeCommandBarsPresenter>>#loadMenuBar: anXtremeMenuBar > > > > | thisBar | > > thisBar := commandBars addMenuBar: anXtremeMenuBar name. > > thisBar doubleGripper: anXtremeMenuBar > > keepsImageAndCheckMarkSeparate. > > ^anXtremeMenuBar > > ... > > What type is #addMenuBar: defined as returning? If it is returning a > generic > IDispatch, then this might explain the error you are seeing. Trying > inserting a #asImplType to down-cast the result to the actual type. > > HTH > > OA |
Free forum by Nabble | Edit this page |