Page 1 of 1

Theme File Write Access

Posted: Fri Mar 13, 2009 12:27 pm
by 13052797
Hi,
We have a problem with loading the custom theme file into the TeeChart.
The exception we get is

System.UnauthorizedAccessException: Access to the path 'TestTheme.xml' is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode)
at Steema.TeeChart.Themes.ThemeProperties.ReadTheme(Object FileOrStream)
at Steema.TeeChart.Themes.Theme.ApplyChartTheme(String ThemeFile, Chart CustomChart)
at TeeChartThemeTest.Form1.button1_Click(Object sender, EventArgs e) in C:\Data\code\cs\TeeChartThemeTest\TeeChartThemeTest\Form1.cs:line 20
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

The problem actually is tee chart is trying to open the file in write mode whereas the file is a read only file.

The call with which we are trying to load theme file is :
Steema.TeeChart.Themes.Theme.ApplyChartTheme(@"../../TestTheme.xml", tChart1.Chart);

Can you please help me out in reading and applying theme from a read only file?

Posted: Fri Mar 13, 2009 4:59 pm
by yeray
Hi Mahadevan,

I've been able to reproduce it and I've added it to the wish list to be fixed in a further release (TF02013967).

Posted: Mon May 18, 2009 7:51 am
by 13052797
Can you please let me know when a fix for this would be available?

Posted: Mon May 18, 2009 9:31 am
by narcis
Hi Mahadevan,

This issue hasn't been fixed yet nor I can't provide an estimate date. For bug fix announcements I strongly recommend you to be aware at this forum or subscribe to our RSS news feed for new release announcements and what's fixed on them.

Thanks in advance.