Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic CreateObject (Read 3936 times)
Tony Kim
Guest


CreateObject
Jan 23rd, 2006 at 3:52pm
Print Post  
I get this error when I use the code below

Set tl = CreateObject("TreeLayout")
.....
Set b.Font = CreateObject("StdFont")

=====================
Error Message :
activex component can not make object

--------------------------------------
I use VBScript in IE or ASP.
URGENT!!
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: CreateObject
Reply #1 - Jan 23rd, 2006 at 4:04pm
Print Post  
The TreeLayout ProgID in FlowChartX standard edition is "FlowChart.TreeLayout". The font assignment should work without 'set', just

b.Font = CreateObject("StdFont")
  
Back to top
 
IP Logged
 
Tony Kim
Guest


Re: CreateObject
Reply #2 - Jan 25th, 2006 at 6:05am
Print Post  
Thanks for the quick response.

treelayout is solved...but stdfont do not excute..

  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: CreateObject
Reply #3 - Jan 25th, 2006 at 6:42am
Print Post  
This works in my test script:

Code
Select All
<SCRIPT FOR="fcx" EVENT="BoxCreated(box)">
box.FillColor = 256 * 256 * 255
box.Font = new ActiveXObject("StdFont")
box.Font.Size = 20
box.Text = "xxx"
</SCRIPT>
 



Can you try it in your page ?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: CreateObject
Reply #4 - Jan 25th, 2006 at 7:34pm
Print Post  
Or could it be that the OLE font class is not marked as "safe for scripting" ? Can you check that by setting the  "run control not marked as safe" option in IE to "Prompt"? If that's true, try creating all font objects on the server side. Then the flowchart should load them on the client without any security checks.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint