John Levon [EMAIL PROTECTED] writes:
| o no longer is the various parts of a new function spread in four or five
| different places. To add a new function means adding it to functions.C,
| and (if necessary) a status tester to status_functions.C
but that is almost true today as well. To add
"Lars" == Lars Gullik Bjønnes [EMAIL PROTECTED] writes:
Lars Couln't much of what you do be done with added some more fields
Lars to the LyXAction lfun_item? (In your case a function pointer)
That would probably be a good idea. One thing which would be nice too
is to declare the arguments
On 15 Jan 2001, Lars Gullik Bjønnes wrote:
John Levon [EMAIL PROTECTED] writes:
| o no longer is the various parts of a new function spread in four or five
| different places. To add a new function means adding it to functions.C,
| and (if necessary) a status tester to
On 15 Jan 2001, Jean-Marc Lasgouttes wrote:
That would probably be a good idea. One thing which would be nice too
is to declare the arguments expected by the func and maybe their type.
Any suggestions on how this might work ?
thanks
john
--
"Threads are for people who can't program state
"John" == John Levon [EMAIL PROTECTED] writes:
John On 15 Jan 2001, Jean-Marc Lasgouttes wrote:
That would probably be a good idea. One thing which would be nice
too is to declare the arguments expected by the func and maybe
their type.
John Any suggestions on how this might work ?
Maybe
at the very least, without auto generation, you need :
1 place for the commandtag (commandtags.h)
1 place for the invoke method (lyxfunc.C)
1 place for the instantiation of the lyxfunc (LyXAction.C)
What about nuking the commandtags and putting everything in a
std::mapstring, whatever,
On Mon, 15 Jan 2001, Andre Poenitz wrote:
at the very least, without auto generation, you need :
1 place for the commandtag (commandtags.h)
1 place for the invoke method (lyxfunc.C)
1 place for the instantiation of the lyxfunc (LyXAction.C)
What about nuking the commandtags and
John Levon [EMAIL PROTECTED] writes:
| On 15 Jan 2001, Lars Gullik Bjnnes wrote:
|
| John Levon [EMAIL PROTECTED] writes:
|
| | o no longer is the various parts of a new function spread in four or five
| | different places. To add a new function means adding it to functions.C,
| | and
"John" == John Levon [EMAIL PROTECTED] writes:
John how do strings fit in with the frontend menus ? Must I really
John have some extra store of integers (the menu ID tags from the GUI
John library) to strings ?
The functions could be allocated a number when they are registered, or
something
the command?
Comparing strings instead numbers should cost only a constant factor of
time more than comparing enums, starting off from a very tiny amount.
Morover, lookup in the map is O(ln n) compared to O(n) in the
big case scwitch. So it shold not really be noticable.
you are
On 15 Jan 2001, Jean-Marc Lasgouttes wrote:
"John" == John Levon [EMAIL PROTECTED] writes:
John how do strings fit in with the frontend menus ? Must I really
John have some extra store of integers (the menu ID tags from the GUI
John library) to strings ?
The functions could be
On Mon, 15 Jan 2001, Andre Poenitz wrote:
No. I am not. First of all I mentiond the existence of a constant factor
and second, it does not matter. Even if the factor was 1000.
How many lyx-functions are called per second? 1000? Likely less.
Now, how long take 1000 string lookups in a map
John Levon [EMAIL PROTECTED] writes:
| On 15 Jan 2001, Jean-Marc Lasgouttes wrote:
|
| That would probably be a good idea. One thing which would be nice too
| is to declare the arguments expected by the func and maybe their type.
|
| Any suggestions on how this might work ?
for
Jean-Marc Lasgouttes [EMAIL PROTECTED] writes:
| "John" == John Levon [EMAIL PROTECTED] writes:
|
| John how do strings fit in with the frontend menus ? Must I really
| John have some extra store of integers (the menu ID tags from the GUI
| John library) to strings ?
|
| The functions could
"Lars" == Lars Gullik Bjønnes [EMAIL PROTECTED] writes:
Lars My problem with Levons code that I feel it is too static. With
Lars the scheme Andre and I propose it is very easy to load function
Lars os demand or have them created in a scriptlanguage. (or as a
Lars named keyboard macro).
Then we
On 15 Jan 2001, Lars Gullik Bjønnes wrote:
My problem with Levons code that I feel it is too static. With the
scheme Andre and I propose it is very easy to load function os demand
or have them created in a scriptlanguage. (or as a named keyboard macro).
This is probably possible with
Jean-Marc Lasgouttes [EMAIL PROTECTED] writes:
| "Lars" == Lars Gullik Bjnnes [EMAIL PROTECTED] writes:
|
| Lars My problem with Levons code that I feel it is too static. With
| Lars the scheme Andre and I propose it is very easy to load function
| Lars os demand or have them created in a
On 15 Jan 2001, Lars Gullik Bjønnes wrote:
Jean-Marc Lasgouttes [EMAIL PROTECTED] writes:
| "Lars" == Lars Gullik Bjønnes [EMAIL PROTECTED] writes:
|
| Lars My problem with Levons code that I feel it is too static. With
| Lars the scheme Andre and I propose it is very easy to load
| A lyxfunc could take a stream argument from which it reads the actual
| arguments. Most commands are passed around as strings anyway so it makes no
| difference where it is converted to int/double/whatwever.
I'd rather have the real lyxfunc the the correct paramters from the
beginning,
John Levon [EMAIL PROTECTED] writes:
| On 15 Jan 2001, Lars Gullik Bjnnes wrote:
|
| My problem with Levons code that I feel it is too static. With the
| scheme Andre and I propose it is very easy to load function os demand
| or have them created in a scriptlanguage. (or as a named keyboard
I'd rather have the real lyxfunc the the correct paramters from the
beginning, and have a wrapper that create those argumetns from the
supplied stream.
...
| If there really was a performance problem (which I seriously doubt) the
| lyxfunc could come as a "core" function taking the correct
John Levon [EMAIL PROTECTED] writes:
| Each LFUN is a function Levon and I agree on that, afaisi we disagree
| on how to store the LFUNS and how to dispatch them.
|
| Lgb
|
| I don't even disagree on that !
very well
| Dispatch("menu-open eric-bristow") is perfectly possible in
argh, I've just sent a summary. I'll address the additional things below
here.
On 15 Jan 2001, Lars Gullik Bjønnes wrote:
You want an unique number for each LFUN (dynamic from each run of Lyx
of course)?
This can easily be done by having a separate method for this. From the
menu code you
On Mon, Jan 15, 2001 at 06:06:31PM +0100, Lars Gullik Bjnnes wrote:
Andre Poenitz [EMAIL PROTECTED] writes:
|
| A lyxfunc could take a stream argument from which it reads the actual
| arguments. Most commands are passed around as strings anyway so it makes no
| difference where it is
John Levon <[EMAIL PROTECTED]> writes:
| o no longer is the various parts of a new function spread in four or five
| different places. To add a new function means adding it to functions.C,
| and (if necessary) a status tester to status_functions.C
but that is almost true today as well. To
> "Lars" == Lars Gullik Bjønnes <[EMAIL PROTECTED]> writes:
Lars> Couln't much of what you do be done with added some more fields
Lars> to the LyXAction lfun_item? (In your case a function pointer)
That would probably be a good idea. One thing which would be nice too
is to declare the
On 15 Jan 2001, Lars Gullik Bjønnes wrote:
> John Levon <[EMAIL PROTECTED]> writes:
>
> | o no longer is the various parts of a new function spread in four or five
> | different places. To add a new function means adding it to functions.C,
> | and (if necessary) a status tester to
On 15 Jan 2001, Jean-Marc Lasgouttes wrote:
> That would probably be a good idea. One thing which would be nice too
> is to declare the arguments expected by the func and maybe their type.
Any suggestions on how this might work ?
thanks
john
--
"Threads are for people who can't program
> "John" == John Levon <[EMAIL PROTECTED]> writes:
John> On 15 Jan 2001, Jean-Marc Lasgouttes wrote:
>> That would probably be a good idea. One thing which would be nice
>> too is to declare the arguments expected by the func and maybe
>> their type.
John> Any suggestions on how this might
> at the very least, without auto generation, you need :
>
> 1 place for the commandtag (commandtags.h)
> 1 place for the invoke method (lyxfunc.C)
> 1 place for the instantiation of the lyxfunc (LyXAction.C)
What about nuking the commandtags and putting everything in a
std::map
On Mon, 15 Jan 2001, Andre Poenitz wrote:
> > at the very least, without auto generation, you need :
> >
> > 1 place for the commandtag (commandtags.h)
> > 1 place for the invoke method (lyxfunc.C)
> > 1 place for the instantiation of the lyxfunc (LyXAction.C)
>
> What about nuking the
John Levon <[EMAIL PROTECTED]> writes:
| On 15 Jan 2001, Lars Gullik Bjønnes wrote:
|
| > John Levon <[EMAIL PROTECTED]> writes:
| >
| > | o no longer is the various parts of a new function spread in four or five
| > | different places. To add a new function means adding it to functions.C,
|
> "John" == John Levon <[EMAIL PROTECTED]> writes:
John> how do strings fit in with the frontend menus ? Must I really
John> have some extra store of integers (the menu ID tags from the GUI
John> library) to strings ?
The functions could be allocated a number when they are registered, or
> > the command?
> >
> > Comparing strings instead numbers should cost only a constant factor of
> > time more than comparing enums, starting off from a very tiny amount.
> > Morover, lookup in the map is O(ln n) compared to O(n) in the
> > big case scwitch. So it shold not really be noticable.
On 15 Jan 2001, Jean-Marc Lasgouttes wrote:
> > "John" == John Levon <[EMAIL PROTECTED]> writes:
>
> John> how do strings fit in with the frontend menus ? Must I really
> John> have some extra store of integers (the menu ID tags from the GUI
> John> library) to strings ?
>
> The functions
On Mon, 15 Jan 2001, Andre Poenitz wrote:
> No. I am not. First of all I mentiond the existence of a constant factor
> and second, it does not matter. Even if the factor was 1000.
>
> How many lyx-functions are called per second? 1000? Likely less.
> Now, how long take 1000 string lookups in a
> John Levon <[EMAIL PROTECTED]> writes:
>
> | On 15 Jan 2001, Jean-Marc Lasgouttes wrote:
> |
> | > That would probably be a good idea. One thing which would be nice too
> | > is to declare the arguments expected by the func and maybe their type.
> |
> | Any suggestions on how this might
Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes:
| > "John" == John Levon <[EMAIL PROTECTED]> writes:
|
| John> how do strings fit in with the frontend menus ? Must I really
| John> have some extra store of integers (the menu ID tags from the GUI
| John> library) to strings ?
|
| The
> "Lars" == Lars Gullik Bjønnes <[EMAIL PROTECTED]> writes:
Lars> My problem with Levons code that I feel it is too static. With
Lars> the scheme Andre and I propose it is very easy to load function
Lars> os demand or have them created in a scriptlanguage. (or as a
Lars> named keyboard
On 15 Jan 2001, Lars Gullik Bjønnes wrote:
> My problem with Levons code that I feel it is too static. With the
> scheme Andre and I propose it is very easy to load function os demand
> or have them created in a scriptlanguage. (or as a named keyboard macro).
>
> This is probably possible with
Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes:
| > "Lars" == Lars Gullik Bjønnes <[EMAIL PROTECTED]> writes:
|
| Lars> My problem with Levons code that I feel it is too static. With
| Lars> the scheme Andre and I propose it is very easy to load function
| Lars> os demand or have them
On 15 Jan 2001, Lars Gullik Bjønnes wrote:
> Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes:
>
> | > "Lars" == Lars Gullik Bjønnes <[EMAIL PROTECTED]> writes:
> |
> | Lars> My problem with Levons code that I feel it is too static. With
> | Lars> the scheme Andre and I propose it is very
> | A lyxfunc could take a stream argument from which it reads the actual
> | arguments. Most commands are passed around as strings anyway so it makes no
> | difference where it is converted to int/double/whatwever.
>
> I'd rather have the real lyxfunc the the correct paramters from the
>
John Levon <[EMAIL PROTECTED]> writes:
| On 15 Jan 2001, Lars Gullik Bjønnes wrote:
|
| > My problem with Levons code that I feel it is too static. With the
| > scheme Andre and I propose it is very easy to load function os demand
| > or have them created in a scriptlanguage. (or as a named
> I'd rather have the real lyxfunc the the correct paramters from the
> beginning, and have a wrapper that create those argumetns from the
> supplied stream.
> ...
> | If there really was a performance problem (which I seriously doubt) the
> | lyxfunc could come as a "core" function taking the
John Levon <[EMAIL PROTECTED]> writes:
| > Each LFUN is a function Levon and I agree on that, afaisi we disagree
| > on how to store the LFUNS and how to dispatch them.
| >
| > Lgb
|
| I don't even disagree on that !
very well
| Dispatch("menu-open eric-bristow") is perfectly
argh, I've just sent a summary. I'll address the additional things below
here.
On 15 Jan 2001, Lars Gullik Bjønnes wrote:
> You want an unique number for each LFUN (dynamic from each run of Lyx
> of course)?
>
> This can easily be done by having a separate method for this. From the
> menu
On Mon, Jan 15, 2001 at 06:06:31PM +0100, Lars Gullik Bjønnes wrote:
> Andre Poenitz <[EMAIL PROTECTED]> writes:
> |
> | A lyxfunc could take a stream argument from which it reads the actual
> | arguments. Most commands are passed around as strings anyway so it makes no
> | difference where it
48 matches
Mail list logo