Jump to content
Software FX Community

"The object is currently in use elsewhere" ERROR


User (Legacy)

Recommended Posts

Posted

Hi,

I have a ChartFX on a form. Through an option dialog, user can change the

type of this chart (between Bar, Surface and Scatter) and the plot

series/values.

This works fine. Until, I have the toolbar shows at the top, as I change

these options, I (sometime) get this error "The object is currently in use

elsewhere". At this point, the toolbar is drawn in RED crossed box.

Note: each time the chart type changed, I called

ClearData(ClearDataFlag.Values | ClearDataFlag.XValues |

ClearDataFlag.Labels | ClearDataFlag.Titles), then re-initialize with the

new chart type (gallery) and its new series/values.

Thanks,

Minh

Posted

> each time the chart type changed, I called ...

Where do you call this from ? Are you calling this code from within a Chart

FX Event ? This can be a problem. For example if the event is coming from

the ToolBar (e.g. InternalCommand event) and then you delete the toolbar in

the event handler code, this will cause an error as upon returning the

object that called you is now destroyed.

--

FP

Software FX

Posted

No, I am calling this ClearData from a button's click event (NOT the chart's

event). When user click on this button, he can select chart type + specify

series/values for the chart. Once clicked OK, I will try to draw the chart

based on the new inputs. Toolbar should still be shown at current spot,

just the chart gets updated.

Another note, when toolbar is drawn in RED crossed-box, the chart seems to

get update with the new inputs.

"SoftwareFX Support" <noreply@softwarefx.com> wrote in message

news:l9Suq0C9EHA.1120@webserver3.softwarefx.com...

> > each time the chart type changed, I called ...

>

> Where do you call this from ? Are you calling this code from within a

Chart

> FX Event ? This can be a problem. For example if the event is coming from

> the ToolBar (e.g. InternalCommand event) and then you delete the toolbar

in

> the event handler code, this will cause an error as upon returning the

> object that called you is now destroyed.

>

>

> --

> FP

> Software FX

>

>

Posted

We are going to need some kind of repro case in order to determine what the 

problem is.

Can you send us a program that reproduces the problem ?

You can either post it here or send it to support at softwarefx dot com.

--

FP

Software FX

Posted

More information:

Now I can reproduce the problem consistently.

While the chart is being updated, if I move the mouse over the toolbar area.

I'll get this error.

"SoftwareFX Support" <noreply@softwarefx.com> wrote in message

news:l9Suq0C9EHA.1120@webserver3.softwarefx.com...

> > each time the chart type changed, I called ...

>

> Where do you call this from ? Are you calling this code from within a

Chart

> FX Event ? This can be a problem. For example if the event is coming from

> the ToolBar (e.g. InternalCommand event) and then you delete the toolbar

in

> the event handler code, this will cause an error as upon returning the

> object that called you is now destroyed.

>

>

> --

> FP

> Software FX

>

>

Posted

Found the problem.

It was a threading bug. My bad.

Thanks anyway.

"SoftwareFX Support" <noreply@softwarefx.com> wrote in message

news:H8vr1UD9EHA.1120@webserver3.softwarefx.com...

> We are going to need some kind of repro case in order to determine what

the

> problem is.

>

> Can you send us a program that reproduces the problem ?

>

> You can either post it here or send it to support at softwarefx dot com.

>

> --

> FP

> Software FX

>

>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...