List Info

Thread: Nested loop




Nested loop
country flaguser name
Poland
2008-04-24 08:37:46
How to make a nested loop in kommander ?

my 1st trial failed with "Unterminated forEach
... end block".

for(trow, 0, 2, 1)
for(tcol, 0, 2, 1)
Table1.setCellText(trow, tcol, foo)
end
end


regs wally

_______________________________________________
Kommander mailing list
Kommanderkdewebdev.org

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

Re: Nested loop
country flaguser name
United States
2008-04-24 09:54:56
On Thursday 24 April 2008 6:37:46 am Wally wrote:
> How to make a nested loop in kommander ?
>
> my 1st trial failed with "Unterminated forEach
... end block".
>
> for(trow, 0, 2, 1)
> for(tcol, 0, 2, 1)
> Table1.setCellText(trow, tcol, foo)
> end
> end
>
>
> regs wally
>
Ah... Somebody isn't looking in the docs... Looks fine
except, hey, you're 
using the old macro parser. 

Macro parser limitations 101: No nested loops! I know it
stinks, but you can 
do one loop and one if block nested. So the only way with
the old parser is 
to make all your varaibles for your inside loop global
(because that parser 
can't pass back and forth either) and put your inside loop
in a new script...

We got this all the time because the macro parser was
stretched from moving 
some text as far as possible, but it had lots of
shortcomings. So we have a 
new parser which is a selectable property in your dialog. It
has...
* unlimited nesting
* else and elseif
* variables
And in the latest versions...
* pass parameters to and from scripts
* easy mixing of old and new parsers and integration of
other script languages
(Actually IIRC it worked before but works better now)
To make a widget use the new parser make the first line
#!kommander

Unfotunately the new parser was not well tested prior to the
1.3 release so 
there are a few minor bugs in old versions. The 1.3 release
was in KDE 3.5.9. 
Have a look at the changes. 
http://websv
n.kde.org/branches/KDE/3.5/kdewebdev/kommander/ChangeLog?rev
ision=800440&view=markup
Make sure kmail didn't split that up.

Even though  you can run the new parser in versions several
years old the 
newst release not only has fixed some bugs that make it
annoying to run, it 
also has a lot of great features like context menus, widget
creation on the 
fly and more. There are also a lot of plugins, all listed
here.
http://www.kde-apps.org/content/show.php/Kommand
er?content=12865

I hope this helps.
-- 
Eric Laffoon
Project Lead - kdewebdev module
_______________________________________________
Kommander mailing list
Kommanderkdewebdev.org

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

Re: Nested loop
country flaguser name
Poland
2008-04-25 00:08:47
On Thursday 24 April 2008 16:54 Eric Laffoon wrote:
> On Thursday 24 April 2008 6:37:46 am Wally wrote:
> > How to make a nested loop in kommander ?
> >
> > my 1st trial failed with "Unterminated forEach
... end block".
> >
> > for(trow, 0, 2, 1)
> > for(tcol, 0, 2, 1)
> > Table1.setCellText(trow, tcol, foo)
> > end
> > end
> >
> >
> > regs wally
>
> Ah... Somebody isn't looking in the docs... Looks fine
except, hey, you're
> using the old macro parser.
>
> Macro parser limitations 101: No nested loops! I know
it stinks, but you
> can do one loop and one if block nested. So the only
way with the old
> parser is to make all your varaibles for your inside
loop global (because
> that parser can't pass back and forth either) and put
your inside loop in a
> new script...
>
> We got this all the time because the macro parser was
stretched from moving
> some text as far as possible, but it had lots of
shortcomings. So we have a
> new parser which is a selectable property in your
dialog. It has...
> * unlimited nesting
> * else and elseif
> * variables
> And in the latest versions...
> * pass parameters to and from scripts
> * easy mixing of old and new parsers and integration of
other script
> languages (Actually IIRC it worked before but works
better now)
> To make a widget use the new parser make the first
line
> #!kommander
>
> Unfotunately the new parser was not well tested prior
to the 1.3 release so
> there are a few minor bugs in old versions. The 1.3
release was in KDE
> 3.5.9. Have a look at the changes.
> http://websvn.kde.org/branches/KDE/3.
5/kdewebdev/kommander/ChangeLog?revisi
>on=800440&view=markup Make sure kmail didn't split
that up.
>
> Even though  you can run the new parser in versions
several years old the
> newst release not only has fixed some bugs that make it
annoying to run, it
> also has a lot of great features like context menus,
widget creation on the
> fly and more. There are also a lot of plugins, all
listed here.
> http://www.kde-apps.org/content/show.php/Kommand
er?content=12865
>
> I hope this helps.


Hi Eric, Hi Donn

i installed the new parser and, Donn you are right, it is
incredible.
Its a pure pleasure to code with this stuff.

But i have still troubles to find a documentation usable
during "rapid 
application development". Doing RAD i usually do not
read the changelog 
primarily 

But seems the new parser do not need a huge documentation
and for the moment i use example *.kmdr files to get into
it.

Thanks
wally
   
_______________________________________________
Kommander mailing list
Kommanderkdewebdev.org

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

Re: Nested loop
country flaguser name
United States
2008-04-25 01:17:31
Hi Wally,

On Thursday 24 April 2008 10:08:47 pm Wally wrote:
> On Thursday 24 April 2008 16:54 Eric Laffoon wrote:
> > On Thursday 24 April 2008 6:37:46 am Wally wrote:
> > > How to make a nested loop in kommander ?
[...]
>
> Hi Eric, Hi Donn
>
> i installed the new parser and, Donn you are right, it
is incredible.
> Its a pure pleasure to code with this stuff.

I agree. Currently I've spent hours wrestling with trying to
make a C++ 
DataNavigator class talk as a friend to the Database class,
which is passing 
around objects. Kommander is much easier.
>
> But i have still troubles to find a documentation
usable during "rapid
> application development". Doing RAD i usually do
not read the changelog
> primarily 

Once again it appears a tasty tidbit of information may hold
the key... See 
below...
>
> But seems the new parser do not need a huge
documentation
> and for the moment i use example *.kmdr files to get
into it.
>
> Thanks
> wally
>
I've been doing open source for years now and I found the
curse. New projects 
are quite simple, easy, have few docs and can't do much.
Established projects 
are complex, challenging and the docs are overwhelming so
nobody reads them. 
Please tell me if you have found the following yet.

1) Function browser - In the text editor, lower left button,
every single 
function in Kommander is mapped out so you can point and
click to learn and 
write them.
2) Help - the help menu of the editor has extensive docs!
3) KTextEditor word completion - In Settings::Configure
editor->Plugins you 
can set it to autocomplete words from your document, by
default it starts at 
3 letters and begins completing anything you've written in
that instance of 
the editor.
4) Snippet Manager - If you are running the 1.3.1 special
release there is a 
database oriented snippet manager to save and share text
snippets. You can 
even use my TemplateMagic system to replace text fields in a
template on the 
fly.
5) Plugins - Database, DateTime, MainWindow functionality,
KPart loading and 
more... Run Kommander dialogs inside other Kommander
dialogs, make a web 
browser, send to web forms from dialogs, manage menus and
toolbars...

