Can you post your glade and handler file

Chris M

> From: viesturs.la...@gmail.com
> Date: Sat, 19 Jan 2013 21:54:21 +0200
> To: emc-users@lists.sourceforge.net
> Subject: [Emc-users] Glade question
> 
> Hello!
> 
> I have created a gladevcp panel. Besides other things it contains also
> one spinbox and one horizontal scale widgets.
> I have created adjustments for each of these widgets, where I have set
> min, max and initial values and also value increments.
> The thing is that it does not set initial value correctly and also
> increment is not correct.
> What I did:
> I managed to set initial value in python handler file; so now I have
> correct initial value;
> 
> I still do not have correct increment.
> And since I have to set that value explicitly, I decided that it would
> be more convenient for future use to set initial values from INI file.
> 
> Can somebody help me out with the piece of python code that does that?
> 
> Currently I have this one:
>     def on_velscale_realize(self,widget,data=None):
>         widget.set_value(0.70)
> 
> And I also have found this piece of code, which should read
> velocity_tolerance value from PLASMA section in INI file:
>       inifile = emc.ini(os.getenv("INI_FILE_NAME"))
>       veltol = float(inifile.find("PLASMA", "VELOCITY_TOLERANCE") or 0.0)
> 
> The problem is that I am so dumb in python that I have no idea, what
> is missing to stick both of them together. I failed with brutal
> approach:
>       inifile = emc.ini(os.getenv("INI_FILE_NAME"))
>       veltol = float(inifile.find("PLASMA", "VELOCITY_TOLERANCE") or 0.0)
>         def on_velscale_realize(self,widget,data=None):
>         widget.set_value(veltol)
> 
> Obviously something more is required...
> Thanks in advance for any tips or references to working examples,
> where I can take a look!
> 
> -- 
> Viesturs
> 
> If you can't fix it, you don't own it.
> http://www.ifixit.com/Manifesto
> 
> ------------------------------------------------------------------------------
> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
> with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
> MVPs and experts. SALE $99.99 this month only -- learn more at:
> http://p.sf.net/sfu/learnmore_122912
> _______________________________________________
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users
                                          
------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnmore_123012
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to