Jump to content
Software FX Community

"The object is currently in use elsewhere" ERROR


Recommended Posts

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

Link to post
Share on other sites

> 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

Link to post
Share on other sites

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

>

>

Link to post
Share on other sites

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

>

>

Link to post
Share on other sites

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

>

>

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...