I have a lot more I'd like to do like graphical decision
trees that generate 
code, enhanced interfaces and a strong user community, but I
think we have a 
good start.

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

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

Re: Nested loop
country flaguser name
Poland
2008-04-25 03:40:32
On Friday 25 April 2008 08:17 Eric Laffoon wrote:
> Hi Wally,
>
> On Thursday 24 April 2008 10:08:47 pm Wally wrote:
> > On Thursday 24 April 2008 16:54 Eric Laffoon
wrote:
> > > On Thursday 24 April 2008 6:37:46 am Wally
wrote:
> > > > How to make a nested loop in kommander
?
>
> [...]
>
> > Hi Eric, Hi Donn
> >
> > i installed the new parser and, Donn you are
right, it is incredible.
> > Its a pure pleasure to code with this stuff.
>
> I agree. Currently I've spent hours wrestling with
trying to make a C++
> DataNavigator class talk as a friend to the Database
class, which is
> passing around objects. Kommander is much easier.
>
> > But i have still troubles to find a documentation
usable during "rapid
> > application development". Doing RAD i usually
do not read the changelog
> > primarily 
>
> Once again it appears a tasty tidbit of information may
hold the key... See
> below...
>
> > But seems the new parser do not need a huge
documentation
> > and for the moment i use example *.kmdr files to
get into it.
> >
> > Thanks
> > wally
>
> I've been doing open source for years now and I found
the curse. New
> projects are quite simple, easy, have few docs and
can't do much.
> Established projects are complex, challenging and the
docs are overwhelming
> so nobody reads them. Please tell me if you have found
the following yet.
>
> 1) Function browser - In the text editor, lower left
button, every single
> function in Kommander is mapped out so you can point
and click to learn and
> write them.
> 2) Help - the help menu of the editor has extensive
docs!
> 3) KTextEditor word completion - In Settings::Configure
editor->Plugins you
> can set it to autocomplete words from your document, by
default it starts
> at 3 letters and begins completing anything you've
written in that instance
> of the editor.
> 4) Snippet Manager - If you are running the 1.3.1
special release there is
> a database oriented snippet manager to save and share
text snippets. You
> can even use my TemplateMagic system to replace text
fields in a template
> on the fly.
> 5) Plugins - Database, DateTime, MainWindow
functionality, KPart loading
> and more... Run Kommander dialogs inside other
Kommander dialogs, make a
> web browser, send to web forms from dialogs, manage
menus and toolbars...
>
> I have a lot more I'd like to do like graphical
decision trees that
> generate code, enhanced interfaces and a strong user
community, but I think
> we have a good start.

