Re: KConfigXT default value code evaluation
I've solved in this way: I set as default value latitude=0 and longitude=0 in main.xml , then in init I call configChanged and after it I check if lat and lon are both zero. In this case I get their default values in init and write these values to the rc file. In this way when the dialog in opened the correct values are shown. 2012/2/5 Simone Gaiarin : > So there is no way to compute the default value in the init function > and set it to the configuration dialog? Or I have to write the default > value to the rc file so that when the configuration dialog is showed > it reads this value? > > 2012/2/5 Aaron J. Seigo : >> On Sunday, February 5, 2012 00:44:47 Simone Gaiarin wrote: >>> I'm writing a python plasmoid and I want to initialize a field with a >>> default value from this function KSystemTimeZones::local().latitude() >>> but it doesn't work. >>> If I put a number in the default value it is taken correctly. I've >>> also tried to add another include tag with KTimeZone. I've tried even >>> with the point insted of :: KSystemTimeZones.local().latitude() . But >>> it still doesn't work. Any idea? >> >> code is not supported in configxt loaded by plasmoids, as that requires >> generation, compilation and execution of C++ code. obviously, this is a "no- >> go". it may be possible to run it in the runtime of the plasmoid (meaning it >> would become python in a python plasmoid, JS in a JS plasmoid, etc) but that >> would require a fair amount more work on the configxt support for plasmoids. >> >> -- >> Aaron J. Seigo >> ___ >> Plasma-devel mailing list >> Plasma-devel@kde.org >> https://mail.kde.org/mailman/listinfo/plasma-devel >> ___ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel
Re: KConfigXT default value code evaluation
So there is no way to compute the default value in the init function and set it to the configuration dialog? Or I have to write the default value to the rc file so that when the configuration dialog is showed it reads this value? 2012/2/5 Aaron J. Seigo : > On Sunday, February 5, 2012 00:44:47 Simone Gaiarin wrote: >> I'm writing a python plasmoid and I want to initialize a field with a >> default value from this function KSystemTimeZones::local().latitude() >> but it doesn't work. >> If I put a number in the default value it is taken correctly. I've >> also tried to add another include tag with KTimeZone. I've tried even >> with the point insted of :: KSystemTimeZones.local().latitude() . But >> it still doesn't work. Any idea? > > code is not supported in configxt loaded by plasmoids, as that requires > generation, compilation and execution of C++ code. obviously, this is a "no- > go". it may be possible to run it in the runtime of the plasmoid (meaning it > would become python in a python plasmoid, JS in a JS plasmoid, etc) but that > would require a fair amount more work on the configxt support for plasmoids. > > -- > Aaron J. Seigo > ___ > Plasma-devel mailing list > Plasma-devel@kde.org > https://mail.kde.org/mailman/listinfo/plasma-devel > ___ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel
Re: KConfigXT default value code evaluation
On Sunday, February 5, 2012 00:44:47 Simone Gaiarin wrote: > I'm writing a python plasmoid and I want to initialize a field with a > default value from this function KSystemTimeZones::local().latitude() > but it doesn't work. > If I put a number in the default value it is taken correctly. I've > also tried to add another include tag with KTimeZone. I've tried even > with the point insted of :: KSystemTimeZones.local().latitude() . But > it still doesn't work. Any idea? code is not supported in configxt loaded by plasmoids, as that requires generation, compilation and execution of C++ code. obviously, this is a "no- go". it may be possible to run it in the runtime of the plasmoid (meaning it would become python in a python plasmoid, JS in a JS plasmoid, etc) but that would require a fair amount more work on the configxt support for plasmoids. -- Aaron J. Seigo signature.asc Description: This is a digitally signed message part. ___ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel
KConfigXT default value code evaluation
I'm writing a python plasmoid and I want to initialize a field with a default value from this function KSystemTimeZones::local().latitude() but it doesn't work. If I put a number in the default value it is taken correctly. I've also tried to add another include tag with KTimeZone. I've tried even with the point insted of :: KSystemTimeZones.local().latitude() . But it still doesn't work. Any idea? http://www.kde.org/standards/kcfg/1.0"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://www.kde.org/standards/kcfg/1.0 http://www.kde.org/standards/kcfg/1.0/kcfg.xsd"; > KSystemTimeZones Latitude KSystemTimeZones::local().latitude() ___ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel