Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.clipper.visual-objects > #9236

Re: Object creation failed

From "Glen Townsley" <glent@pronamics.com.au>
Newsgroups comp.lang.clipper.visual-objects
Subject Re: Object creation failed
Date 2016-04-10 05:34 +1000
Organization Aioe.org NNTP Server
Message-ID <neblgl$1ifd$1@gioia.aioe.org> (permalink)
References <ndjep1$8rk$1@dont-email.me> <3400189b-cbf5-4e0d-bd6c-78bd2ca4cbf4@googlegroups.com> <ne95ed$jlr$1@dont-email.me>

Show all headers | View raw


James,

I have this line in my PostInit to create a web browser:

SELF:lValidWeb := SELF:oDColeWebBrowser:CreateEmbedding( "Shell.Explorer" )

HTH

Cheers

Glen Townsley

"James Martin"  wrote in message news:ne95ed$jlr$1@dont-email.me...

This is not working, possibly because I don't have the right name for
the OCX control. Here is the code I am trying with:

SELF:oDCOCX_Shell1 :=
WebInsert{SELF,ResourceID{PRICETAB_FLOORONG_OCX_SHELL1,_GetInst()}}
SELF:oDCOCX_Shell1:HyperLabel :=
HyperLabel{#OCX_Shell1,NULL_STRING,NULL_STRING,NULL_STRING}
IF !SELF:oDCOCX_Shell1:CreateEmbedding("WEBINSERT")
ErrorBox{SELF,"Failed to initialize the web server"}:Show()
ENDIF

Here is the offending code:
*
oDCOCX_Shell1:CreateFromAppDocStorage(OleAppDocStorage{__MDFFILENAME__,
"PriceTab_Floorong", "OCX_Shell1"})

What is the AppDoc?
Where can I find MDFFILENAME ?
Where can I find the name of the OCX?

Thanks for your help

James


On 16-04-01 02:54 AM, Mathias wrote:
> The best way is to get rid of the mdf file and create the Control in your 
> PostInit method instead.
>
> First copy the code that initializes the Control from init to postinit and 
> also copy the variable declaration in the class declaration. Then tell the 
> window editor not to create code for the Control and save. Add the Control 
> variable declaration to the class definition and adjust your code in 
> postinit to something similar to my example below. You have find out the 
> ocx Control name for this to work (VCF1.VCF1Ctrl.1 in my case).
>
> self:oDCF1 := 
> VCIFormulaOneWorkbook{self,ResourceID{F1WINDOW_F1,_GetInst()}}
> self:oDCF1:HyperLabel := 
> HyperLabel{#F1,NULL_STRING,NULL_STRING,NULL_STRING}
> self:oDCF1:OwnerAlignment := OA_FULL_SIZE
> if !self:oDCF1:CreateEmbedding("VCF1.VCF1Ctrl.1")
>          InfoBox{,"Failed to initialize F1"}:Show()
> endif
>
> /MathiasH
>
>
> Den torsdag 31 mars 2016 kl. 17:15:49 UTC+2 skrev James Martin:
>> I have a program that uses Microsoft's web browser as an OLE object. I
>> needed to make a new program with variations, but keep the old, so I
>> exported all the modules and created a new application and imported
>> them. That all worked except that my web browser doesn't work. This is
>> the error I get:
>>
>> Error Code: Object creation failed
>> Subsystem: Visual Objects OLE Run Time
>> Function: OLEOBJECT: CREATEFROMAPPDOCSTORAGE
>> Description: Object creation failed
>> Callstack:
>> PRICETAB_FLOORONG:INIT (Line:9)
>> PRICEBOOK:INIT (Line:39)
>> APP:START (Line:61)
>> START (Line:6)
>>
>> This error comes up when I try to run the program in inr IDE.
>>
>> When I open the window for editing I get the error (but the window opens
>> after I acknowledge the error):
>>
>> Can't load OLE object from AppDoc file.
>>
>> Here is the code in the Init() prg:
>> oDCOCX_Shell1 := 
>> WebInsert{SELF,ResourceID{PRICETAB_FLOORONG_OCX_SHELL1,_GetInst()}}
>> oDCOCX_Shell1:HyperLabel :=
>> HyperLabel{#OCX_Shell1,NULL_STRING,NULL_STRING,NULL_STRING}
>> oDCOCX_Shell1:CreateFromAppDocStorage(OleAppDocStorage{__MDFFILENAME__,
>> "PriceTab_Floorong", "OCX_Shell1"})
>>
>> Here is the code in the PostInit() prg:
>> SELF:oDCOCX_Shell1:AddressBar := TRUE
>> SELF:oDCOCX_Shell1:StatusBar := TRUE
>>
>> SELF:oDCOCX_Shell1:ShowBrowserBar()
>> SELF:oDCOCX_Shell1:Refresh()
>> SELF:oDCOCX_Shell1:Navigate("192.168.10.50")
>>
>> If someone can help me with this AppDoc file it would be appreciated.
>> Thanks.
>>
>> James
> 

Back to comp.lang.clipper.visual-objects | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Object creation failed James Martin <james@northwoodlumber.com> - 2016-03-31 11:16 -0400
  Re: Object creation failed Mathias <mathias.hakansson@consultec.se> - 2016-03-31 23:54 -0700
    Re: Object creation failed James Martin <james@northwoodlumber.com> - 2016-04-01 11:00 -0400
    Re: Object creation failed James Martin <james@northwoodlumber.com> - 2016-04-08 16:52 -0400
      Re: Object creation failed "Glen Townsley" <glent@pronamics.com.au> - 2016-04-10 05:34 +1000
        Re: Object creation failed James Martin <james@northwoodlumber.com> - 2016-04-09 16:38 -0400

csiph-web