Hi Eric

1. found "Function Browser" - good 
2. found "Kommander Handbook" - not convenient to
navigate
3. switch on this pluggin - good
4.a.)  actually running v1.3, trying to get 1.3.1special
release today
4. b) => Snipped manager not found - sound very good!
5.) - just found 5 Pluggins in Settings->Configure
Editor->Plugins
- Settings->Configure Plugins ... i have to find out how
this works and 
localize available plugins  ( a database-access-pluggin
would be great )

You see, there is a lot of work to be done 

Another question: Double-clicking on a widget rise the
"Edit Text ...-Dialog".
Can i set this to rise the  "Edit Kommander -Text
...-Dialog" ?

kind regards 
wally
_______________________________________________
Kommander mailing list
Kommanderkdewebdev.org

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

Re: Nested loop
country flaguser name
United States
2008-04-25 11:12:11
On Friday 25 April 2008 1:40:32 am Wally wrote:
> On Friday 25 April 2008 08:17 Eric Laffoon wrote:
> > Hi Wally,
> >
> > On Thursday 24 April 2008 10:08:47 pm Wally
wrote:
> > > On Thursday 24 April 2008 16:54 Eric Laffoon
wrote:
> > > > On Thursday 24 April 2008 6:37:46 am
Wally wrote:
> > > > > How to make a nested loop in
kommander ?
> >
> > [...]
> >
> > > Hi Eric, Hi Donn
> > >
> > > i installed the new parser and, Donn you are
right, it is incredible.
> > > Its a pure pleasure to code with this stuff.
> >
> > I agree. Currently I've spent hours wrestling with
trying to make a C++
> > DataNavigator class talk as a friend to the
Database class, which is
> > passing around objects. Kommander is much easier.
> >
> > > But i have still troubles to find a
documentation usable during "rapid
> > > application development". Doing RAD i
usually do not read the changelog
> > > primarily 
> >
> > Once again it appears a tasty tidbit of
information may hold the key...
> > See below...
> >
> > > But seems the new parser do not need a huge
documentation
> > > and for the moment i use example *.kmdr files
to get into it.
> > >
> > > Thanks
> > > wally
> >
> > I've been doing open source for years now and I
found the curse. New
> > projects are quite simple, easy, have few docs and
can't do much.
> > Established projects are complex, challenging and
the docs are
> > overwhelming so nobody reads them. Please tell me
if you have found the
> > following yet.
> >
> > 1) Function browser - In the text editor, lower
left button, every single
> > function in Kommander is mapped out so you can
point and click to learn
> > and write them.
> > 2) Help - the help menu of the editor has
extensive docs!
> > 3) KTextEditor word completion - In
Settings::Configure editor->Plugins
> > you can set it to autocomplete words from your
document, by default it
> > starts at 3 letters and begins completing anything
you've written in that
> > instance of the editor.
> > 4) Snippet Manager - If you are running the 1.3.1
special release there
> > is a database oriented snippet manager to save and
share text snippets.
> > You can even use my TemplateMagic system to
replace text fields in a
> > template on the fly.
> > 5) Plugins - Database, DateTime, MainWindow
functionality, KPart loading
> > and more... Run Kommander dialogs inside other
Kommander dialogs, make a
> > web browser, send to web forms from dialogs,
manage menus and toolbars...
> >
> > I have a lot more I'd like to do like graphical
decision trees that
> > generate code, enhanced interfaces and a strong
user community, but I
> > think we have a good start.
>
> Hi Eric
>
> 1. found "Function Browser" - good
> 2. found "Kommander Handbook" - not
convenient to navigate
> 3. switch on this pluggin - good
> 4.a.)  actually running v1.3, trying to get
1.3.1special release today
> 4. b) => Snipped manager not found - sound very
good!
It's in 1.3.1

