#1
|
|||
|
|||
Creation of button box
Hi all,
I need help for solve this little problem. I have create a simple function in lisp that modify the current style for the manual geometry in Annotation: PHP Code:
PHP Code:
I have created the menù with this code: PHP Code:
when the button was pressed for the first time the function line_style is called and works, but the button is not released and looks like "pressed". When I push it again the function is not called and the button was released. What's wrong in the command definition? It's possible to create a button that don't have the behavior of a toggle-button calling a simple function and not a dialog? The same definition for a command that call a dialog works correctly... Thank to all. |
#2
|
||||
|
||||
Re: Creation of button box
I never used this functionality myself, so this is just a wild guess: Maybe line_style needs to be defined as a dialog (via sd-defdialog), not a function (via defun).
Also, you may want to use a name which is less likely to collide with existing ones, i.e. something like bobo82_line_style, or (better) define the function in its own Lisp package. Claus
__________________
CoCreate Modeling FAQ: http://www.clausbrod.de/CoCreateModeling/ |
#3
|
|||
|
|||
Re: Creation of button box
Thanks for your reaction Clausb,
the code I posted was little simplified... I have already create my lisp package and the real name of the function is: "setta_linea_continua" so the buttonbox definition looks like: PHP Code:
I try some different way, whit different function, to create the button but the resul is the same... It's look like that all the buttonbox have to call a dialog for works correctly, but in the standard OSDM menù there are some button that not call a dialog and works correctly ... The idea of call the function whit a sd-defdialog it's a workaround that I can use, but it's mean one more click from the user to confirm the action for each time. Thanks again for you kind answer. Bobo |
#4
|
||||
|
||||
Re: Creation of button box
Quote:
PHP Code:
And based on the today's performance of machines we are using the overkill will not be seen/felt. ----------- I this case you can name the dialog itself 'setta_linea_continua and write the action within the :Ok-action directly without a defun. Just using your available command in a toolbar is not an option?
__________________
|
#5
|
|||
|
|||
Re: Creation of button box
Thanks a lot Wolfgang,
the solution of the dialog is certainly the best one. I realy appreciated yuor suggestion . Thanks a lot, again. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|