Extraño comportamiento de Pushbutton e Icon - Forum

Forum Navigation
You need to log in to create posts and topics.

Extraño comportamiento de Pushbutton e Icon

Hola todos

MessageBox "Formula Maestra" "Quieres añadir una nueva formula maestra?" "Si quiero|No quiero" "btn_add_formula_maestra"

Esta rutina no funciona muy bien con el evento click en la icona como da imagen, pero no funciona para nada haciendo click en el pushbutton como da imagen.

A que se debe ese problema (si lo es) es un bug conocido o me estoy equivocando en algo?

Gracias de antemano

 

Uploaded files:
  • You need to login to have access to uploads.

@xojo

I can not understand this ...

This routine does not work very well with the event click on the icon as it gives image, but it does not work at all by clicking on the pushbutton as it gives image.

... perhaps lost in translation ... but looking at your MessageBox command, for the subroutine named btn_add_formula_maestra ...

1) make sure that the first (and only) parameter is configured something like ...

Alias = [SelectionNumber]
Type = INTEGER
Description = not important

2) the subroutine code is ...

AlertBox "MessageBox Selection" "... was [SelectionNumber]" ""

When you run your App, the subroutine should popup an AlertBox with a value of 1 or 2

Now you can add your logic to respond to a value of 1 or 2.

@gaev Hi, nice to see you again ;-)

My mistake, so let me address better what i mean:

The rutine or function is working very well on icon click event, but is not working at all on pushbutton click event.

As follow pleas check my subroutine.

SetVar [si] 1
SetVar [formula_maestra] ""
SetVar [id_formula_maestra] ""
SetVar [id_materia_prima] ""

very easy

sorry for any typo

Thanks

 

 

@xojo

is working very well on icon click event, but is not working at all on pushbutton click event.

I do not understand what icon click event and pushbutton click event are ... can you upload a .neoapp file to demonstrate this ?

Hi, yes ofcourse

Here it goes..

The page is w_formula_maestra and the icon and button are:

  1. Print Icon
  2. Firts blue pushbutton

 

 

Uploaded files:
  • You need to login to have access to uploads.

@xojo no se como reproducir el problema. ¿Qué opciones debemos clicar hasta llegar a verlo?

Hola luishp

tienes razo.

ok cuando se ejecuta el programa simplemente presionas el boton de login asi no mas y te lleva al modulo de asmin. de los combobox escoges el primero que dice calidad lo abres y seleccionas el primer item que dice formula maestra. eso te lleva al. modulo. ahora notaras en la esquina sup derecha el icono de un impresora y cuando le hagas ckick encima va a aparecer un mensaje. eso funciona bien. la misma rutina es para el primer boton azul con el signo más. en ese caso al presiónar el botón no se da ningún evento asi que no se abre ningun mensaje como en el caso anterior. no me explico el porqué

 

gracias por tu paciencia y ayuda

Hi Xojo,

I looked at your app. Well and here is the solution  for the problem.

open visualneo

  1. go to the page w_formula_maestra
  2. select only btnAdd
  3. Open ArrangeMenu and select Send to Back

Now the click event will work in the same way as the print icon.

The event depends on the layer where you place the items. The print icon was on the first layer (it is in the back). And the button is nearly on the last layer (it is in front of al items).

I don´t know why this happens. Probably there is a monster like pacman eating your click event :)

Greets

Hi,

some additions

@luishp: to reproduce the error: I commented the CrearToolTip command (this didn´t worked) out in the app-events. Then just make a button with a direct jump to the page w_formula_maestra.

@xojo  the bad guys or the monsters are the list-boxes in the bottom. They have no variable assigned (on the right in the content area) .  When I assign a variable to the list boxes the button will work again.

Greets

 

Hi @timbojones

Great, seems that your solution solves the problem, but as you said,

the bad guys or the monsters are the list-boxes at the bottom. They have no variable assigned (on the right in the content area).  When I assign a variable to the list boxes the button will work again.

So I ask if this is a solution or a bug to fix?

Many thanks for your help

Hi Xojo,

hm I don´t know if this is a bug from visualNeo. Probably it will cause problems when a combobox or a listbox is not well defined. So maybe the empy listboxes or comboboxes produce NULL-Values. And this causes probably trouble.

When I try listboxes or comboboxes I will define them with all necessary values and assign some dummy content.

Greets

@xojo, con tantas opciones y botones me resulta muy dificil aislar el problema. No obstante, cuando existe un error, todo lo que va después (que es también lo que está más por delante, es decir en un plano superior) dejará de funcionar. Por eso, al enviar el botón atrás del todo, pasa a estar en una posición anterior al error y funciona. Es decir, el error no tiene nada que ver con el botón ni con la subrutina a la que llama.

Si te fijas en la Consola del navegador, aparece un error cuando no asignas una viariable a los ListBox. Este error desaparece una vez les asignas una variable y entonces todo funciona correctamente.

El error aparece justo en el momento en que elijes Área Calidad > Fórmula Maestra

Saludos.

Hola @luishp

Entiendo tu explición y tiene sentido obviamente aplicado a VisualNeo(Web)

Solo me extraña , el hecho de que hay que declar o asignar una variable a los objetos, que al momento de ejecutar la aplicacion estan sin una variable o subrutina asignada(valga la redundancia)

Tambien entiendo que cada plataforma de desarrollo trabaja de manera disitina a otra, asi que en este caso se trata simplemente

de aprender otro idioma y estar abierto al cambio.

 

Muchas gracias por el apoyo

Solo me extraña , el hecho de que hay que declar o asignar una variable a los objetos, que al momento de ejecutar la aplicacion estan sin una variable o subrutina asignada(valga la redundancia)

@xojo es que, en principio, esto no es necesario. Prueba a añadir un ListBox a un proyecto en blanco y verás como en la Consola no aparece ningún error aunque no le hayas asignado una variable. Otra cosa es que sea recomendable para que no sucedan cosas como la que te ha pasado a ti en tu proyecto en particular. Lo que no he sido capaz es de encontrar donde se produce el error (no tengo tiempo de indagar más).