> 5.) - just found 5 Pluggins in Settings->Configure
Editor->Plugins
> - Settings->Configure Plugins ... i have to find out
how this works and
> localize available plugins  ( a database-access-pluggin
would be great )

Build the plugin and register it. I have a very nice
database plugin.

Actually one of the coolest things I've seen lately is Alex
Fischer's plutome 
which looks for available plugins and downloads them. I've
attached it. 
Please try it out and give feedback on the list.
>
> You see, there is a lot of work to be done 

There always is.
>
> Another question: Double-clicking on a widget rise the
"Edit Text
> ...-Dialog". Can i set this to rise the 
"Edit Kommander -Text ...-Dialog"
> ?

Try middle clicking. Double clicking is just a way to get
repetitive stress 
injuries on systems designed with a single button button
mouse. ;)
>
> kind regards
> wally


-- 
Eric Laffoon
Project Lead - kdewebdev module

_______________________________________________
Kommander mailing list
Kommanderkdewebdev.org

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

  
Plutome 1st trial
country flaguser name
Poland
2008-04-25 11:52:14
Hi Eric,

thanks for the middle-button hint.

i tried plutome.
starts very good but doesn't finish.
see the attached screenshots please

i tried with database and htmlform.

I think its the same problem as my earlier posted 
compile problem. 
Anyway plutome reported a successfull
compilation. 


regs wally

_______________________________________________
Kommander mailing list
Kommanderkdewebdev.org

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

View Original Image
View Original Image
Re: Plutome 1st trial
country flaguser name
United States
2008-04-25 13:01:19
On Friday 25 April 2008 9:52:14 am Wally wrote:
> Hi Eric,
>
> thanks for the middle-button hint.
>
> i tried plutome.
> starts very good but doesn't finish.
> see the attached screenshots please

In the future please don't use screenshots. Ordinarily I
would reject them but 
I want plutome tested and working, so hopefully Alex will
catch this.
>
> i tried with database and htmlform.
>
> I think its the same problem as my earlier posted
> compile problem.
> Anyway plutome reported a successfull
> compilation.
>
>
> regs wally
Yes, you can now register the plugin at least.


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

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

Re: Plutome 1st trial
country flaguser name
Poland
2008-04-25 13:27:43
On Friday 25 April 2008 20:01 Eric Laffoon wrote:
> Yes, you can now register the plugin at least.

No  :(

i assume i have to search for a
"libkmdrdatabase.la" .

i can not find this file on my system and i do not 
know why plutome reported a successful compile.

no compiler output , no log, no nothing 

Launching Kommander-Executor after plutome the
pluginsetting shows this file in a strange directory:
/home/wally/.kde/lib/kde3/libkmdrdatabase.la

doing a refresh removes this and the plugin dialog 
is empty again.

this is the local user /.kde

on my system the libs are in  /opt/kde3/lib

regs
wally











 
_______________________________________________
Kommander mailing list
Kommanderkdewebdev.org

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

[1-9]

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