List Info

Thread: writeSetting or readSetting with wizard or mainwindow




writeSetting or readSetting with wizard or mainwindow
country flaguser name
United States
2008-03-08 00:02:50
 From my experience I can not get readSetting or
writeSetting to work 
with mainwindow.kmdr or wizard.kmdr.  They only seem to work
with a 
dialog.kmdr.  Is this correct?  Is there any way to do this
besides 
loading a dialog whose sole purpose is to read and write
settings to the 
parent( I think this is possible)?  If I am correct and you
can not read 
or write settings with wizards or main windows then do you
plan to add 
this feature?  The Kpart plugin seems to me to show a lot of
potential 
do you plan to make it part of the standard Kommander
install instead of 
a plugin?
_______________________________________________
Kommander mailing list
Kommanderkdewebdev.org

http://mail.kdewebdev.org/mailman/listinfo/kommander

Re: writeSetting or readSetting with wizard or mainwindow
country flaguser name
United States
2008-03-08 01:24:15
On Friday 07 March 2008 10:02:50 pm tidedies-world.com wrote:
>  From my experience I can not get readSetting or
writeSetting to work
> with mainwindow.kmdr or wizard.kmdr.  They only seem to
work with a
> dialog.kmdr.  Is this correct?

I'm not sure if we documented this, but you are correct.
MainWindow and Wizard 
are both different. The dialog window and all widgets we
were able to inherit 
the main Kommander class with, but these proved to crash the
editor no matter 
what we did. The editor was derived from an early Qt
Designer. 

> Is there any way to do this besides 
> loading a dialog whose sole purpose is to read and
write settings to the
> parent( I think this is possible)?

As was recently pointed out, the flaw with reading and
writing settings is 
they all go to Kommander rc file. Another solution is to use
the file write 
and read. I posted recently an example using the indexed
array functions to 
create a virtual map of a file in the first line and be able
to read the 
file, then refer to values stored in it by array values. If
need be I can 
post this again or make an example file. This is what I use
with MainWindow 
files as it makes more sense to write the to the current
directory, which is 
the global _KDDIR.

> If I am correct and you can not read 
> or write settings with wizards or main windows then do
you plan to add
> this feature?

It's academic. The next major version will be in KDE4. We
anticipate not 
having the same troubles at all. AFAIK the new version of
Designer is made to 
be extensible for uses like ours and using Qt plugins we
should have an 
instant access to far more control and interaction with
internals than ever.

> The Kpart plugin seems to me to show a lot of potential

> do you plan to make it part of the standard Kommander
install instead of
> a plugin?

I can't really say right now. I'd like to, but first we will
do an executor 
port to KDE4, then begin on the full port, where that would
come into play. 
Given that Andras is doing double duty and I will try to
write some of the 
C++ our big hope is to get some help. I know some developers
like Sebastian 
Sauer who wrote Kross would love to help, but he is way to
busy for a few 
months. I hope to lure him in to do some coding.

All things being equal I'd like to say yes, but it's too
soon to say for sure. 
Our big priorities now are developer time. I'm far too busy
to program as 
much as I'd like to. I hope to generate some more funding
for sponsored 
developers and can also submit for Google summer of code.
Hopefully our next 
efforts move the executor to be a part of KDE4 base
libraries and attracts 
more development. Cross your fingers, send donations, bug
your friends, write 
position pieces... If I have anything to say about it the
next version will 
be 10 times nicer. 

-- 
Eric Laffoon
Project Lead - kdewebdev module
_______________________________________________
Kommander mailing list
Kommanderkdewebdev.org

http://mail.kdewebdev.org/mailman/listinfo/kommander

Re: writeSetting or readSetting with wizard or mainwindow
country flaguser name
United States
2008-03-09 19:27:49
On Friday 07 March 2008 10:02:50 pm tidedies-world.com wrote:
> Is there any way to do this besides
> loading a dialog whose sole purpose is to read and
write settings to the
> parent( I think this is possible)?

Attached is an example that will read one line entries. 

There are a number of ways to handle multi line entries,
such as inserting 
markers and moving through the lines. Another solution is to
read everything 
and count between lines, but with the existing file layout
this would mean 
extra looping and ugly code. Using a map with entries like
2.1 and 3.4 would 
enable a more complex reading of string splits, like
this...

field2 = ""
for i=0 to line[str_section(map["field2"],
".", 1)]
	filed2=field2+line[str_section(map["field2"],
".", 0)]
end

That is also less easily digested than single lines by a
fair amount. the 
paradox is that all fields now have to have some degree of
awareness of the 
split field. Perhaps the simplest alternative is to  just
write it to a more 
rigid form using a second map line with line counts.

In any case, if you cannot use single lines it becomes more
complex. At least 
this gives you some options. Ideally I'd like to have a
settings function in 
the next version that can handle settings on a per
application basis, just 
like regular KDE apps.

-- 
Eric Laffoon
Project Lead - kdewebdev module

_______________________________________________
Kommander mailing list
Kommanderkdewebdev.org

http://mail.kdewebdev.org/mailman/listinfo/kommander

  
  
[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )